Protocol for P1 over LAN Topic is solved
Moderator: leecollings
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Protocol for P1 over LAN
Where can I find documentation about the protocol to use between the Smartmeter and the P1 over Lan.
In other words what does Domoticz expect to see from the IP and Port as configured in the P1 over LAN sensor.
In other words what does Domoticz expect to see from the IP and Port as configured in the P1 over LAN sensor.
- erem
- Posts: 230
- Joined: Tuesday 27 March 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Amsterdam/netherlands
- Contact:
Re: Protocol for P1 over LAN
Domoticz expects to see the full P1 telegram.
specs here: https://www.netbeheernederland.nl/_uplo ... 566986.pdf
specs here: https://www.netbeheernederland.nl/_uplo ... 566986.pdf
Regards,
Rob
Rob
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: Protocol for P1 over LAN
Rob, this is not really my question.
I know what to supply to Domoticz using P1 via USB.
Also I wrote my own program in Python using MQTT and JSON to supply the data to Domoticz.
I changed the physical location of the system where Domoticz is running.
So now I want to use the P1 over LAN feature of Domoticz.
So the question is what should I build in order to supply the data over LAN.
I prefer to use an ESP12 and power it from the P1 port of the meter.
At the moment I have an ESP12 running and it supplies the data using the JSON methods.
So not using the P1 over LAN feature.
I hope you understand my question now.
Willem
I know what to supply to Domoticz using P1 via USB.
Also I wrote my own program in Python using MQTT and JSON to supply the data to Domoticz.
I changed the physical location of the system where Domoticz is running.
So now I want to use the P1 over LAN feature of Domoticz.
So the question is what should I build in order to supply the data over LAN.
I prefer to use an ESP12 and power it from the P1 port of the meter.
At the moment I have an ESP12 running and it supplies the data using the JSON methods.
So not using the P1 over LAN feature.
I hope you understand my question now.
Willem
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Protocol for P1 over LAN
Probably your best chance is to look at the hardware sourcefiles and search for the P1Meter sources (.cpp and .h)willem9136 wrote: ↑Tuesday 02 February 2021 22:43 At the moment I have an ESP12 running and it supplies the data using the JSON methods.
Just curious; why do you want to use another method then the JSON approach?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: Protocol for P1 over LAN
Waaren, the reason I want to use the P1 over LAN is that I think the single sensors like GAS and POWER etc do not process the High and Low tarif.
Before I used the P1 over USB and the graphs showed nicely a 2 color graph for High and Low tarif.
I looked at the website of Thingies or something like that. It scarred me by seeing this very large amount of files they use to interface the data from the meter to the P1 over LAN sensor. There fore I am very curious to find the protocol needed for this.
Before I used the P1 over USB and the graphs showed nicely a 2 color graph for High and Low tarif.
I looked at the website of Thingies or something like that. It scarred me by seeing this very large amount of files they use to interface the data from the meter to the P1 over LAN sensor. There fore I am very curious to find the protocol needed for this.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Protocol for P1 over LAN
If you look at the API call for Electricity P1 smart meter at Domoticz API/JSON URL's wiki page you will see that High and Low tariff are taken into account.willem9136 wrote: ↑Wednesday 03 February 2021 10:53 The reason I want to use the P1 over LAN is that I think the single sensors like GAS and POWER etc do not process the High and Low tarif.
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD
For Gas I am not aware of such a variation in tariff based on time of dayIDX = id of your device (This number can be found in the devices tab in the column "IDX")
USAGE1= energy usage meter tariff 1, This is an incrementing counter
USAGE2= energy usage meter tariff 2, This is an incrementing counter
RETURN1= energy return meter tariff 1, This is an incrementing counter
RETURN2= energy return meter tariff 2, This is an incrementing counter
CONS= actual usage power (Watt)
PROD= actual return power (Watt)
USAGE and RETURN are counters (they should only count up).
For USAGE and RETURN supply the data in total Wh with no decimal point.
(So if your meter displays f.i. USAGE1= 523,66 KWh you need to send 523660)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1765
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Protocol for P1 over LAN
Hi,
The protocol is exactly the same as for the P1 meter for USB.
It can be found at: https://www.netbeheernederland.nl/dossi ... documenten.
E.g. it can be used with ser2net:
https://www.jpaul.me/2019/01/how-to-bui ... h-ser2net/
Read also this:
viewtopic.php?t=17238
Regards
The protocol is exactly the same as for the P1 meter for USB.
It can be found at: https://www.netbeheernederland.nl/dossi ... documenten.
E.g. it can be used with ser2net:
https://www.jpaul.me/2019/01/how-to-bui ... h-ser2net/
Read also this:
viewtopic.php?t=17238
Regards
- erem
- Posts: 230
- Joined: Tuesday 27 March 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Amsterdam/netherlands
- Contact:
Re: Protocol for P1 over LAN
Willem,
instead of going the difficult route of writing your own code for the esp12, i would strongly suggest you look into espeasy.
there is a plugin P1 wifi gateway that does exactly what you want.
instead of going the difficult route of writing your own code for the esp12, i would strongly suggest you look into espeasy.
there is a plugin P1 wifi gateway that does exactly what you want.
- Attachments
-
- 03-02-2021 11-48-15.jpg (73.51 KiB) Viewed 4698 times
Regards,
Rob
Rob
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: Protocol for P1 over LAN
I’m still not happy with all the answers.
I will try to make my question as simple as possible.
Look at the screen dump Rob send in the previous item. You see there is an IP and a port number.
My question is: What is this 10.0.0.101 port 8888 for kind of thing?
Is it an ESP or PI? What does it do with the data coming from the Meter?
What network protocol is used to send it to Domoticz?
It’s a total black box what is sitting in between Domoticz and the Meter.
I hope I’m clear now....
Willem
I will try to make my question as simple as possible.
Look at the screen dump Rob send in the previous item. You see there is an IP and a port number.
My question is: What is this 10.0.0.101 port 8888 for kind of thing?
Is it an ESP or PI? What does it do with the data coming from the Meter?
What network protocol is used to send it to Domoticz?
It’s a total black box what is sitting in between Domoticz and the Meter.
I hope I’m clear now....
Willem
- erem
- Posts: 230
- Joined: Tuesday 27 March 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Amsterdam/netherlands
- Contact:
Re: Protocol for P1 over LAN
here we gowillem9136 wrote: ↑Wednesday 03 February 2021 15:29 I’m still not happy with all the answers.
I will try to make my question as simple as possible.
Look at the screen dump Rob send in the previous item. You see there is an IP and a port number.
My question is: What is this 10.0.0.101 port 8888 for kind of thing?
Is it an ESP or PI? What does it do with the data coming from the Meter?
What network protocol is used to send it to Domoticz?
It’s a total black box what is sitting in between Domoticz and the Meter.
I hope I’m clear now....
Willem
My question is: What is this 10.0.0.101 port 8888 for kind of thing? This is a esp8266 running ESPEasy
What network protocol is used to send it to Domoticz? it is based on ser2net, so it takes the serial output from the P1 port and sends it out via the network. domoticz receives that as if text was sent in directly via a P1 usb cable.
since most meters send the output inverted, a simple transistor inverter corrects that.
like this
Regards,
Rob
Rob
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: Protocol for P1 over LAN
We are getting close.
So, from the meter you go to the inverter. (So do I)
From the inverter you go into ser2net.
On the Domoticz side there is also a ser2net I suppose. (Call it net2ser).
From this ser2net you get serial data.
You can feed this via an FTDI directly into the P1 to USB.
So why are you configuring the P1 over LAN?
So, from the meter you go to the inverter. (So do I)
From the inverter you go into ser2net.
On the Domoticz side there is also a ser2net I suppose. (Call it net2ser).
From this ser2net you get serial data.
You can feed this via an FTDI directly into the P1 to USB.
So why are you configuring the P1 over LAN?
- erem
- Posts: 230
- Joined: Tuesday 27 March 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Amsterdam/netherlands
- Contact:
Re: Protocol for P1 over LAN
willem,
from the meter to the inverter
from the inverter to the esp8266 running espeasy, that published the telegram on the chosen port
domoticz receives from the esp8266 ip/port and processes the data
no ftdi, no usb
from the meter to the inverter
from the inverter to the esp8266 running espeasy, that published the telegram on the chosen port
domoticz receives from the esp8266 ip/port and processes the data
no ftdi, no usb
Regards,
Rob
Rob
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: Protocol for P1 over LAN
Ok! Clear! Now I can work on this.
Thanks Rob.
Thanks Rob.
Who is online
Users browsing this forum: No registered users and 1 guest