Lua script for uploading energy values to PVoutput

Moderator: leecollings

Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Derik »

The things i do not understand... [ sorry ]

I do only have a the USB P1.
So what d i fill in by

Code: Select all

local GenerationDeviceName = "xxxxxx" 		-- Device name of the Generated energy
local ConsumptionIDX = xxx  			-- IDX of the energy device that shows calculated Consumption
local ConsumptionDeviceName = "xxxxxx" 		-- Name of the energy device that shows calculated Consumption
Because i have to replace this:

Code: Select all

local ImportedDeviceName = "xxxxxx" 		-- Name of the energy device that shows imported energy
local ExportedDeviceName = "xxxxxx" 		-- Name of the energy device that shows exported energy
For:

Code: Select all

local EnergyDeviceName = "xxxxxx" 
Only i do not have other devices?

The other part:
Do i need to ad this:

Code: Select all

EnergyImportLow = 0	-- in Watt hours
EnergyImportHigh = 0	-- in Watt hours
EnergyExportLow = 0	-- in Watt hours
EnergyExportHigh = 0	-- in Watt hours
Or replace?
Because when i try to do the both of them no thing is working


The the other thing

Is it correct u calculate in you in script?
That is just the thing Pvo is doing?
Just upload the use and generation separate uploading to pvo is giving the good graphs?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by roblom »

Ah, you don't have solar panels? Then it becomes a bit more complex. But why did you want to upload the values to pvoutput if you don't have solar panels?

The script calculates the real consumption. That's because when you generate 100W and consumes 100W at the same time the smart meter register 0W in and 0W out.

But when you don't have solar panels there is nothing to calculate.
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Derik »

mmm There is....

My useage and my gas...
Perhaps possible with this script [ gas to V7 ? ]


And i do have a "winddelen" that i upload separate to pvo...
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Derik »

Dear Alla..
Something changed in gratisweerdata for my https://github.com/harold65/SolarMeter system to upload my solarpanels.
The site is from http to https changed, so the solarmeter cannot use the free weather data any more...

Is there perhaps some one that can change my script so i can upload a tempsensor from domoticz to pvoutput.
I use this script to upload my winddelen to Pvo like it is a solarpanel :D

Code: Select all

commandArray = {}


 print ("Winddelen naar P.V.O.")

        date = os.date("*t")
        if (date.min % 5 == 0) then  -- %10 is iedere 10 minuten
            solar = otherdevices_svalues['D.M.: 3x Jonge Held']
            now, total = solar:match("(%d+);(%d+)")
        --  print(solar..' '..now..' '..total)

        -- Upload data to PVoutput every 5 mins  [ verander  %5 in %10  en dan iederre 10 minuten ]
            baseURL = "http://pvoutput.org/service/r2/addstatus.jsp?"
            SID = "15962"
            API = "c53c834f1af40b8035b7eeb61c3210ea535"
            PVO_URL = baseURL .. "sid=" .. SID .. "&key=" .. API .. "&d=" .. os.date("%Y%m%d") .. "&t=" .. os.date("%H:%M")
            PVO_URL = PVO_URL .. "&v1=" .. total .. "&v2=" .. now .. "&c1=1"
            --print(PVO_URL)
            commandArray['OpenURL'] = PVO_URL

        end
        
return commandArray
There is a string where pvo is asking for:
https://pvoutput.org/help.html#api-addoutput

Only one bog problem...
I do not understand this script and the request from Pvo output.. [ bricklayer here :-) ]

Perhaps some that can help..

Thanks for the time
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by dvdbosch »

Guys,

Need some help!

Im using the scripts/snippets as mentioned a few pages ago, but in some kind of way my measurements are incorrect. See below.

Code: Select all

2019-01-12 20:44:24.693 (P1) P1 Smart Meter (Power)
2019-01-12 20:44:24.728 Status: LUA: ----- PowerGeneration = 0.000 W
2019-01-12 20:44:24.728 Status: LUA: ----- EnergyGeneration = 5298730.000 Wh
2019-01-12 20:44:24.728 Status: LUA: ----- PowerImport = 460 W
2019-01-12 20:44:24.728 Status: LUA: ----- EnergyImportLow = 2058351 Wh
2019-01-12 20:44:24.728 Status: LUA: ----- EnergyImportHigh = 1732276 Wh
2019-01-12 20:44:24.728 Status: LUA: ----- EnergyImport = 3790627 Wh
2019-01-12 20:44:24.728 Status: LUA: ----- PowerExport = 0 W
2019-01-12 20:44:24.728 Status: LUA: ----- EnergyExportLow = 1141386 Wh
2019-01-12 20:44:24.729 Status: LUA: ----- EnergyExportHigh = 2645175 Wh
2019-01-12 20:44:24.729 Status: LUA: ----- EnergyExport = 3786561 Wh
2019-01-12 20:44:24.729 Status: LUA: ----- PowerConsumption = 460 W
2019-01-12 20:44:24.729 Status: LUA: ----- EnergyConsumption = 5302796 Wh
At the moment I'm not generating any energy, but it register import. Any suggestions to solve this?

Am using the following calculation:

Code: Select all

----------------------------------------------------------------------------------------------------------
-- CommandArray
----------------------------------------------------------------------------------------------------------
commandArray = {}
-- Generated
PowerGeneration, EnergyGeneration = otherdevices_svalues[GenerationDeviceName]:match("([^;]+);([^;]+)")
if Debug=="YES" then
print(" ----- PowerGeneration = " .. PowerGeneration .. " W");
print(" ----- EnergyGeneration = " .. EnergyGeneration .. " Wh");
end

-- Imported
EnergyImportLow, EnergyImportHigh, EnergyExportLow, EnergyExportHigh, PowerImport, PowerExport = otherdevices_svalues[EnergyDeviceName]:match("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)")
EnergyImport = EnergyImportLow + EnergyImportHigh
EnergyExport = EnergyExportLow + EnergyExportHigh
if Debug=="YES" then
print(" ----- PowerImport = " .. PowerImport .. " W");
print(" ----- EnergyImportLow = " .. EnergyImportLow .. " Wh");
print(" ----- EnergyImportHigh = " .. EnergyImportHigh .. " Wh");
print(" ----- EnergyImport = " .. EnergyImport .. " Wh");
print(" ----- PowerExport = " .. PowerExport .. " W");
print(" ----- EnergyExportLow = " .. EnergyExportLow .. " Wh");
print(" ----- EnergyExportHigh = " .. EnergyExportHigh .. " Wh");
print(" ----- EnergyExport = " .. EnergyExport .. " Wh");
end

-- Calculate consumption
PowerConsumption = PowerGeneration + PowerImport - PowerExport
if Debug=="YES" then
print(" ----- PowerConsumption = " .. PowerConsumption .. " W");
end
EnergyConsumption = EnergyGeneration + EnergyImport - EnergyExport
if Debug=="YES" then
print(" ----- EnergyConsumption = " .. EnergyConsumption .. " Wh");
end
In some kind of way its perhaps related to the following:

Code: Select all

----------------------------------------------------------------------------------------------------------
-- Domoticz IDX and names of the needed devices
----------------------------------------------------------------------------------------------------------
local GenerationDeviceName = "kWh Meter" -- Device name of the Generated energy
local EnergyDeviceName = "Power" -- Name of the energy device that shows imported and exported energy
local ConsumptionIDX = "5829" -- IDX of the energy device that shows calculated Consumption
local ConsumptionDeviceName = "Electricity" -- Name of the energy device that shows calculated Consumption

For the "ConsumtionDeviceName" im using a virtual sensor (Electric, (instant + counter)).

Thanks in advance!
rmayne
Posts: 6
Joined: Wednesday 15 May 2019 11:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by rmayne »

I cant make the relation betaween the asked parameters and my SBFSpot device.

local GenerationDeviceName = "xxxxxx" -- Device name of the Generated energy
local ImportedDeviceName = "xxxxxx" -- Name of the energy device that shows imported energy
local ExportedDeviceName = "xxxxxx" -- Name of the energy device that shows exported energy
local ConsumptionIDX = xxx -- IDX of the energy device that shows calculated Consumption
local ConsumptionDeviceName = "xxxxxx" -- Name of the energy device that shows calculated Consumption

Whitch on have to be selected?
My devices
SBFSpot 00000001 1 SolarMain General kWh 659.759 kWh
SBFSpot 00000001 1 Volt uac1 General Voltage 243.72 V
SBFSpot 00000001 1 Efficiency General Percentage 0%
SBFSpot 00000002 1 Hz General Percentage 50%
SBFSpot 00000003 1 BT_Signal General Percentage 0%
SBFSpot 0001 1 Temperature Temp
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by knielen »

Thanks for those great scripts, works perfect!
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by knielen »

rmayne wrote: Wednesday 15 May 2019 12:02 I cant make the relation betaween the asked parameters and my SBFSpot device.

local GenerationDeviceName = "xxxxxx" -- Device name of the Generated energy SolarMain General kWh
local ImportedDeviceName = "xxxxxx" -- Name of the energy device that shows imported energy Your energy meter
local ExportedDeviceName = "xxxxxx" -- Name of the energy device that shows exported energy Your energy meter
local ConsumptionIDX = xxx -- IDX of the energy device that shows calculated Consumption Dummy device in Domoticz created by you
local ConsumptionDeviceName = "xxxxxx" -- Name of the energy device that shows calculated Consumption Dummy device in Domoticz created by you

Whitch on have to be selected?
My devices
SBFSpot 00000001 1 SolarMain General kWh 659.759 kWh
SBFSpot 00000001 1 Volt uac1 General Voltage 243.72 V
SBFSpot 00000001 1 Efficiency General Percentage 0%
SBFSpot 00000002 1 Hz General Percentage 50%
SBFSpot 00000003 1 BT_Signal General Percentage 0%
SBFSpot 0001 1 Temperature Temp
see bolt comments above
Merlin1201
Posts: 10
Joined: Friday 07 June 2019 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Merlin1201 »

Hi..iam trying to use this upload and calculation script and have one problem so far in the first script
Calculation give's me a 770.617 kWh my gues that's to high? or do I missing something.

1 Slimme meter 0001 1 Power P1 Smart Meter Energy 782243;880866;301139;611053;0;852 -
2 Slimme meter 00000001 1 Voltage L1 General Voltage 233.4 V - -
3 Slimme meter 0000000 1 Usage L1 Usage Electric 0 Watt - -
4 Slimme meter 0000000 4 Delivery L1 Usage Electric 852 Watt -
5 Slimme meter 0001 2 Gas P1 Smart Meter Gas 1166.925 -
11 goodwe 00082011 1 Goodwe General kWh 19.700 kWh
12 Calculation 00082012 1 Consumption General kWh 770.617 kWh
Merlin1201
Posts: 10
Joined: Friday 07 June 2019 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Merlin1201 »

I still don't get it,

PowerConsumption = PowerGeneration + PowerImport - PowerExport.
PowerConsumption = 21600 (solarpannels) + 2473 (import energy) - 14396 (Returned energy)
PowerConsumption = 9677

So my PowerConsumption is 9677 kWh for that day, en that's right, so my question is why is the outcome 2000 kWh and not 9677 ???????
Is this something in PVoutput? is the script wrong somewhere?
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by roblom »

I think you are mixing up energy and power. Power is in W and Energy is in kWh. An average household consumes 3000kWh a year. So if you consumes 9677kWh a day there is something seriously wrong.
I think the numbers are the values registered by the meter since it started measuring. And not the values of that day.
Merlin1201
Posts: 10
Joined: Friday 07 June 2019 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Merlin1201 »

ah ok.. PowerConsumption = PowerGeneration + PowerImport - PowerExport.
PowerConsumption = 21,600 kWh (solarpannels) + 2,473 kWh (import energy) - 14,396 kWh (Returned energy)
PowerConsumption = 9,677 kWh

That 9,677 kWh is exact mij Consumption for a day.
but this script show's me just 2,000 kWh and that's wrong
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by roblom »

As said, I think you are mixing up the devices.
- Power are the values in W
- Energy are the values in Wh

It doesn't really matter for the formula but if your consumption isn't correct then I think you are using the formula with the wrong values. I think you put in the power values and think it is energy.
So check if the values you are using in
PowerConsumption = 21,600 kWh (solarpannels) + 2,473 kWh (import energy) - 14,396 kWh (Returned energy)
PowerConsumption = 9,677 kWh

And change it so it become
EnergyConsumption = EnergyGeneration + EnergyImport - EnergyExport
EnergyConsumption = 21600 Wh (solarpannels) + 2473 Wh (import energy) - 14396 Wh (Returned energy)
EnergyConsumption = 9677 Wh

Or maybe you can post some debug values?
Merlin1201
Posts: 10
Joined: Friday 07 June 2019 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Merlin1201 »

some data
2019-06-16 15:15:08.121 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_calculate_consumption.lua
2019-06-16 15:15:08.213 Status: LUA: ----- PowerGeneration = 1610 W
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyGeneration = 13400 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- PowerImport = 0 W
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyImportLow = 802820 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyImportHigh = 892727 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyImport = 1695547 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- PowerExport = 1211 W
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyExportLow = 329318 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyExportHigh = 655179 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyExport = 984497 Wh
2019-06-16 15:15:08.213 Status: LUA: ----- PowerConsumption = 399 W
2019-06-16 15:15:08.213 Status: LUA: ----- EnergyConsumption = 724450 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- PowerGeneration = 1610 W
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyGeneration = 13400 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- PowerImport = 0 W
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyImportLow = 802820 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyImportHigh = 892727 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyImport = 1695547 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- PowerExport = 1211 W
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyExportLow = 329318 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyExportHigh = 655179 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyExport = 984497 Wh
2019-06-16 15:15:08.228 Status: LUA: ----- PowerConsumption = 399 W
2019-06-16 15:15:08.228 Status: LUA: ----- EnergyConsumption = 724450 Wh
2019-06-16 15:15:08.241 Status: LUA: ----- PowerGeneration = 1610 W
2019-06-16 15:15:08.241 Status: LUA: ----- EnergyGeneration = 13400 Wh
2019-06-16 15:15:08.241 Status: LUA: ----- PowerImport = 0 W
2019-06-16 15:15:08.241 Status: LUA: ----- EnergyImportLow = 802820 Wh
2019-06-16 15:15:08.241 Status: LUA: ----- EnergyImportHigh = 892727 Wh
2019-06-16 15:15:08.241 Status: LUA: ----- EnergyImport = 1695547 Wh
2019-06-16 15:15:08.241 Status: LUA: ----- PowerExport = 1211 W
2019-06-16 15:15:08.241 Status: LUA: ----- EnergyExportLow = 329318 Wh
2019-06-16 15:15:08.242 Status: LUA: ----- EnergyExportHigh = 655179 Wh
2019-06-16 15:15:08.242 Status: LUA: ----- EnergyExport = 984497 Wh
2019-06-16 15:15:08.242 Status: LUA: ----- PowerConsumption = 399 W
2019-06-16 15:15:08.242 Status: LUA: ----- EnergyConsumption = 724450 Wh
Merlin1201
Posts: 10
Joined: Friday 07 June 2019 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by Merlin1201 »

And another strange value, Energy used is not right, it's too much.


Date Time Energy Efficiency Power Average Normalised Temperature Voltage Energy Used Power Used
17/06/19 08:00 0.900kWh 0.188kWh/kW 1,635W - 0.341kW/kW 0.0C 229.6V 708.971kWh 359W
17/06/19 07:55 0.800kWh 0.167kWh/kW 1,643W - 0.342kW/kW 0.0C 230.4V 708.899kWh 349W
17/06/19 07:50 0.700kWh 0.146kWh/kW 1,625W - 0.339kW/kW 0.0C 230.2V 708.899kWh 378W
17/06/19 07:45 0.600kWh 0.125kWh/kW 1,552W - 0.323kW/kW 0.0C 231.4V 708.883kWh 324W
R0yk3
Posts: 37
Joined: Sunday 24 July 2016 21:51
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by R0yk3 »

Hello,
I used this script for ages and i am very happy about it.
But now i have upgraded my solar 'plant' 8-)
Now i have a 3 phase meter.

For some reason i cannot get the data right. :roll:
This is the error i get.
2019-08-18 15:39:41.492 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_calculate_consumption.lua: ...ticz/scripts/lua/script_device_calculate_consumption.lua:52: attempt to concatenate global 'PowerGeneration' (a nil value)
Made a spoiler to keer the post compact.
Spoiler: show
----------------------------------------------------------------------------------------------------------
-- Domoticz IDX and names of the needed devices
----------------------------------------------------------------------------------------------------------
#1 - local GenerationDeviceName = "PV_WATT" -- Device name of the Generated energy
#2 - local EnergyDeviceName = "Power" -- Name of the energy device that shows imported and exported energy
#3 - local ConsumptionIDX = "310" -- IDX of the energy device that shows calculated Consumption
#4 - local ConsumptionDeviceName = "Consumption" -- Name of the energy device that shows calculated Consumption

I numbered the lines so that is not in the script.
#1 is the output in Watt from my panels, also tried the daily output in kwh same error
Values are: name state value
PV_WATT 805 0/805
Or as i use daily output
Values are: name state value
PV_DagTotaal 8.2 0/8.2
#2 This is the output prom my P1
Values are: name State value
Power 2508553;1420218;1248032;2946828;49;490 0/2508553;1420218;1248032;2946828;49;490
#3 and #4 is the same device and made it as written in the tutorial.
Values are: name state value
Consumption 0;0.0 0/0;0.0
What do i miss here???
Raspberry PI 3, raspbian, ZwaveMe, RFLink
sjoemie1985
Posts: 27
Joined: Thursday 26 September 2019 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by sjoemie1985 »

R0yk3 wrote: Monday 29 July 2019 22:33 Hello,
I used this script for ages and i am very happy about it.
But now i have upgraded my solar 'plant' 8-)
Now i have a 3 phase meter.

For some reason i cannot get the data right. :roll:
This is the error i get.
2019-08-18 15:39:41.492 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_calculate_consumption.lua: ...ticz/scripts/lua/script_device_calculate_consumption.lua:52: attempt to concatenate global 'PowerGeneration' (a nil value)
Made a spoiler to keer the post compact.
Spoiler: show
----------------------------------------------------------------------------------------------------------
-- Domoticz IDX and names of the needed devices
----------------------------------------------------------------------------------------------------------
#1 - local GenerationDeviceName = "PV_WATT" -- Device name of the Generated energy
#2 - local EnergyDeviceName = "Power" -- Name of the energy device that shows imported and exported energy
#3 - local ConsumptionIDX = "310" -- IDX of the energy device that shows calculated Consumption
#4 - local ConsumptionDeviceName = "Consumption" -- Name of the energy device that shows calculated Consumption

I numbered the lines so that is not in the script.
#1 is the output in Watt from my panels, also tried the daily output in kwh same error
Values are: name state value
PV_WATT 805 0/805
Or as i use daily output
Values are: name state value
PV_DagTotaal 8.2 0/8.2
#2 This is the output prom my P1
Values are: name State value
Power 2508553;1420218;1248032;2946828;49;490 0/2508553;1420218;1248032;2946828;49;490
#3 and #4 is the same device and made it as written in the tutorial.
Values are: name state value
Consumption 0;0.0 0/0;0.0
What do i miss here???
i have the same problem at the moment?
do you already have an solution?
R0yk3
Posts: 37
Joined: Sunday 24 July 2016 21:51
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by R0yk3 »

No, no solution.
i am using dsmr now
https://dsmr-reader.readthedocs.io/nl/latest/index.html

Although i prefer it via Domoticz.
Raspberry PI 3, raspbian, ZwaveMe, RFLink
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by knielen »

I had the same issue, by manually extracting the right values from my meter I solved this issue.

Code: Select all

 -- Update comsumption device in Domoticz
        if devicechanged[EnergyDeviceName] then
            Total = "http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=328&nvalue=0&svalue=" .. PowerConsumption .. ";" .. EnergyConsumption;
            os.execute('curl "' .. Total .. '"');
        end
User avatar
hansonexperience
Posts: 12
Joined: Thursday 19 October 2017 14:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: the Netherlands
Contact:

Re: Lua script for uploading energy values to PVoutput

Post by hansonexperience »

Hi,

I upgraded my rpi with domomoticz to buster (new version debian) and new version of domoticz. Now this does not work anymore:
local http = require("socket.http")

I am using the pvoutput upload script which was functioning great but now I have errors that it cannot find the socket a.s.o.
Can anyone help?
Solar: pvoutput, solarman, JFY inverter, enelogic, slimmemeterportal, Greenchoice
Weather: Davis VUE ISS, meteobridge wunderground, Asus WL -330N3G, leuven template
Website: http://www.hansonexperience.com / http://www.mooiweerboxtel.nl
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests