Thanks a lot for these very helpful explanations. I setup everything successfully but struggled in the last step of editing HA → Configuration → Customizations. I searched long and hard, but I did not find this option in my HA configuration. When I try to add the info into configuration.yaml directly, I get the following error message:
Invalid config for [sensor.template]: [state_class] is an invalid option for [sensor.template]. Check: sensor.template->sensors->gas_meter->state_class. (See ?, line ?).
Is there another way to change these attributes? Any help greatly appreciated!
I don’t have the ‘Customizations’ Option in my HA (I think it is because I updated to a newer version of HA), but the trick with editing the customization.yaml file worked like a charm. Thanks a lot!
Merry Christmas!
Great article and idea! Minor tweak to this… there isn’t even a need to rewire the sensor etc. You can just put it in the whole foreseen on these gas meters as depicted in the picture… Th cool thing of this sensor is that it has a small “hook/edge” on the board which allows it to lock into place.
In my case (I think it’s the same for you) the enclosure is in plastic so point 2 is indeed a non issue on this one. I do not see however how the humidity plays a role on this one compared to the external wire? (Maybe I’m missing something?). The only way to fix this would be indeed to raise the sensitivity of the sensor. I’ll do my testing with this setup first before bringing out my soldering wire again.
Can tell (and show) me which batteries you use now?
Thanks again for your tutorial as well as input @mpetcu!
If you read my posts form the beginning you will understand that in my case and everybody in my country has the same 3 points to resolve. My take on how to fix the issues are in the posts including the battery type.
The battery is an AA size LiFePO4 battery it has 3.2 nominal voltage, normal litium battery will not do as it is 4.2 nominal.
You can use 2x1,5v battery to get the 3v needed for the sensor.
Holder and battery was ordered from AliExpress for other projects. Search for Soshine 3.2V LiFePO4
As I specified there, I wanted a rechargable solution and LiFePO4 battery’s tend to work better at low temperatures, my sensor is outside and in the winter the temperature will go -15 sometimes (that is Celsius)
If you want to try the original battery is rated for 1 year in the sensor for sure it will last at least 3-4 months in this situation if the temperature is above 10.
Hi,
I configured the “Gasmeter” linke above. I Can´t configure the energy the gas consumption (in the right screenshot).
Or is there a mistake in the configuration?
In my case, if I configure counter value to be the same as gas meter, it is not working correctly, because it adds 1 m3 per each count. And then each count is multiplied by 0.01 in the sensor template. To make it a “real” counter, I could change steps to 0.01 m3 and remove template from the sensor config, but counter is not accepting 0.01 steps? Anyone has a working counter config to share, which is adding incremental values in the same way as gas meter?
Read first post, all the info is there, the counter increments only 1 but you create a template sensor from that with correct value, then you can sync the counter with the meter by adding to the counter two decimals that are on the meter.
Abslolutelly cool! Great job Marius!
Based on this info, I have managed to to use a Lidl Zigbee Magnetic conntact to read the water meter, for sure with an external reed, which I still need to fix permanentlly in place.
I have only 2 question:
How do I reset all the collected data? I did a lot of testing and for sure it’s not accurate anymore.
I’m using node red to increase the counter, and I would like to create a leakeage warning, if impulses are constanttly detected for more than 30minutes, means that there could be a leakeage and I want to be notified. Since I’m a beginner in Node Red, need some help where to start.