dawidchyrzynski/arduino-home-assistant

Is the number of HASensorNumber objects/values reported to MQTT broker limited?

Closed this issue · 3 comments

I'm fighting a strange effect, that only the values of the first 5 HASensorNumber objects are pushed to the MQTT broker, even thought I have more defined. I commented the first 5 sensor objects out and then the next 5 appear - this is I verified that I had no error in setting up the HASensorNumber instances.

Is there a hard limit how many "metrics" can be tracked/published per haDevice? can this be changed somehow?

I checked with MQTT Explorer what get published to HA (Mosquitto) and found the following situation -> all sensors are in aha -> but only 5 of them get also published under the homeassistant topic.. therefore not appearing in HA. What could cause this?

MQTT_Explorer

after going through the code there was in deed a default max number of devices set.. just for the record and if someone stumbles over the same error: specify your max number in the constructor of the HAMqtt object -> and done! :)

example:
HAMqtt mqtt(client, device, 32);

Make sure to check other issues as well. Some PR have not been integrated by the repo owner, in fact this repo seems dead :/