P1 meter reading with ESP8266 to domoticz
Moderators: grovkillen, Stuntteam, TD-er
P1 meter reading with ESP8266 to domoticz
Good morning!
I have been trying to read out my electricity meter using the P1 port with an ESP8266/wemos d1 mini look-a-like I had laying around and sending its data to domoticz.
I've flashed it with esp easy firmware: mega_20210114_normal_esp8266_4m1m
I've found a lot of tutorials on the internet so I'm following those a lot but it's just not working. Made a little circuit using an BC547 to flip the ones and zeros.
I assigned my domoticz as controller (http) on the tab and added a P1 wifi gateway to the devices. Found the serial parameters for my meter so those should be correct.
Setup domoticz to allow new devices and made a new hardware entry with P1 wifi gateway. In the log I can see it connects to the ESP but it's not getting any data from it since it hasn't added the meter values itself.
To test my setup tried an usb to ttl and realtherm connected to the P1 meter and to the esp but without results. If anyone could help me with what could be wrong that would be greatly appreciated.
I have been trying to read out my electricity meter using the P1 port with an ESP8266/wemos d1 mini look-a-like I had laying around and sending its data to domoticz.
I've flashed it with esp easy firmware: mega_20210114_normal_esp8266_4m1m
I've found a lot of tutorials on the internet so I'm following those a lot but it's just not working. Made a little circuit using an BC547 to flip the ones and zeros.
I assigned my domoticz as controller (http) on the tab and added a P1 wifi gateway to the devices. Found the serial parameters for my meter so those should be correct.
Setup domoticz to allow new devices and made a new hardware entry with P1 wifi gateway. In the log I can see it connects to the ESP but it's not getting any data from it since it hasn't added the meter values itself.
To test my setup tried an usb to ttl and realtherm connected to the P1 meter and to the esp but without results. If anyone could help me with what could be wrong that would be greatly appreciated.
Re: P1 meter reading with ESP8266 to domoticz
Does the log show any entries like "unknown command" ?
If so, then you must uncheck "Enable Serial port" on Tools -> Advanced. (Web interface)
If so, then you must uncheck "Enable Serial port" on Tools -> Advanced. (Web interface)
Re: P1 meter reading with ESP8266 to domoticz
What meter do you have?
What do you see when you access your device at http://ipaddress:8088 (or whatever TCP port you configured for your Communication - P1 Wifi Gateway)
It should (after a small delay) show the 'Telegram' data (that is what Domoticz is polling)
What do you see when you access your device at http://ipaddress:8088 (or whatever TCP port you configured for your Communication - P1 Wifi Gateway)
It should (after a small delay) show the 'Telegram' data (that is what Domoticz is polling)
Re: P1 meter reading with ESP8266 to domoticz
I have a landis gyr E350 ZCF110.joppybt wrote: ↑17 Feb 2021, 23:10 What meter do you have?
What do you see when you access your device at http://ipaddress:8088 (or whatever TCP port you configured for your Communication - P1 Wifi Gateway)
It should (after a small delay) show the 'Telegram' data (that is what Domoticz is polling)
I'll post what's on that website when I get home later!
Re: P1 meter reading with ESP8266 to domoticz
Wasn't able to test this anymore yesterday, but when I navigate to that page its not sending any data is what my browser tells me.
Re: P1 meter reading with ESP8266 to domoticz
My guess: somewhere there is an error in the wiring up.
Re: P1 meter reading with ESP8266 to domoticz
when i first connected my RFXTRX433XL to my meter i did not have any readings either.
it turned out that the unit used a 10k pullup resistor which limited the current to much.
i replaced it with a 2K2 resistor(as advised by the makers of RFXTRX433XL) and then i got good readings.
in my case i got a string reading but just a tiny character got distorted and because of that nothing worked(because the string was corrupt)
if you have a usb-serial cable to RJ11 you could always hookup a notebook with a terminal program to see if there is anything coming out of that meter
also it is a good way to see what the right baudrate is
it turned out that the unit used a 10k pullup resistor which limited the current to much.
i replaced it with a 2K2 resistor(as advised by the makers of RFXTRX433XL) and then i got good readings.
in my case i got a string reading but just a tiny character got distorted and because of that nothing worked(because the string was corrupt)
if you have a usb-serial cable to RJ11 you could always hookup a notebook with a terminal program to see if there is anything coming out of that meter
also it is a good way to see what the right baudrate is
Re: P1 meter reading with ESP8266 to domoticz
Wait you opened the meter to replace the resistor?
I have a USB to TLL adapter and tried to view the data with Realtherm but that didn't work either... But if the circuit is wrong it won't display anything I suppose.
Alright just tested it with an Arduino to the meter, and didn't get any data as well.
I used an RJ126P6C connector on a solid CAT5 cable so I can just put the pins in a breadboard.
I've used the below circuit, with my ESP8266 I just a BC547 as well.
So strange it doesn't work, when I google my meter people seem to get it to work easily...
Re: P1 meter reading with ESP8266 to domoticz
that looks right with the following remarks.
i do not think you need to feed 5v into the meter.
there is always a risk of blowing up things
also mixing 5V and 3.3 volt without shielding those might cause problems if it is coming from the same source(the ESP)
with my setup the 10k did not work and i needed to use a 2K2 but this might be RFXTRX433 specific.
Edit, i see you hook it up to an arduino)
are you using a RJ11 to USb cable for this (one which an serial chip inside?)
if you are using a RJ11 to serial cable then you need to connect it to a serial port(and those are not available anymore on the latest notebooks)
this site also metions an 1k resistor between RTS and RX
maybee try that, just 2 cables from the meter(3GND, 5 RX)
10k pullup from RX to 3.3 volt and 1K between RTS and RX
i do not think you need to feed 5v into the meter.
there is always a risk of blowing up things
also mixing 5V and 3.3 volt without shielding those might cause problems if it is coming from the same source(the ESP)
with my setup the 10k did not work and i needed to use a 2K2 but this might be RFXTRX433 specific.
Edit, i see you hook it up to an arduino)
are you using a RJ11 to USb cable for this (one which an serial chip inside?)
if you are using a RJ11 to serial cable then you need to connect it to a serial port(and those are not available anymore on the latest notebooks)
this site also metions an 1k resistor between RTS and RX
maybee try that, just 2 cables from the meter(3GND, 5 RX)
10k pullup from RX to 3.3 volt and 1K between RTS and RX
Code: Select all
https://shoarma.home.blog/p1-kabel-landis-gyr-e350-zcf110-dsmr-4-04-2/
Re: P1 meter reading with ESP8266 to domoticz
Thank you for the tip, I'll try it out in a bit.GravityRZ wrote: ↑20 Feb 2021, 11:56 that looks right with the following remarks.
i do not think you need to feed 5v into the meter.
there is always a risk of blowing up things
also mixing 5V and 3.3 volt without shielding those might cause problems if it is coming from the same source(the ESP)
with my setup the 10k did not work and i needed to use a 2K2 but this might be RFXTRX433 specific.
Edit, i see you hook it up to an arduino)
are you using a RJ11 to USb cable for this (one which an serial chip inside?)
if you are using a RJ11 to serial cable then you need to connect it to a serial port(and those are not available anymore on the latest notebooks)
this site also metions an 1k resistor between RTS and RX
maybee try that, just 2 cables from the meter(3GND, 5 RX)
10k pullup from RX to 3.3 volt and 1K between RTS and RX
Code: Select all
https://shoarma.home.blog/p1-kabel-landis-gyr-e350-zcf110-dsmr-4-04-2/
Don't think I have a 2k2 resistor laying around so I'll just put two 1k in series, should be close enough I suppose.
Re: P1 meter reading with ESP8266 to domoticz
and do not forget the 1k between and rx
Re: P1 meter reading with ESP8266 to domoticz
Alright so I put the 1k resistor between RX and RTS, and 10k between TX of the meter and RX of the arduino.
I did give me serial available this time which it didn't do yesterday, but the content was empty...?
So it's a step closer I suppose
I did give me serial available this time which it didn't do yesterday, but the content was empty...?
So it's a step closer I suppose
Re: P1 meter reading with ESP8266 to domoticz
Maybe signal is inverted?
Re: P1 meter reading with ESP8266 to domoticz
Or perhaps a newer version with a protocol that's not (yet) implemented in this plugin?
Re: P1 meter reading with ESP8266 to domoticz
Alllright, so I contacted the supplier today.
Asked if maybe the readout was disabled but it looked all good on their end.
So I connected only a 1k resistor between RTS and RX, then 2 jumper cables from RX and GND to my usb to serial adapter.
See the result below. When I jumped the 5V and RTS another one of those symbols popped up and that was it.
But when I tried connecting an Arduino to that same circuit it didn't receive anything.
Asked if maybe the readout was disabled but it looked all good on their end.
So I connected only a 1k resistor between RTS and RX, then 2 jumper cables from RX and GND to my usb to serial adapter.
See the result below. When I jumped the 5V and RTS another one of those symbols popped up and that was it.
But when I tried connecting an Arduino to that same circuit it didn't receive anything.
- Attachments
-
- Capture2.PNG (18.43 KiB) Viewed 24357 times
Re: P1 meter reading with ESP8266 to domoticz
and if you loose the 1k resistor(so basically only connect TX and GND)
also note that eveybody is talking about the RX but this is the RX of the terminal
The meter only has a TX which needs to connect to the RX pin on your usb-serial cable
one mistake which is often made because it is so simple.
also note that eveybody is talking about the RX but this is the RX of the terminal
The meter only has a TX which needs to connect to the RX pin on your usb-serial cable
one mistake which is often made because it is so simple.
-
- Normal user
- Posts: 11
- Joined: 05 Nov 2018, 17:02
Re: P1 meter reading with ESP8266 to domoticz
you should NOT connect pin 1 and pin6
this works for me, but you may need the 2k2 pull-up on pin5 internal view of meter
this works for me, but you may need the 2k2 pull-up on pin5 internal view of meter
Thanks for reading,
regards,
Rob
regards,
Rob
-
- New user
- Posts: 3
- Joined: 16 Jun 2022, 11:34
Re: P1 meter reading with ESP8266 to domoticz
Hi,
I am coming back here as I am trying to access my smart meter too.
I am using a M5Stack Atom with Build: ESP_Easy_mega_20220616_test_A_ESP32_4M316k.
I am not receiving any data. I created a circuit as described but I cannot get any signal.
I also tried to use the USB to RJ11 cable but really unsure how I should configure ESPeasy to use it.
Does anyone have experience with that, if it's even possible ?
Could someone provide an example of hardware setup and settings used as I am a bit at a loss at the moment.
I can connect successfully using a PC to the P1 port so I can confirm the port is active and sending data.
Thanks in advance
I am coming back here as I am trying to access my smart meter too.
I am using a M5Stack Atom with Build: ESP_Easy_mega_20220616_test_A_ESP32_4M316k.
I am not receiving any data. I created a circuit as described but I cannot get any signal.
I also tried to use the USB to RJ11 cable but really unsure how I should configure ESPeasy to use it.
Does anyone have experience with that, if it's even possible ?
Could someone provide an example of hardware setup and settings used as I am a bit at a loss at the moment.
I can connect successfully using a PC to the P1 port so I can confirm the port is active and sending data.
Thanks in advance
-
- New user
- Posts: 3
- Joined: 16 Jun 2022, 11:34
Re: P1 meter reading with ESP8266 to domoticz
To add to this, with a friend's help we hooked a raspberry board to the breadcrumb board to get a view of the buffer received and after a few tweaks we got the data flowing on the raspberry console.
But still no data coming out of the Atom Lite.
I connected a M5Stack basicI just bought and was able to get live data on it so there must be something specific to the Atom board..
This is what worked for me:
pin 2 -> 5V (from pin 1)
pin 5 connected to the base pin of transistor
from transistor base, 1K resistance to wire going to GPIO AND wire with 1K resistance going back to collector pin
from emitter pin, wire going to GND
on the M5Stack, 1 cable for GND and Data from board.
I can power the board using 5v and GND from P1 to another GPIO range (another side).
thanks
But still no data coming out of the Atom Lite.
I connected a M5Stack basicI just bought and was able to get live data on it so there must be something specific to the Atom board..
This is what worked for me:
pin 2 -> 5V (from pin 1)
pin 5 connected to the base pin of transistor
from transistor base, 1K resistance to wire going to GPIO AND wire with 1K resistance going back to collector pin
from emitter pin, wire going to GND
on the M5Stack, 1 cable for GND and Data from board.
I can power the board using 5v and GND from P1 to another GPIO range (another side).
thanks
Who is online
Users browsing this forum: No registered users and 20 guests