Page 1 of 1

Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Wednesday 26 November 2025 12:13
by jpmd
Issue: P1 power device; graph "comparing usage/Return" slow.

It takes 20 seconds for the "comparing usage/Return" graph to load. It also takes 20 seconds for the graph to reappear after clicking on usage or pressing Return.

I reinstalled a blank Raspberry Pi with the latest software, including the P1 hardware, in Domoticz.

I transferred the P1 device history from the old RPi installation to the new installation using sqlite3 (tables: MultiMeter and MultiMeter_Calendar).

If the old domoticz.db is placed in the new RPi, this problem doesn't occur. However, for various reasons, transferring the old domoticz.db isn't unfortunately an option.

Does anyone know why the "comparing usage/Return" graph is slow?

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Wednesday 26 November 2025 20:00
by waltervl
Try to clear your browser cache or try with a browser session in private/incognito mode. Could be some old JavaScripts are used on a new database causing issues.

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Wednesday 03 December 2025 18:09
by jpmd
clearing browser cache did not help.

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 11:25
by waltervl
How many years of data do you have in your database?
Do you see the same issue on other compare graphs (other counter devices, temperature devices)?
Do you see issues in the log (menu setup Log) when opening the log page of the P1 device?
Do you see the same issue when opening the log page on another PC, smartphone etc?

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 13:34
by jpmd
I'v 5 years of data on P1-devices. The power device graph "comparing usage/Return" appears immediately. But, when I create a new raspberryPi environment including Domoticz and a new P1 device and transfer with SQLite the history from current running rpi environment to the new environment, then I see all the history but the graph "comparing usage/Return" needs 20 seconds to appear.

There are no issues seen in the the log.
The issue appears independently from the PC

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 15:15
by waltervl
Why transfer data with SQLLite? Probably you transfered old type of data into a new database. So there it could go wrong.

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 16:38
by jpmd
The reason is that I have to upgrade Raspbian because the new version of Domoticz is not working on my old raspbian.
Upgrading Raspbian is not possible (gives errors). So, I need to build a clean initial raspbian. And for some unkown reason, IDX-nummers have now a value in the range of 8000! I only have about 30 devices. So I want to recreate all my devices, but for the P1 devices I want keep the history. The usual replace function of a device does not work! So I used sqlite. That works fine. History can be transfered to the new created devices. unfortunately the P1-device-graph "comparing usage/Return" spends 20 sec to appear.....

I don't think that the table-structure is changed. The table-names, where P1-history are stored are the same (MultiMeter and MultiMeter_Calendar). Also the structure is the same. And whital, al the P1-history is shown, only the P1-device-graph "comparing usage/Return" spends 20 sec to appear.....

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 16:53
by waltervl
You could have just copied the ould domoticz.db to your new install. On start of Domoticz it will recognize it as an old db and convert it to a new database specification if needed.

I dont know why Domoticz is taking so long on this P1 data.

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 16:56
by jpmd
Right, I'v done that. It works fine. But then I still have the idx-numbers in the range of 8000.
It would be fine to clean up this mess.

Re: Dmoticz-device "P1 power" ; graph: "compairing usage/Return" slow.

Posted: Thursday 04 December 2025 17:02
by waltervl
No problem with that.....