JanJaap wrote: ↑Friday 04 September 2020 8:24
Hi,
The 'bad file descriptor' error comes from trying to do something to a file without the right access to it. It happens once in a while, I think it comes from the GoodWE API not returning the correct data or somewhere the software tries to store it where something goes wrong. I need to dive into that a bit more. At least catch the exception a bit more elegant. I'll let you know when I found something.
JanJaap, plugin works perfect! Now I'm trying to get also the amount earned in euro's in domoticz, so I adjusted some script (
https://ehoco.nl/stroom-gas-en-waterkos ... -domoticz/) and used the device of my solar panels also with the 'CounterToday'.
Because when I make a json output I see that CounterToday is the same as in de script. This works and I see every day the euro's earned in my dummy domoticz device.
Now I wanted to adjust the script to also show a dummy device that contains the total amount earned in euro's so I used the 'Data' subdevice, because my json gives:
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CounterToday" : "0.000 kWh",
"CustomImage" : 0,
"Data" : "17.400 kWh",
"Description" : "",
"EnergyMeterMode" : "0",
"Favorite" : 0,
"HardwareID" : 10,
"HardwareName" : "GoodWe Zonnepanelen",
"HardwareType" : "GoodWe solar inverter via SEMS API",
"HardwareTypeVal" : 94,
"HaveTimeout" : false,
"ID" : "000A0004",
"LastUpdate" : "2021-01-11 10:41:42",
"Name" : "Zonnepanelen",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
Now I get an error, for CounterToday it works for the Data field I get the error:
2021-01-11 11:00:00.293 Error: dzVents: Error: (3.0.15) An error occurred when calling event handler Script #1
2021-01-11 11:00:00.293 Error: dzVents: Error: (3.0.15) ...ticz/var/scripts/dzVents/generated_scripts/Script #1.lua:21: attempt to perform arithmetic on a nil value (local 'vandaagKwh')
Can you see the issue?