Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with more sensors #3

Closed
serfer12 opened this issue Oct 23, 2019 · 7 comments
Closed

Problem with more sensors #3

serfer12 opened this issue Oct 23, 2019 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@serfer12
Copy link

serfer12 commented Oct 23, 2019

english follows

Witam jeżeli dodaje więcej niż 31 przekaźników i podłączam Arduino do HomeAssistant
to w logach HA pojawi się komunikat

Gateway /dev/ttyUSB0 not ready after 15.0 secs so continuing with setup

w pliku mysensor.json pojaw się tylko
{}
jeżeli dodam 31 przekaźników wszystko jest ok

english:

If I add more then 31 sensors and connect Arduino to HomeAssistant, there is a message in HA's log:

Gateway /dev/ttyUSB0 not ready after 15.0 secs so continuing with setup

in mysensor.json there is only:
{}

if there is only 31 sensors, everything is ok.

@Kirizaki
Copy link
Owner

Kirizaki commented Oct 28, 2019

Share your changes please

@Kirizaki Kirizaki self-assigned this Oct 28, 2019
@Kirizaki Kirizaki added the question Further information is requested label Oct 28, 2019
@serfer12
Copy link
Author

https://megawrzuta.pl/download/d95b03baafae64d8bf82e4f6277a58f0.html

@Kirizaki Kirizaki changed the title Problem więcej jak 31 przekaźników Problem with more sensors Oct 28, 2019
@Kirizaki
Copy link
Owner

Kirizaki commented Oct 28, 2019

Please follow:

  1. Checkout test_more_sensors_then_31: https://github.com/th0m4sek/mysensors/tree/test_more_sensors_then_31
  2. Build & flash Arduino with given sketch without changing anything
  3. Remove old mysensor.json from HomeAssistant and reboot HomeAssistant

Result expected:
HomeAssistant should show 34 sensors based on:

std::vector<CustomSensor> customSensors = std::vector<CustomSensor>() = {
  { CustomSensor(SALOON_1_ID,       "Salon S1",       24) },
  { CustomSensor(SALOON_2_ID,       "Salon S2",       25) },
  { CustomSensor(SALOON_3_ID,       "Salon Lampka",   26) },
  { CustomSensor(GAMING_ROOM_1_ID,  "Gralnia S1",     27) },
  { CustomSensor(GAMING_ROOM_2_ID,  "Gralnia S2",     28) },
  { CustomSensor(BEDROOM_ID,        "Sypialnia",      29) },
  { CustomSensor(BED_1_ID,          "Lozko 1",        30) },
  { CustomSensor(BED_2_ID,          "Lozko 2",        31) },
  { CustomSensor(GUESTS_ID,         "Goscinny",       32) },
  { CustomSensor(BATHROOM_1_ID,     "Lazienka",       33) },
  { CustomSensor(BATHROOM_2_ID,     "Prysznic",       34) },
  { CustomSensor(MIRROR_ID,         "Lustro",         35) },
  { CustomSensor(FAN_ID,            "Wentylator",     36) },
  { CustomSensor(KITCHEN_1_ID,      "Kuchnia",        37) },
  { CustomSensor(KITCHEN_2_ID,      "Kuchnia ledy",   38) },
  { CustomSensor(KITCHEN_TABLE_ID,  "Kuchnia stolik", 39) },
  { CustomSensor(WORKSHOP_ID,       "Warsztat",       40) },
  { CustomSensor(CORRIDOR_ID,       "Korytarz",       41) },
  { CustomSensor(PUMP_ID,           "Pompa",          42) },
  { CustomSensor(HEATING_1_ID,      "Strefa 1",       43) },
  { CustomSensor(HEATING_2_ID,      "Strefa 2",       44) },
  { CustomSensor(HEATING_3_ID,      "Strefa 3",       45) },
  { CustomSensor(HEATING_4_ID,      "Strefa 4",       46) },
  { CustomSensor(HEATING_5_ID,      "Strefa 5",       47) },
  { CustomSensor(HEATING_6_ID,      "Strefa 6",       48) },
  { CustomSensor(HEATING_7_ID,      "Strefa 7",       49) },
  { CustomSensor(DUMMY_1_ID,        "Test 1",         49) },
  { CustomSensor(DUMMY_2_ID,        "Test 2",         49) },
  { CustomSensor(DUMMY_3_ID,        "Test 3",         49) },
  { CustomSensor(DUMMY_4_ID,        "Test 4",         49) },
  { CustomSensor(DUMMY_5_ID,        "Test 5",         49) },
  { CustomSensor(DUMMY_6_ID,        "Test 6",         49) },
  { CustomSensor(DUMMY_7_ID,        "Test 7",         49) },
  { CustomSensor(DUMMY_8_ID,        "Test 8",         49) }
};

How's the result?

@Kirizaki
Copy link
Owner

https://megawrzuta.pl/download/d95b03baafae64d8bf82e4f6277a58f0.html

By the way, we will return to those changes. Right now let's focus on main problem not working Arduino-HA with more then 31 sensors and there are some other problems in your code.

@serfer12
Copy link
Author

serfer12 commented Oct 29, 2019

english follows

Zgadza się Twój sketch działa na 34
dzięki

english

yours sketch is working fine with 31+ (e.g. 34) sensors

@Kirizaki
Copy link
Owner

No problem in code.
Cosing reason: wrong usage

@Kirizaki
Copy link
Owner

Solution: Do not duplicate child_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants