Smart meter with vzlogger/live energy use as a sensor

Thank you for this post. I’m also interested it realizing this. How is yours running? Is there any changing in your setup, now after 4 years?

Acutally it is running very well. The raspberry pi was never touched since I posted this here, and the setup proved very reliable after an alignment problem within the first days. The head was not fixed in the right position, so it lost signal sometimes. I solved this by glueing a steel washer to the meter, where the head would be fixed more precisely (it has a strong magnet, my meter is plastic though, so I needed the washer)

Live display in history, peaks are washing machine and the oven:

Photos (the blue box holds the raspberry pi with an serial adapter. The pink cable is a serial interface to the readout head).



Recently I learned of another solution to parse the format of the meters, I will try to find it again and post it here. I do not have any need for an alternative, because my solution runs fine without any problem, and vzlogger was basically painless.

1 Like

Thank you mate! My plan was to run vzlogger on a esp32, but I can’t find anything about this in the internet. Running just volkzähler on my raspberry is a bit oversized, since my home assistant is running on my Synology :slight_smile:

A raspberry is probably oversized for vzlogger. It has practically no load (loadaverage of 0.02 or so. Never tried vzlogger on an esp32 though.

I have an electricity meter from Logarex which only sends when requested. With the IR meter from Weidmann, I get a response from the meter in OBIS protocol via the test tool. My problem now arises as I get the data in Home Assistant, which also runs on a Raspberry. The IR meter is also connected to the USB interface of the Raspberry. Actually, that’s an ideal basic function. Unfortunately, due to my knowledge, it is not possible to get the meter data in Home Assistance. Ideally, I also have the InfluxDB database running in the Docker of a NAS. The data from the electricity meter should then enter here. Maybe someone can help me to get the data in Home Assistant at all?

my vzlogger runs at a seperate Raspberry with this Image:
https://wiki.volkszaehler.org/howto/raspberry_pi_image

Home Assistant runs at other Raspi and with this instruction it works fine:

but I miss some points:

  • presentation in table (weekly, monthly consumption)
  • actual consumption in Watt

I am actually using a shell script to collect the data of the Smart Meter and forward via RestApi to Home Assistant and InfluxDB. The Smart Meter is also connect via USB Port directly at the Raspberry. All works on one Raspberry. At present it works fine for me. I could share the script ASAP.

This would be great if you can share your configuration and script.

I am also interested in the script to capture my Smartmeter data via IR reader (Weidmann) directly on the device where HA is running. Currently I have Volkszaehler running but it seems that the integration to HA is a little buggy as I get “entity not available” errors from time to time. All in all VZ might be oversized and also seems old fashioned to me at least for my use case.

@nuki47 @Jim_Tonic I have test the script for a short time and it seems to run without any problems. Please refer to the project site for downloading and testing on your own.

1 Like

@Cavekeeper many thanks for the sricpt. I do have exactly the same setup as you have and I installed the script but no sensor is being created. I opened an issue on your github project site. Would be great if you can have a look.

@nuki47 & @Jim_Tonic did you also install the script? Did it work for you?

I have a different energy meter (eBZ) so I guess I need to dig a little deeper into @Cavekeepers script (e.g. find the proper stty settings). Will keep you posted.

Hi, I also setup vzlogger with home assistant. I am using a USB IR dongle that I bought. Software-side I

  • created a Docker with the newest vzlogger (see pull request https://github.com/volkszaehler/vzlogger/pull/448 ). This is helpful to avoid having all dependencies and scatter install files in my Raspi, so I can run it along my other docker stuff.

  • used MQTT to pass data to the Mosquitto Broker Addon and from there pulled it directly into Homeassistant.

(before that I used http push -> Node Red -> MQTT -> homeassistant auto discover, but it is easier to go directly to MQTT and avoid http completely).

Basically this is what is needed in the vzlogger.config, take a look at the mqtt section. You can also (in the meters) specify aggregation intervals (mean or max) to avoid sending too much unneeded data.

And in Homeassistant the usual setup, google: homeassistant mqtt sensor

I also (using statistics) have a 24h difference computation, to see how much power I use each day.
Am pretty happy with this setup.

Hey @Highwind,
thanks for this great idea.
Actually, I try to run the same but have several problems and questions:

  • are you running the vzlogger docker on the same raspi as your homeassistant ?
  • do I need to configure middleware or how can I deactivate?
  • What UUIDs do I use? Just create some randomly?
  • Can you please post or send your complete config again? It is somehow cut here in the forum
    Thanks a lot,
    Michael

Hi @MichiW1 ,

  • yes, running on the same raspi. But since it pushes via MQTT it can be anywhere I guess.
  • no middleware, just run vzlogger with the config as above. Don’t install middleware at all.
  • UUID whatever you want
  • There is a link underneath the file “show original” which will show the complete config.

One thing: For me vzlogger frequently hangs and I don’t know why. Simply restarting fixes it. Could be my hardware sensors are not working nicely with it. Not sure.

Also I was trying to create an HomeAssistant AddOn Docker. That would mean it will run on the same raspy but the advantage is, when it hangs one could automatically restart the add-on. I did not get it to work yet, but will post here if I ever do.

Hey guys,
I got the homeassistant Add-on working. It runs a vzlogger on the same machine (so your IR readers need to be installed on the same computer). Here is the link for the repository in Supervisor:

just add it and you can then install the vzlogger2mqtt addon. Currently, not all Arch compile due to problems with Alpine time , but I am working on it. ARM works (so raspi should work). Using a multi-stage docker file I was able to create a really small docker image.

2 Likes

Amazing! thank you so much for this. it is exactly what I was looking for and I’m so glad someone’s already done this and shared it.

can some of you post here what IR reader i need to buy? I would love to build it. I have the pretty common Landis+Gyr E450.

I really like this addon. It saves me a lot of time. Thank you very much.