Sorry, I couldn’t find any trigger option in the code. So I had to do manual change of the program to get my first reading.
For the first time to get make sure the MQTT is sending the sensor details, I did call onUpdateData(). Once I am happy with the readings, i changed the code back to onScheduled();, which calls for meter reading daily.
My water company just replaced the meter because they couldn’t read it twice in a row, 2 months apart. Meanwhile I could read it every day. Does any of you had this issue?
13:30:43.643 → Connected to MQTT Broker
13:30:43.643 → > Configure time from NTP server.
13:30:43.643 → > Configure Arduino OTA flash.
13:30:43.643 → > Send MQTT config for HA.
13:30:46.716 → Current date (UTC) : 2022/10/15 11:30:45 - 1665833445
13:30:46.716 → Unable to retrieve data from meter. Retry later…
13:30:59.812 → Current date (UTC) : 2022/10/15 11:30:58 - 1665833458
13:30:59.812 → Unable to retrieve data from meter. Retry later…
16:58:29.996 → Connected to MQTT Broker
16:58:29.996 → > Configure time from NTP server.
16:58:29.996 → > Configure Arduino OTA flash.
16:58:29.996 → > Send MQTT config for HA.
16:58:33.286 → Current date (UTC) : 2022/10/17 14:58:33 - 1666022313
16:58:33.286 → Unable to retrieve data from meter. Retry later…
16:58:46.362 → Current date (UTC) : 2022/10/17 14:58:46 - 1666022326
16:58:46.362 → Unable to retrieve data from meter. Retry later…
16:58:59.423 → Current date (UTC) : 2022/10/17 14:58:59 - 1666022339
Then you see in the Arduino serial monitor if you can connect to your meter or not. Before you don’t have your frequency you wont see anything via MQTT.
I have this up and running now, anyone know how to add the water meter reading in litres to the new 2022.11 water integration in the energy dashboard ?
Thanks for the reply, I also asked in the release page. I just needed to create a template sensor (divided by 1000) with state_class: total, device_class: water and unit_of_measurement: m³ and it picked it up.
I can’t find a sensor for the water meter in the energy dashboard.
I have the following sensors (2 is to try some things)
anyone have an idea what i’m doing wrong?
Do you have open fixes in Dev Tools > Staistics regarding one of those sensors? If yes need to be fixed otherwise the sensor is not displayed in the pick list in the energy dashboard.