Closed JosefKrieglstein closed 6 months ago
Hi @JosefKrieglstein,
The device type essentially corresponds to the number of instances you create. There is a known bug in the library that necessitates setting the number of devices to be one more than the devices you actually register. This is the reason the third solution proves effective.
Hi,
its strange behavior but increase maximum number of device types solved my issue, lets try to explain on examples. MEGA2560 (Controllino MEGA), arduino-home-assistant 2.0.0, Could low free RAM ~ 1440 bytes in loop() be an issue?
1# HAMqtt mqtt(mqttclient, device); 6x HASwitch +1x HAFan(HAFan::SpeedsFeature) + 1x HAHVAC(HAHVAC::TargetTemperatureFeature | HAHVAC::PowerFeature) Problem: HVAC data is not published, HVAC config is not published. (HA doesn't detect HAHVAC), HAFan data are published, HAFan config is not published (HA doesn't detect HAFan). I tried also 3x HASwitch+1x HAFan, which also doesn't work. HAFan state Data seems to work correctly. HAFan speed is not working, not published, not subscribed.
2# HAMqtt mqtt(mqttclient, device, 8); ---< increased device types to 8 6x HASwitch + 1x HAFan(HAFan::SpeedsFeature) + 1x HAHVAC(HAHVAC::TargetTemperatureFeature | HAHVAC::PowerFeature) Problem: Problem: HVAC data is not published, HVAC config is not published. (HA doesn't detect HAHVAC), HAFan is detected and working properly. State and also Speed
3# HAMqtt mqtt(mqttclient, device, 10); ---< increased device types to 10 7x HASwitch + 1x HAFan(HAFan::SpeedsFeature) + 1x HAHVAC(HAHVAC::TargetTemperatureFeature | HAHVAC::PowerFeature) No problem, all devices working properly
I'm using 3 device types, Do I understand wrong documentation about "number of Device Types" ? But why data of state are published and config and speed not? I'm looking with MQTT explorer to check if config is published or not, looking into DataPrefix and DiscoveryPrefix path for data and config.
BR Josef