Update P1 Smart Meter

Moderator: leecollings

Post Reply
fabix68
Posts: 10
Joined: Tuesday 22 December 2015 6:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Update P1 Smart Meter

Post by fabix68 »

Hi

I'm trying to monitor the consumption and production of electricity in my house.
With 2 electric meter I have data of production and consumption.
I would like to merge them into a single device so that you have one graph.
I am trying to send data to a dummy p1 smart meter but something is wrong.

Code: Select all

--IDX p1 Smart Meter = 8

--Produczion Meter
solarPower, solarEnergy = string.match(otherdevices_svalues['Produzione'], "(%d+%.*%d*);(%d+%.*%d*)") 

--Consume Meter
ConsPower, consEnergy = string.match(otherdevices_svalues['Consumo'], "(%d+%.*%d*);(%d+%.*%d*)")

commandArray['UpdateDevice'] = "8" .."|" ..consEnergy.."|0|" .. solarEnergy .. "|0|" .. consPower .."|" .. solarPower

-- Generate string 8|1930589|0|15246948.000|0|768.91|0.000
What's wrong?
There is another method for comparing production / consumption?
dgonneau
Posts: 7
Joined: Tuesday 16 February 2016 15:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Update P1 Smart Meter

Post by dgonneau »

Hi,

I made the same mistake not long ago, the correct update string should be as stated here : https://www.domoticz.com/wiki/Domoticz_ ... mart_meter : udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD

The different values should be delimited by ";" and you're missing 0 in between the idx and first value.

ie. should be 8|0|value1;value2;value3;.....
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest