I have created a virtual device “Electric (Instant+Counter)” (with idx 5551)
I have connected a hardware-part "ShineWiFi" to my Growatt" solar-inverter and provided it with my own software that sends inverter-info to Domoticz over MQTT with JSON info : {"idx":5551,"nvalue":0,"svalue":"77;7300"} .
This works fine, however...
At midnight (00:00) the device log shows a negative value as kWh. This is not sent from the inverter because the inverter is automatically switched off at night. After sunrise, the kWh is still negative but becomes less negative as energy is generated.
Am I doing something wrong or is this a bug?
I’m using:
Domoticz Version: 2023 1 on Raspberry-pi
Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
Moderators: leecollings, remb0
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
-
- Posts: 10
- Joined: Tuesday 25 April 2023 19:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
- Attachments
-
- 1.jpg (14.02 KiB) Viewed 756 times
-
- 2.jpg (27.19 KiB) Viewed 756 times
-
- 3.jpg (34.44 KiB) Viewed 756 times
-
- Posts: 33
- Joined: Thursday 04 November 2021 21:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: UK
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
On my Sunny Boy read using SBFspot the Type = Usage, not sure if I had something strange like this years ago.
Raspberry Pi4, Sunny Boy 4000TL, Victron Multiplus II 10kw ESS, 44kWh LiFEPO4, Batrium BMS, NodeRED on Cerbo GX
-
- Posts: 7
- Joined: Monday 13 January 2020 21:16
- Target OS: Linux
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
I have same issue after last domoticz update. I workaround that with changing value from previous day to positive directly in database but it has one day of delay and it's annoying. I have tried to change Type from return to usage but it's same, it's only this one energy counter where inverter store values.
at maintenance time he takes sum of Energy Used from all day and invert it to negative.
Platform: Debian
Plugin/Hardware: https://github.com/ayasystems/froniusHttp
Version: 2023.1
Compile Date: 2023-02-14 15:06:40
dzVents Version: 3.1.8
Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]
at maintenance time he takes sum of Energy Used from all day and invert it to negative.
Platform: Debian
Plugin/Hardware: https://github.com/ayasystems/froniusHttp
Version: 2023.1
Compile Date: 2023-02-14 15:06:40
dzVents Version: 3.1.8
Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]
-
- Posts: 10
- Joined: Tuesday 25 April 2023 19:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
I found the cause.
I sent to Domoticz over MQTT the JSON message: {"idx":5551,"nvalue":0,"svalue":"77;7300"} .
The 7300 was de "total Day" energy (wH). But the Domoticz virtual device “Electric (Instant+Counter)” needs the "total overall"!
Since I put the "total overall" in the JSON message the virtual device “Electric (Instant+Counter)” works fine. No negative values anymore
I sent to Domoticz over MQTT the JSON message: {"idx":5551,"nvalue":0,"svalue":"77;7300"} .
The 7300 was de "total Day" energy (wH). But the Domoticz virtual device “Electric (Instant+Counter)” needs the "total overall"!
Since I put the "total overall" in the JSON message the virtual device “Electric (Instant+Counter)” works fine. No negative values anymore
-
- Posts: 7
- Joined: Monday 13 January 2020 21:16
- Target OS: Linux
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
I've changed line in plugin to switch to Total Overall and will see what will happen tomorrow.
Thank you for info
Jakub
Thank you for info
Jakub
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
Then you were not on the latest version as the current version looks OK
Code: Select all
acumuladoKwhFV = self.E_Total#accumulated
....
UpdateDevice("FV_POWER", 0, instantaneoFV+";"+acumuladoKwhFV)
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: 7
- Joined: Monday 13 January 2020 21:16
- Target OS: Linux
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
Thank you, I can see somebody has requested issue with negative values some time ago, I have modified this plugin to support more devices so I stopped watching author page. Looks like I did change that for some reason and it cause and issue. my bad
have a good day.
Jakub
have a good day.
Jakub
-
- Posts: 12
- Joined: Friday 26 June 2020 23:14
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
Hi,
I still have this issue running:
Version: 2024.1 (build 15792)
Build Hash: 36a973a7e
Compile Date: 2024-01-01 16:29:36
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Device definition:
{
"ActTime" : 1709115224,
"AstrTwilightEnd" : "19:10",
"AstrTwilightStart" : "04:39",
"CivTwilightEnd" : "17:52",
"CivTwilightStart" : "05:57",
"DayLength" : "10:48",
"NautTwilightEnd" : "18:31",
"NautTwilightStart" : "05:18",
"ServerTime" : "2024-02-28 11:13:44",
"SunAtSouth" : "11:54",
"Sunrise" : "06:30",
"Sunset" : "17:18",
"app_version" : "2024.1 (build 15792)",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CounterToday" : "0.000 kWh",
"CustomImage" : 0,
"Data" : "23.171 kWh",
"Description" : "",
"EnergyMeterMode" : "0",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 25,
"HardwareName" : "Virtual",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "00082612",
"LastUpdate" : "2024-02-28 11:13:16",
"Name" : "PV test",
"Notifications" : "false",
"PlanID" : "14",
"PlanIDs" :
[
14
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "kWh",
"SwitchTypeVal" : 4,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "current",
"Unit" : 1,
"Usage" : "870 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "612"
}
],
"status" : "OK",
"title" : "Devices"
}
I send data from Node Red. Sample as below:
{"command":"udevice","idx":612,"nvalue":0,"svalue":"790;23171"}
and I still get negative values from time to time :/
What do I do wrong ?
I still have this issue running:
Version: 2024.1 (build 15792)
Build Hash: 36a973a7e
Compile Date: 2024-01-01 16:29:36
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Device definition:
{
"ActTime" : 1709115224,
"AstrTwilightEnd" : "19:10",
"AstrTwilightStart" : "04:39",
"CivTwilightEnd" : "17:52",
"CivTwilightStart" : "05:57",
"DayLength" : "10:48",
"NautTwilightEnd" : "18:31",
"NautTwilightStart" : "05:18",
"ServerTime" : "2024-02-28 11:13:44",
"SunAtSouth" : "11:54",
"Sunrise" : "06:30",
"Sunset" : "17:18",
"app_version" : "2024.1 (build 15792)",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CounterToday" : "0.000 kWh",
"CustomImage" : 0,
"Data" : "23.171 kWh",
"Description" : "",
"EnergyMeterMode" : "0",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 25,
"HardwareName" : "Virtual",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "00082612",
"LastUpdate" : "2024-02-28 11:13:16",
"Name" : "PV test",
"Notifications" : "false",
"PlanID" : "14",
"PlanIDs" :
[
14
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "kWh",
"SwitchTypeVal" : 4,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "current",
"Unit" : 1,
"Usage" : "870 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "612"
}
],
"status" : "OK",
"title" : "Devices"
}
I send data from Node Red. Sample as below:
{"command":"udevice","idx":612,"nvalue":0,"svalue":"790;23171"}
and I still get negative values from time to time :/
What do I do wrong ?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device “Electric (Instant+Counter)”gives Negativ value kWh at midnight
{"command":"udevice","idx":612,"nvalue":0,"svalue":"790;23171"}
23171 should be a rolling Total counter.
23171 should be a rolling Total counter.
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
Who is online
Users browsing this forum: No registered users and 1 guest