Sign inSign up

buffertly/w1k-ha

By buffertly

Updated almost 4 years ago
Archived

Pulls data from a W1000 portal report and sends its last value to Home Assistant via its REST API.

Image
0

2.4K

buffertly/w1k-ha repository overview

w1k-HA

Pulls data from a W1000 portal report and sends its last value to Home Assistant via its REST API.

Source code: https://gitlab.com/zsombibi/w1k-ha (you can find some Rezsidémon Home Assistant YAML examples as well)

Prepare data sources

  • Register and log in to your provider's portal (e.g. https://energia.eon-hungaria.hu/W1000 in Hungary)
  • Create a new Workarea (use any name)
  • Add a report to your workarea (e.g. HU0XXXXX-1:1.8.0*0 is the total power consumption counter of your electricity meter). Remember this report name, you will need it later.
  • Add exactly one curve to your report. I recommend setting a 3-day interval.

You can create more reports on any workareas, just make sure you have exactly one curve at a report.

Allow Home Assistant to receive data

  • In your Home Assistant, under your profile -> Long-Lived Access Tokens , create a new one for this purpose.

Create a docker container

This repository builds a docker image at Docker Hub, so the easiest way is to use it:

$ docker run --rm -it -e W1K_USER=xxx -e W1K_PASS=yyy ... --name w1k-ha buffertly/w1k-ha

Of course there are some mandatory environment variables. Double-check the values are present and valid, as the code does not handle errors quite user-friendly.

W1K_USER        loginname or email for the W1000 web portal
W1K_PASS        password for the W1000 web portal
W1K_REPORTS     report name (or names, separated by commas)
W1K_HA_URL      your Home Assistant URL
W1K_HA_TOKEN    the Long-Lived Access Token you generated

Optional:

W1K_URL         W1000 web portal URL. Defaults to https://energia.eon-hungaria.hu/W1000

If everything goes well, the container logs what has been done:

HA sending result: {'attributes': {'friendly_name': 'w1000 óraállás', 'state_class': 'measurement', 'unit_of_measurement': 'kWh', 'unique_id': 'w1000_ralls', 'curve': 'H
U000210F11-E651785238420-6000022 DP_1-1:1.8.0*0', 'report': 'óraállás', 'time_generated': '2022-09-28T00:00:00', 'device_class': 'energy'}, 'state': 540.2} <Response [20
0]> {"entity_id":"sensor.w1000_ralls","state":"540.2","attributes":{"friendly_name":"w1000 óraállás","state_class":"measurement","unit_of_measurement":"kWh","unique_id":
"w1000_ralls","curve":"HU000210F11-E651785238420-6000022 DP_1-1:1.8.0*0","report":"óraállás","time_generated":"2022-09-28T00:00:00","device_class":"energy"},"last_change
d":"2022-09-28T06:30:47.317180+00:00","last_updated":"2022-09-28T07:38:54.569750+00:00","context":{"id":"01GE1GHJ79XHFY0CQWJVXQQDJE","parent_id":null,"user_id":"241fb75f
23734663ac1030ad684daefc"}}                                                                                                                                              

In Home Assistant, you will find new sensor entities for all reports. Please note, non-ascii characters are truncated in the entity names.

The container exits immediately, so you have to create or re-start it periodically.

Tag summary

Content type

Image

Digest

sha256:ca1f2e55d

Size

24.6 MB

Last updated

almost 4 years ago

docker pull buffertly/w1k-ha