dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
521 stars 121 forks source link

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

Closed yannicksuter closed 10 months ago

yannicksuter commented 10 months ago

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?

yannicksuter commented 10 months ago

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
yannicksuter commented 10 months ago

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);

morganzion commented 10 months ago

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