Growatt shows minus value since update of domoticz
Moderator: leecollings
-
- Posts: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Growatt shows minus value since update of domoticz
Hi,
Since the update of Domoticz last week, my Growatt Inverter shows a minus value instead of the correct value.
Does someone knows how to get back the correct value ?
thanks in advance
Rick
Since the update of Domoticz last week, my Growatt Inverter shows a minus value instead of the correct value.
Does someone knows how to get back the correct value ?
thanks in advance
Rick
- waltervl
- Posts: 5721
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Growatt shows minus value since update of domoticz
Looks like viewtopic.php?f=6&t=36076 or viewtopic.php?f=6&t=35610 or viewtopic.php?f=14&t=35958
Solution: Change the script (or is it domoticz hardware plugin?) or change (edit button) on the device the daily energy read from "from device" to "computed".
Solution: Change the script (or is it domoticz hardware plugin?) or change (edit button) on the device the daily energy read from "from device" to "computed".
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
Thanks for the answer Waltervl,
Unfortunately none of the suggestiosn did not work out for me yet.
Any other ideas ??
Thanks in advance,
Rick
Unfortunately none of the suggestiosn did not work out for me yet.
Any other ideas ??
Thanks in advance,
Rick
- waltervl
- Posts: 5721
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Growatt shows minus value since update of domoticz
What hardware device/plugin or script are you using for Growatt?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
Hardware is dummy and for the device I followed this page (which is in Dutch)
but the commands may give you the needed info.
https://robothuis.nl/2020/01/13/zonnepa ... -domoticz/
but the commands may give you the needed info.
https://robothuis.nl/2020/01/13/zonnepa ... -domoticz/
- waltervl
- Posts: 5721
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Growatt shows minus value since update of domoticz
Perhaps ask it in a remark on that page. Things have changed somewhat in these devices so that php script probably needs a modification.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
Thanks I will contact them.
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
Please check you are using the latest version that has:
in it.
Code: Select all
//$todaypower = (float)str_ireplace('kWh', '', $data['todayStr']);
$todaypower = (float)str_ireplace('kWh', '', $data['totalStr']); // 18-04-2020
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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
This line is in my .php script. So that must be ok
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
Let me check with my code then as currently not expecting issues.
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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
@Sincze, do you not have this problem ??
I include my script here
I include my script here
- Attachments
-
- GW_php_script.txt
- (10.08 KiB) Downloaded 70 times
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
Slight difference so it seems.
Mine has:
Mine has:
Code: Select all
$data = json_decode($result, JSON_PRETTY_PRINT);
if(!empty($data['todayStr']) && !empty($data['totalValue'])) {
$nowpower = (float)$data['powerValue'];
$todaypower = (float)$data['todayValue']; // kWH
$allpower = (float)$data['totalValue']; // [totalStr] => 1505.4kWh [totalValue] => 1505.4
$allpower = $allpower*1000; // Convert to Wh
$str=( $nowpower.';'.$allpower ); // times 1000 to convert the 0.1kWh to 100 WattHour and to convert 2.1kWh to 2100 WattHour
lg('Growatt Inverter: '. $nowpower.' for domoticz: '.$str);
ud(DOMOTICZDEVICE,0,$str,'GrowattInverter: Generation updated');
}
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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
Hi Sincze,
If I modify my old block with your block it looks like this:
curl_close($curl);
$data = json_decode($result, JSON_PRETTY_PRINT);
if(!empty($data['todayStr']) && !empty($data['totalValue'])) {
$nowpower = (float)$data['powerValue'];
$todaypower = (float)$data['todayValue']; // kWH
$allpower = (float)$data['totalValue']; // [totalStr] => 1505.4kWh [totalValue] => 1505.4
$allpower = $allpower*1000; // Convert to Wh
$str=( $nowpower.';'.$allpower ); // times 1000 to convert the 0.1kWh to 100 WattHour and to convert 2.1kWh to 2100 WattHour
lg('Growatt Inverter: '. $nowpower.' for domoticz: '.$str);
ud(DOMOTICZDEVICE,0,$str,'GrowattInverter: Generation updated');
}
But....unfortunately the result is still the same.
Can you send me your whole script ?
If I modify my old block with your block it looks like this:
curl_close($curl);
$data = json_decode($result, JSON_PRETTY_PRINT);
if(!empty($data['todayStr']) && !empty($data['totalValue'])) {
$nowpower = (float)$data['powerValue'];
$todaypower = (float)$data['todayValue']; // kWH
$allpower = (float)$data['totalValue']; // [totalStr] => 1505.4kWh [totalValue] => 1505.4
$allpower = $allpower*1000; // Convert to Wh
$str=( $nowpower.';'.$allpower ); // times 1000 to convert the 0.1kWh to 100 WattHour and to convert 2.1kWh to 2100 WattHour
lg('Growatt Inverter: '. $nowpower.' for domoticz: '.$str);
ud(DOMOTICZDEVICE,0,$str,'GrowattInverter: Generation updated');
}
But....unfortunately the result is still the same.
Can you send me your whole script ?
-
- Posts: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
Now I see this value at today value : 3201.900
So this looks not OK. It should be 1.5 (it is cloudy outside)
So this looks not OK. It should be 1.5 (it is cloudy outside)
- Attachments
-
- growaat_new.png (11.79 KiB) Viewed 2049 times
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
Wait 24h hours it is the correction.
Look at the code change.
Look at the code change.

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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
ok , i will keep you informed
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
If you look at what changed in the code
this will explain why you see the big value. (we went from daily to total generation)
Domoticz needed this 1 time correction, hence the -xx values every day.
Next day it will look like: As you can see this is pretty much now

Domoticz needed this 1 time correction, hence the -xx values every day.
Next day it will look like: As you can see this is pretty much now

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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
@Sincze: Thanks for all your support.
It works like a charm again.
It works like a charm again.
- Attachments
-
- Growatt_OK.png (18.71 KiB) Viewed 2030 times
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Growatt shows minus value since update of domoticz
You are welcome. Maybe we should update GitHub as well.
Pull request ???

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: 74
- Joined: Wednesday 22 April 2020 15:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Growatt shows minus value since update of domoticz
I do not know how that works .
Who is online
Users browsing this forum: No registered users and 1 guest