Hello Bernard
I will like more info on the water meter setup, I do not know if all water meters have the impulse. (some pictures will be useful here, I’m interested myself)
The collected data like history in sensors I do not know how to reset. The counter can be reset from Developer Tools → Services → Counter: Configure
I do not use Node Red, I never like it (don’t know why) but you can create an automation in HA. You can start here
The counter I did manage to reset, but I still have a 1m³ peak from day I did approach magnet to the sensor 100 times, just to check that I don’t miss any readings. Silly, I know. But was fun !
Regarding node-red, it’s great for rookies who never programed anything in their life and are to old and to busy to learn Thanks for the Link, it’s a good staring point!
Hi Folks - Thank you for this information! for our Australian folks:
I can confirm the aqara zigbee sensor (no need to change the reed sensor) works really well with the SPAusnet Meter : LANDIS + GYR Model 750 gas meter.
The Zigbee Sensor tucks under (with no shell) and can be blue-tacked in place. If you have access to a 3d printer probably could make a nice adaptor for it. I will report back how quickly the standard battery depletes.
I have found the solution to detect continous flow over a specific time. It was much easier than I thought.
The key is to use a message speed node, node-red-contrib-msg-speed. Now I’m getting a notification if the watter runs at a specific rate, above 5 minutes. Works surpringsly well, with the current setting is detecting only the shower usage, no washing machine consumption is detected. Will increase the time after the test phase.
I think something must have changed in HA in recent updates again because I read every post in this thread and I fail at last step, creating meter in configuration.yaml.
So if I put the below into my configuration.yaml, configuration file is valid and sensor.gas_meter appears in development tools and counts as I touch the aqara sensor with magnet.
#sensors
sensor:
- platform: template
sensors:
### Gas meter template from counter
gas_meter:
friendly_name: Gas Meter
value_template: "{{ states ('counter.gas_counter') | float * 0.01}}"
unit_of_measurement: "m³"
icon_template: "mdi:fire"
device_class: gas
It however won’t appear on the list of devices available devices in energy dashboard. If I understand correctly that is because I need state_class: measurement. If I however add it as new line under device class, config check fails with his 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 ?).
Hi Marius. Great project. Was struggling with using an esp-01 where the Aqara is in your project. Failed miserably! I’ve followed your instructions and other snippets in this blog to the letter and although I’m getting the open/closed status from the Aqara and I’m able to insert the counter into the Energy dashboard, I don’t seem to be getting any increments when I know I’m using gas. I too am using the Zigbee Dongle and getting a linkquality of about 10. I’m also getting messages in Node-Red but I can’t seem to filter out the ‘closed’ status to use the data elsewhere. I’ve gone over the instructions numerous times but still unable to make it fully work. Any advice?
Hello, my take is to dich all RedNode staff and just follow my automation for incrementing the counter.
Is just a simple automation can be created in the visual editor. If you get the open Open/Closed status you may need to replace it in the automation. My is based to on/off status.
Hi. You’re right regards Node-RED. I need to get the counter incrementing first! When I select Automations via Configuration there doesn’t seem to be one. So what’s the Counter created in Helper doing? Also I have cleared all references to the project in Config, customization and automation yaml’s and started again. In your Automation yaml you show line entity_id 0x158d000etc. Is the hex address unique to you as my door sensor has a slightly different 08a09f_contact. Is this relevant? Thanks for your advice, very welcome.
Found the Error. The underscore in counter.gas_counter is not allowed. Changed everything to counter.gas and it started working.
It’s counting but I don’t know if it is all set and done yet.
Is there a way to add my total m3 gas used (number from my analog gas meter) in a sensor and add the counter to that sensor too to see my total gas used on the go?
Eventually got this working. Binned Node_RED. Good call!. I have a request from any member of the forum: how can I create a counter in Lovelace which mimics the actual gas meter reading, example 23456.021? I understand that floats and counters per say don’t do decimals, so is my plan even possible? Anyone tried?
I have received today my aqara door sensor, but I have problems to get the counter correct into HA.
I have added the following into my configuration.yaml:
- platform: template
sensors:
### Gas meter template from counter
gas_meter:
friendly_name: Gas Meter
value_template: "{{ states ('counter.gaszaehler') | float * 0.01}}"
unit_of_measurement: "m³"
icon_template: "mdi:fire"
device_class: gas
When I check my configuration under server control everything is ok until here.