Recently version 2022.11 of Homeassistant supports the water energy meter, it is possible to recover the data easily using esp and that for around 10€. In my case the meter is equipped with a 433Mhz Itron Everblu Cyble 2.1 transmitter. This makes it easy to retrieve data using a CC1101 receiver coupled to an esp8266/esp32. I picked up and modified a complete repository on github that was edited by psykokwak, and I commend his work. This repository allows data to be received and transferred by mqtt to homeassistant.
File > Preferences and paste the above url in Additional Map Manager URL
Tools > map > map managers, search for esp8266 and esp32 and install the latest Espressif version
2. Install the espmqttclient library
Tools > Manage Libraries, search for espmqttclient and install the latest version
Select the right card in my case a wemos d1 mini pro on usb port
Connect your esp controller to USB
In the add /dev/USB0 card drop-down menu, start by selecting the card and checking the corresponding port.
Finally, Give permissions to the usb port
Créer un nouveau sketch et importer le dossier
Method 1:Download the git, extract it and drag it to the sketch folder on the Arduino interface, otherwise drop the folder directly at the root of the Arduino folder.
Method 2: Command line
Warning
Please upload the folder with name: watermeter2mqtt
As a reminder, this code collects consumption data once a day during meter reader working hours. ** Below I have set 2 p.m. UTC which corresponds to 3 p.m. France **
3 choices of scheduled reading or at each data update
By default the script updates as soon as the data changes, just uncomment onScheduled line 257 to 259 and comment onUpdateData
4 find the right frequency for your CC1101 transmitter
Just uncomment the code line 272-291
Push the code to your module then select Serial Monitor:
the result should look like the image below:
Once the code has been retrieved, remember to comment on these codes, otherwise you will not be able to upload the data later.
Important step, match the connections of the CC1001 to the GPIO of the esp module:
Let’s start by going back to the diagram available above, you will be able to realize that on a Wemos D1 for example that SCK corresponds to the GPIO14, Miso 12 etc… knowing that modifies lines 94 to 100 of the code available in this file. See the animated GIF below:
everblu_meters.h file
Code available on your itron module remember not to use the first 0.
at the very bottom of the file line 53-60
Push the project to the esp8266/esp32 module
All that remains is to validate the sketch project > check/compile or Ctrl+R, and if everything went well you should have the result
Then click upload: sketch > upload or Ctrl+U
result:
Check serial monitor
Last step upload the info in the energy meter
In homeassistant go to Settings > Dashboards > Energies
Add a water source
Select Water meter index
Final result in energy consumption
Frequently Asked Questions
Data characteristics and frequencies
this repository allows to retrieve:
consumption volumes
Everblu battery level
the number of statements
the time at which the readings were taken.
The device polls the counter once a day, every 24 hours, and retries every hour if the query fails. Your counter can be configured in such a way that it only listens to requests during the hours when the meter readers are working. This is to save the batteries of the modules. If you are unable to communicate with the meter, please try again during business hours (8:00 a.m. to 4:00 p.m.), Monday through Friday. As a general rule, try to set up your device only during business hours to avoid confusion.
Frequency Calibration 433Mhz
Your transceiver module may not be calibrated correctly, please change the frequency a little lower or higher and try again. You can use RTL-SDR to measure the necessary offset. You can uncomment the part of the code in the watermeter2mqtt.ino (see above), file which analyzes all frequencies around the meter frequency to find the correct one.
wemos mini D1 pro esp module with antenna
By Estardyn
Renowned esp8266 development module wemos D1 mini pro with antenna to best capture wifi waves
This is a simple method to set up, for those who are not equipped with an Itron Everblu Enhanced transmitter, there is another method which consists of putting an inductive sensor directly on the meter and connect it to an esp8266, this method is a little more restrictive because it will be necessary to have a source of energy near this meter in order to be able to supply the esp and the sensor with 5V, the price of the whole also oscillates around 10€, an excellent article is available here pieterbrinkman.com
In order to best prepare for the next Live, and always with the aim of deepening our knowledge of the modules in the Sonoff range, we will try in this...
After 9 months of installation, August returns to take stock of the youtube channel to talk to you about energy savings achieved thanks to a Home Assistant home automation installation....
Comments