P1 Smart Meter populated via API, incorrect readings displayed

Moderator: leecollings

Post Reply
joostvanderlinde
Posts: 46
Joined: Tuesday 23 June 2015 23:06
Target OS: Linux
Domoticz version: 2023.2
Location: NL + SE
Contact:

P1 Smart Meter populated via API, incorrect readings displayed

Post by joostvanderlinde »

I readout one of my meters via IR and submit the values to the Domoticz API every 5 minutes.
For that purpose I have setup a dummy P1 Smart Meter in Domoticz (because that devices takes Consumption and Power in one go).

Example of the JSON:

Code: Select all

http://192.168.8.3:8080/json.htm?type=command&param=udevice&idx=202&nvalue=0&svalue=0;2349800;0;0;2745;0
This JSON gives the data with Consumption meterreading 2349.800kWh and actual Power of 2745W.

This USUALLY works ok, but more than once a day, it seems Domoticz is not able to process the data (I checked it more than once the API call has the correct JSON data!). Instead it either shows zero values (most of the time for Power) or very high values (most of the time for Consumption).
You can see this in the graphs as well:
Capture.PNG
Capture.PNG (72.63 KiB) Viewed 1377 times
Any clue, anyone??
Domoticz on BPI-M2-Pro (compiled on Ubuntu 22.04) and RPI (binary on Raspian 10)
RFXCom, Sonoff Zigbee stick, eBusd Adapter 5, P1, S0, Husdata H60 integration
Zigbee2MQTT AD, MQTT local, AirconWithMe, Ebusd, VolvoRecharge, PSA Car Controller
pfer10
Posts: 9
Joined: Sunday 08 February 2015 16:27
Target OS: Linux
Domoticz version:
Contact:

Re: P1 Smart Meter populated via API, incorrect readings displayed

Post by pfer10 »

I see something similar. Also what does you P1 smart meter look like in the GUI? I saw a another shot in the forums and it looked totally different.


Image


I have a zwave power meter and I trigger a dzevents when it is updated. If the power is negative (solar generating more than the house) I send it to the last field. If it is positive I send it to the next to last field. On my grpahs I don't get anything so I am surprised you get something. Maybe it is because I am sending 0 to all the other fields?

if device.WhActual < 0 then
P1Meter.updateP1(0,0,0,0,0,device.WhActual)
else
P1Meter.updateP1(0,0,0,0,device.WhActual,0)
end
pfer10
Posts: 9
Joined: Sunday 08 February 2015 16:27
Target OS: Linux
Domoticz version:
Contact:

Re: P1 Smart Meter populated via API, incorrect readings displayed

Post by pfer10 »

I get this value every now and then for some reason.


Image
gordonb3
Posts: 111
Joined: Saturday 31 March 2018 22:24
Target OS: Linux
Domoticz version: Custom
Location: Delft, NL
Contact:

Re: P1 Smart Meter populated via API, incorrect readings displayed

Post by gordonb3 »

I don't think this `actual power` field is really used. Graphs in fact show a calculated value from delta consumption divided by time frame to give you an average usage rather than whatever would be the snapshot usage from that particular moment. Are you certain that your API calls are firing when you think they are supposed to?
pfer10
Posts: 9
Joined: Sunday 08 February 2015 16:27
Target OS: Linux
Domoticz version:
Contact:

Re: P1 Smart Meter populated via API, incorrect readings displayed

Post by pfer10 »

I put tonumber() before passing it back to updateP1 and that seemed to take care of it. Would you happen to know why my graph only shows usage 1 and usage 2 like the above from the other poster? Also GUI on the energy tab looks different than others that have posted for a P1 Smart Meter.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests