Different code but it seems to have some similarities. The calibration code is very different. Mine you just have to press a button and it will auto detect which axis to use and what thresholds.
1 Like
Trying out your code now and at the stage of trying to figure out volume per half rotation. Any hints at what number to set this to based on specs I found from blow document?
I am thinking it should be 0.001785 cubic meters per half rotation.
Not sure. The most common value for gas meters, at least in US, is 0.125 ft³ per half rotation or 0.0035396 m³ per half rotation. Your number is almost half of that. I recommend starting with 0.0035396.
If you haven’t already seen it, read the following section in the README
Volume per half rotation
This depends on your specific water/gas meter model and its size.
To calibrate:
- Temporarily enable the “Half rotations total” sensor in HA.
- Write it down and also write down the reading on your water/gas meter.
- After a few hours or even days of regular water/gas usage, write down both of them again.
- Set this to the result of: diff of readings in volume_unit divided by diff of half rotations.
- Disable the “Half rotations total” sensor in HA.
1 Like