I tried two different ESP8266 boards and got “Connection error occurred: EOF received” in logs.
Update:
I took the eZB DD3 template which has a lot of lines of code. After commenting out the most of it, I could get it working with a esp8266.
Maybe too less power to be able to use so much sensors?
First of all, thanks a lot for your excellent ESPHome OBIS implementation!
I just recently got a eBZ DD3 smart meter and had to integrate it into HA of course. Stumbled across your github, figured, why use it when there’s a native ESPHome SML component… Took me a day of cursing to realize that SML != OBIS… Lol. Didn’t realize at first that there’re different versions of the DD3 (although the manual clearly states it).
Anyway, just wanted to let you and others know that the ESP8266 (I’m using a NodeMCU v2) is well capable of dealing with all the sensors. I did have plenty of issues with incomplete telegrams in the beginning as well, but finally sorted them out.
Placement of the photo diode on top of the DD3 is very important. 1mm off (in X/Y/Z) and it might not work properly.
After everything was working fine with my rigged setup, I installed the reader assembly into my 3D printed housing (wll publish it later for anyone who’s interested) and it was working quite unreliably, although placement of the phote diode was perfect. Thought it was an intermittent issue with a broken wire or something like that, but after replacing everything, it was still not working properly. Then I remembered that I’ve blocked the port for the sending LED of the reader head with some tape with my first test setup, just for good measures. Turned out when the sending LED is not connected to the ESP, it would always emit light. Dunno if that was causing interference with the receiving diode or if the DD3 got confused. After connecting it, all was golden again (or just block it with tape)…
Not sure if this is important, but I guess it’s better to use the hardware UART. On the ESP8266 that’s GPIO3 for RX and GPIO1 for TX. Just make sure to use UART1 for logging. Also, I set the receive buffer to 512 (again, no clue if this is required), since the max telegram size is ~400 bytes if I’m not mistaken.
I’ve included my yaml below for anyone who might be interested (basically the one Steffen provided)…
Hi, I am a new user of home assistant and I’d like to get the results of my eBZ DD3 Drehstromzähler too. My setup differs, I do use an ir sensor connected via USB to my computer. I can access the results of the smart meter. A simple ‘cat /dev/ttyUSB0’ shows the results, like “1-0:1.8.0255(000229kWh)”. Of course, my smart meter does not yet show all data, I am still waiting for the pin.
Can you please help me what do I have to change in your code to get the results from the serial port without using ESPHome?
No offense and don’t get me wrong, but don’t you think it would be easier to just spend 30 bucks on an UART sensor and an ESP8266 to have a working template instead of asking for detailed help on a kinda different subject in apparently the wrong thread?
Sorry for asking here, but for me it looked like it’s an “easy” task to adapt the configuration.yaml to use a serial port instead of the esp8266 stuff.
On the other hand, I#d like to learn about home assistant and saw that this project uses a complete other configuration.yaml syntax than the one mentioned. My hope was to understand the project as good as necessary to adopt the configuration.yaml to use a serial port instead of ESP8266.
And reusing available resources is imho better than buying new ones.
Hi, do you mean as an official component of esphome (instead of an external component)?
Well, I have some experience with that and it always caused me a lot of extra work, with less flexiblity. As I do this in my rare spare time I don’t want to spend more time at the moment. Sorry.
Quick note for anyone trying this on an esp8266:
The regex checking is very slow, when using it for all sensors (in my case 9 sensors, 2 for energy, 4 for current power (total + 1 for each phase), 3 for voltage on each phase), the esphome device (esp8266) loses Wifi from time to time and will fail to show logs in esphome and also fail to update via OTA.
Easiest solution is just to use the regex checking on the “important” sensors (e.g. the energy sensors) and not use it on the instantaneous sensors (power, voltage) as those don’t tend to cause issues if they might show a wrong value once in a while (although so far it seems to be rock-solid)
(or of course you could use an esp32 to get the required horse power )
nice component, worked directly out of the box - thank you.
But I have a problem,
the entity for “power” does not provide a value.
yes, i unlocked it with the PIN and the actual power value
is shown on die Display of the smart meter.
The software runs on an d1 mini (az delivery).
FYI: My smart meter (different vendor) has the following problem: It forgets the INF configuration when there is a power outage. So I always have to reconfigure…
Dear all,
thx for this nice component - unfortunately it does not work for me
Hope you could help me: No matter what I do, I always get "[22:30:00][D][obis_d0:152]: abort"
in the logger. I tried different things, but apparently the data is not comming through. Using NodeMCUv2 (ESP 8266) with the exact example as given by judges.
Any idea where I should be looking at?
Update: Found that my meter uses SML and code 1_8D_0P_N_1S for serial coms.
Meter name: ebz dd3 2r06 dta smz1
How do I activate that in the above example? Thx!