I think in Windows 10 you can run curl (https://stackoverflow.com/questions/950 ... on-windows) but it is probably better to do it on the RPi as domoticz will also use it from there. You should get the same response on both.
GoodWe Solar: get data from the new semsportal (lua script)
Moderator: leecollings
-
- Posts: 14
- Joined: Sunday 08 January 2017 10:37
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
-
- Posts: 37
- Joined: Wednesday 01 November 2017 19:12
- Target OS: -
- Domoticz version:
- Location: Netherlands
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Do you have to create a new sensor or is it possible to use your existing "Goodwe solar inverter via Web API" idx-code?CrazyFrog wrote: ↑Monday 22 April 2019 20:52 you have create your own sensor.
for hardware you have to create a virtual sensor from the type "Dummy (Does nothing, use for virtual switches only)".
then click on "Create Virtual Sensors", name the sensor "solar panels" and choose "sensor type" - "Electric (instant + counter)"
-
- Posts: 21
- Joined: Sunday 21 April 2019 13:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
you have to create your own sensor.
-
- Posts: 2
- Joined: Tuesday 04 June 2019 14:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
I have implemented this script without to much problems. The only thing i see after a couple of days is that the total value of monday is al wrong. It's not 19.2 kWh, but more around 8.8 kWh if i check it in the semsportal.
All of the other days are correct, i dont get it. Does anybody have an idea?
All of the other days are correct, i dont get it. Does anybody have an idea?
- Attachments
-
- Capture.PNG (141.8 KiB) Viewed 4363 times
-
- Posts: 5
- Joined: Wednesday 05 June 2019 14:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
I experience the same issue as Marktap. The daily total of previous day is being used untill the currect day is higher for me.
I also notice when there is no power output I still get the last remain known output showing up (e.g 36Watts from 22:00h onwards till the morning).
Is there a way to set it to "0" when the solar system is offline?
I also notice when there is no power output I still get the last remain known output showing up (e.g 36Watts from 22:00h onwards till the morning).
Is there a way to set it to "0" when the solar system is offline?
-
- Posts: 10
- Joined: Friday 07 June 2019 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Hi
I have installed the script and it works great.
There is one error remaining:
2019-06-08 07:28:10.493 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:36:10.126 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:44:10.300 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:48:10.291 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:52:10.378 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 08:00:10.419 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
i also try the upload to pvoutput script, but that needs some more work and my scripting is not that good.
https://www.domoticz.com/wiki/Upload_en ... o_PVoutput
I have installed the script and it works great.
There is one error remaining:
2019-06-08 07:28:10.493 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:36:10.126 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:44:10.300 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:48:10.291 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:52:10.378 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 08:00:10.419 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
i also try the upload to pvoutput script, but that needs some more work and my scripting is not that good.
https://www.domoticz.com/wiki/Upload_en ... o_PVoutput
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
lua script works like a charm. Up and running in no time. Thank you so much.
As by default I always build the stuff in Pass2PHP (and have some sort of multi-threading).
I updated my Github.
https://github.com/sincze/Domoticz/blob ... Goodwe.php
As by default I always build the stuff in Pass2PHP (and have some sort of multi-threading).
I updated my Github.
https://github.com/sincze/Domoticz/blob ... Goodwe.php
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 10
- Joined: Friday 07 June 2019 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
? so you make a php file from the Lua script?
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Yes, basically I rewrote the whole thing in PHP. As all my scripts use PHP. (Pass2PHP user)
This for me has the following advantages:
- I can run it outside of Domoticz and not be scared of 'script has been running for more than 10 seconds ' clogging up my 850 devices and 10 (different branded) inverters.
- In addition I could build some additional failure checks. If the webserver is not available.
- It integrates in Pass2PHP
- It can be used for non Pass2PHP users.
However for the typical user I would go for the lua.
- It works fine.
- Easy to implement
I even have it running on my spare pi.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 10
- Joined: Friday 07 June 2019 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
impressive, ia'm truck with copy and paste only.
-
- Posts: 21
- Joined: Friday 28 December 2018 20:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Also same problem.. Think of editing the database to correct..
Kencirot wrote: ↑Wednesday 05 June 2019 14:56 I experience the same issue as Marktap. The daily total of previous day is being used untill the currect day is higher for me.
I also notice when there is no power output I still get the last remain known output showing up (e.g 36Watts from 22:00h onwards till the morning).
Is there a way to set it to "0" when the solar system is offline?
solar.PNG
- Attachments
-
- 8A38ABA2-C638-4552-9236-8A2FC65B9F0B.jpeg (241.46 KiB) Viewed 4238 times
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
This seems to be an issue with all my different branded inverters indeed within domoticz.
Seems like a Domoticz representation graph issue to me as the json request is processed correctly and device is updated correctly as well. I am running Domoticz V4.10730.
That I corrected with a statement (not within lua) to check if the current time is after sunset. If so I update the device with
Code: Select all
0;<daily_generation>.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 34
- Joined: Tuesday 09 January 2018 8:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Harlingen
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Merlin1201 wrote: ↑Friday 07 June 2019 11:14 Hi
I have installed the script and it works great.
There is one error remaining:
2019-06-08 07:28:10.493 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:36:10.126 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:44:10.300 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:48:10.291 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 07:52:10.378 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
2019-06-08 08:00:10.419 Error: EventSystem: Warning!, lua script Solar Panels has been running for more than 10 seconds
i also try the upload to pvoutput script, but that needs some more work and my scripting is not that good.
https://www.domoticz.com/wiki/Upload_en ... o_PVoutput
ik got this problem 2 how to solve it?? i can't gat the solution
if have made som changed so i have a 0 value when de inverter is nog genarating
i get de status of the inverter
Status = getValue(splitString, "status")
if that is
1 = Generating,
0 = Waiting</option>
2 = Fault
-1 = Offline
if Status == "1" then
status_text = "Generating"
elseif Status == "0" then
status_text = "Waiting"
elseif Status == "2" then
status_text = "Fault"
else
status_text = "Offline"
end
so i can create a 0 when the status is 0,2 of -1
if Status == "1" then
UpdateDevice(sensorSolarPanels, current..";"..zonTotal)
else
current = "0"
print("current :" .. current)
UpdateDevice(sensorSolarPanels, current..";"..zonTotal)
end
and i use eTotal = getValue(splitString, "eTotal")
so i can get the total of my production
-
- Posts: 21
- Joined: Friday 28 December 2018 20:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Thank you for your response. I’m not that experienced with Domoticz, can you tell in detail how to:
Thank you!
That I corrected with a statement (not within lua) to check if the current time is after sunset. If so I update the device withCode: Select all
0;<daily_generation>.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
I can help you if you are willing to consider moving to a Pass2PHP script kind of a solution.pvdgulik wrote: ↑Sunday 23 June 2019 16:29 Thank you for your response. I’m not that experienced with Domoticz, can you tell in detail how to:Thank you!
That I corrected with a statement (not within lua) to check if the current time is after sunset. If so I update the device withCode: Select all
0;<daily_generation>.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 28
- Joined: Sunday 11 February 2018 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
I get the following error:
2019-07-19 15:32:00.126 Error: EventSystem: in script_device_solar.lua: [string "-- Created by Raymond Wiertz
..."]:129: bad argument #1 to 'sub' (string expected, got nil)
How to fix this?
2019-07-19 15:32:00.126 Error: EventSystem: in script_device_solar.lua: [string "-- Created by Raymond Wiertz
..."]:129: bad argument #1 to 'sub' (string expected, got nil)
How to fix this?
-
- Posts: 28
- Joined: Sunday 11 February 2018 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
And now this one:
2019-07-19 15:49:01.219 Error: EventSystem: in script_device_solar.lua: [string "-- Created by Raymond Wiertz
..."]:102: attempt to perform arithmetic on global 'endPos' (a nil value)
-
- Posts: 28
- Joined: Sunday 11 February 2018 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Have you been able to fix this error?
-
- Posts: 8
- Joined: Tuesday 30 July 2019 23:01
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Anybody who has this script working on a Synolgy NAS, as I'm unable to find much about syntax differences between Pi and Synology if there are any.
First error already occurs at the first line of executable code: local Username = ... Unexpected keyword local near Username
First error already occurs at the first line of executable code: local Username = ... Unexpected keyword local near Username
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: GoodWe Solar: get data from the new semsportal (lua script)
Yes it is working on a DS412 as an alternative I createdPeter2807 wrote: ↑Tuesday 30 July 2019 23:14 Anybody who has this script working on a Synolgy NAS, as I'm unable to find much about syntax differences between Pi and Synology if there are any.
First error already occurs at the first line of executable code: local Username = ... Unexpected keyword local near Username
However you could also look at: https://github.com/sincze/Domoticz/blob ... Goodwe.php
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Who is online
Users browsing this forum: No registered users and 0 guests