TLDR; Integrate a SlimmeLezer+ through the ESPHome integration into a HA in a docker container on a Synology NAS. the SL+ connected to a Aidon 6534. No add-ons. TLDR;
I have a synology NAS onto which I have installed HA as a docker container, i.e. not as a supervised installation, i.e. I cannot have add-ons.
I also got a SlimmeLezer+ to connect to my Aidon 6534 that uses Swedish protocol and HDLC (Tekniska Verken, Linköping).
The SlimmeLezer+ works as advertised out of the box and supplies the AP with the captive portal etc. Everything works fine, apart from that the reported data into HA from the SlimmeLezer+ are all “unknown”.
Some googling later and I have realised that the SL+ initial conf etc does not support the communication from the Aidon 6534. However there are threads explaining how to get this to work, for example: this.
However, Since I cannot add add-ons it fails.
I have tried to fire up an instance of ESPHome on my local machine where I can find, adopt and fiddle with the SL+. However, when I compile a new version with a YAML with the needed changes it only results in a successful compilation that does not connect to my network, does not produce a fallback AP and I cannot see that it communicates with the Aidon in the logs.
So, any ideas how to get this to work?
The target being: Integrate a SlimmeLezer+ through the ESPHome integration into a HA in a docker container on a Synology NAS. the SL+ connected to a Aidon 6534. No add-ons.
Alright. The steps I needed to perform to get the SL+ to work in Sweden with an Aidon 6534 electricity meter.
Download and make available ESPHome. It is a Python package, and therefore I would recommend that you install it in a virtual env. I personally use miniconda and it works great.
Clone the Forsberg fork of the esphome-p1reader repository. The main repo of the esphome-p1reader says that it works with Aidon 6534 and there is also a merge that supports this claim. However, when inspecting the code there is no resemblance between the main repo and the Forsberg fork, and I cant make the main repo work. It flashes OK but the SL+ never starts afterwards.
Update the p1reader.yaml such that it is line with your needs.
The readme of the main repo says that you should change the row auto meter_sensor = new P1Reader(id(uart_bus)); to auto meter_sensor = new P1ReaderHDLC(id(uart_bus));. DONT! Since this class does not exist in the Forsberg repo (the base P1Reader supports HDLC).
I didn’t use the secrets.yaml trick. I guess that you can if you like.
Start a terminal of choice. Navigate to the root where you cloned the Forsberg repo. Plug the SL+ into the computer with a cable. Run the command esphome p1reader.yaml run
Note that this is a deprecated command and a warning will be issued, but it is expected as the Forsberg fork seems to be a non-maintained fork.
Wait and issue the flash over cable when the choice is presented to you.
The software will end with “INFO UART logging is disabled (baud_rate=0). Not starting UART logs.”.
Unplug the SL+ and plug it into the Aidon 6534. It should now show up in your Home Assistant with numbers.
My p1reader.yaml
Change the to reflect your passwords and ssids. The passwords for the AP and the OTA can be chosen freely.