Hi,
I developed plugin, which is reporting values to P1 meter device. Unfortunately, graphs from last 24hours doesn't looks correct at all.
I'm unsure whether it is bug with Domoticz, or Im doing something wrong, need some advice...
Here is graph:
as you see, almost every 5-10 minutes there are 0 values visible on graph and maximum values are not like these stored in db. While I'm updating correct values with my plugin, also I checked - in database I see correct values for this time period:
sqlite> select * from MultiMeter where DeviceRowID=1791 and date > '2024-07-22 13:150:00' limit 10;
+-------------+--------+---------+--------+--------+--------+--------+---------------------+-------+
| DeviceRowID | Value1 | Value2 | Value3 | Value4 | Value5 | Value6 | Date | Price |
+-------------+--------+---------+--------+--------+--------+--------+---------------------+-------+
| 1791 | 0 | 1568710 | 0 | 5946 | 0 | 0 | 2024-07-22 13:15:00 | 0.0 |
| 1791 | 0 | 1568790 | 0 | 5901 | 0 | 0 | 2024-07-22 13:20:00 | 0.0 |
| 1791 | 0 | 1568870 | 0 | 5824 | 0 | 0 | 2024-07-22 13:25:00 | 0.0 |
| 1791 | 0 | 1568870 | 0 | 5764 | 0 | 0 | 2024-07-22 13:30:00 | 0.0 |
| 1791 | 0 | 1568950 | 0 | 5702 | 0 | 0 | 2024-07-22 13:35:01 | 0.0 |
| 1791 | 0 | 1569030 | 0 | 5665 | 0 | 0 | 2024-07-22 13:40:00 | 0.0 |
| 1791 | 0 | 1569030 | 0 | 5642 | 0 | 0 | 2024-07-22 13:45:00 | 0.0 |
| 1791 | 0 | 1569110 | 0 | 5610 | 0 | 0 | 2024-07-22 13:50:00 | 0.0 |
| 1791 | 0 | 1569110 | 0 | 5591 | 0 | 0 | 2024-07-22 13:55:01 | 0.0 |
| 1791 | 0 | 1569180 | 0 | 5556 | 0 | 0 | 2024-07-22 14:00:00 | 0.0 |
+-------------+--------+---------+--------+--------+--------+--------+---------------------+-------+
And this is definition of this device :
sqlite> select * from devicestatus where id=1791;
ID|HardwareID|DeviceID|Unit|Name|Used|Type|SubType|SwitchType|Favorite|SignalLevel|BatteryLevel|nValue|sValue|LastUpdate|Order|AddjValue|AddjMulti|AddjValue2|Ad djMulti2|StrParam1|StrParam2|LastLevel|Protected|CustomImage|Description|Options|Color|OrgHardwareID
1791|35|00230056|86|Sofar - Total PV Energy|1|250|1|0|1|12|255|1|0;0;1570140;0;0;2355|2024-07-22 16:15:53|1791|0.0|1.0|0.0|1.0|||0|0|0|Total PV power|||0
and this is how Im updating inside plugin:
Devices[self.ID].Update(nValue=1,sValue=str(USAGE1+';'+USAGE2+';'+RETURN1+';'+RETURN2+';'+CONS+';'+PROD) )
What Im worrying about - the interval of updates, the time that plugin consumes to update all its devices ,takes slightly more than 1minute.
Other plugins that Im using has no issues with updating everything in < 10s (one interval cycle).
Im not sure if this is a problem.
I checked , and same behaviour (broken graph) is happening with official releases of Domoticz 2023.2 , 2024.4 and latest 2024.7
Maybe Its not Domoticz fault, but Im looking at wrong table, or updating the values in somehow wrong way ? :/
Any comments, advices ?
problems with Log (graphs) with P1 meter
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.
- waltervl
- Posts: 5853
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: problems with Log (graphs) with P1 meter
Check the P1 update API command in the wiki to understand what you are doing. Python plugin framework uses the same principle. It seems that you are sending watt= 0 at some time.
Also make sure you are not mixing up Wh and W values.
Also make sure you are not mixing up Wh and W values.
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: 24
- Joined: Monday 17 February 2020 19:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Poland
- Contact:
Re: problems with Log (graphs) with P1 meter
here is my update command , running in plugin:
Devices[self.ID].Update(nValue=1,sValue=str(USAGE1+';'+USAGE2+';'+RETURN1+';'+RETURN2+';'+CONS+';'+PROD) )
As far as I can see it is not much different to API call ( and yes, I've read the friendly manual). It is running every 10s interval (or rather way less, like 50s - 1'10s , because it cannot copy on time with all updates).
But still, MAX value visible on graph it far less than any update value on 'RETURN1' , and on graphs we see 0 values - which are not present in database at all (unless Im checking wrong table, possible ? )
It looks to me, like on graph I see some averaged points , which would be explained if Im not able to run Update() every 10 seconds interval . Im not sure if this is the case ??
And I enabled some debugs - every of my Update() is called with some values greater than 1000 , which makes W vs kW differences are completely irrelevant.
Devices[self.ID].Update(nValue=1,sValue=str(USAGE1+';'+USAGE2+';'+RETURN1+';'+RETURN2+';'+CONS+';'+PROD) )
As far as I can see it is not much different to API call ( and yes, I've read the friendly manual). It is running every 10s interval (or rather way less, like 50s - 1'10s , because it cannot copy on time with all updates).
But still, MAX value visible on graph it far less than any update value on 'RETURN1' , and on graphs we see 0 values - which are not present in database at all (unless Im checking wrong table, possible ? )
It looks to me, like on graph I see some averaged points , which would be explained if Im not able to run Update() every 10 seconds interval . Im not sure if this is the case ??
And I enabled some debugs - every of my Update() is called with some values greater than 1000 , which makes W vs kW differences are completely irrelevant.
-
- Posts: 575
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: problems with Log (graphs) with P1 meter
Could it not be that within a 1 minute interval there is no data send at all, so Domoticz assumes zero's?
Logic will get you from A to B. Imagination will take you everywhere.
- waltervl
- Posts: 5853
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: problems with Log (graphs) with P1 meter
If no data is sent, Domoticz assumes the last sent value for the 5 min view on the graph.
The green line is coming from one of the 2 values ';'+CONS+';'+PROD . So it seems you are sending 0 for both on some times.
The graph is updated every 5 min. The device widget should react instantly.
For the rest I have no idea what the internals of P1 update command is doing.
The green line is coming from one of the 2 values ';'+CONS+';'+PROD . So it seems you are sending 0 for both on some times.
The graph is updated every 5 min. The device widget should react instantly.
For the rest I have no idea what the internals of P1 update command is doing.
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