Today counter stopped working

Moderator: leecollings

Post Reply
Mithrandir
Posts: 11
Joined: Thursday 22 October 2020 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Today counter stopped working

Post by Mithrandir »

Hi all,

Running domoticz on my pi for a very long time and now running into a small problem. It doesn’t show the total for today anymore as it used to till last Saturday (now Monday). it just says 0.0000. However current power is updating normally and “last seen” is also live.

When I logged in and checked status of domoticz there was an issue with the journal, so I restarted the app. The status is now all ok.

Anyone any idea what is happening? It looks like the data is coming in normally from my P1 smart meter.

Thanks!
User avatar
waltervl
Posts: 5736
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Today counter stopped working

Post by waltervl »

Check the log messages. Do you see CRC messages as that indicate a cable issue.
Or your smart meter somehow giving starange results due to a firmware update.
You can check by getting the P1 telegram
o check that Domoticz is receiving valid information use in command line (replace USB device and speed if needed):

Code: Select all

sudo service domoticz stop
sudo cu -l /dev/ttyUSB0 -s 115200
This should show the telegram in readable format
close terminal and start domoticz again:

Code: Select all

sudo service domoticz start
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Mithrandir
Posts: 11
Joined: Thursday 22 October 2020 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Today counter stopped working

Post by Mithrandir »

I actually didn’t check the domoticz logs…

It says the following on a place with error (I create a daily backup)
2023-01-24 08:00:00.926 Status: Starting automatic database backup procedure...
2023-01-24 08:00:00.768 Error: SQL Query("INSERT INTO MultiMeter (DeviceRowID, Value1, Value2, Value3, Value4, Value5, Value6) VALUES ('1', '13480960', '1580683', '340', '0', '13452568', '3771582')") : database disk image is malformed
2023-01-24 08:00:00.907 Error: SQL Query("DELETE FROM MultiMeter WHERE strftime('%s',datetime('now','localtime')) - strftime('%s',Date) > (SELECT p.nValue * 86400 From Preferences AS p WHERE p.Key='5MinuteHistoryDays')") : database disk image is malformed
2023-01-24 08:00:01.033 Error: SQL Query("VACUUM") : database disk image is malformed
2023-01-24 08:00:04.023 P1: P1 Smart Meter (Energie)
2023-01-24 08:00:04.022 Status: Ending automatic database backup procedure...
2023-01-24 08:00:11.798 P1: P1 Smart Meter (Energie)

It’s only going wrong with energy total. Current usage and my gas meter is working properly.

I can go back to an earlier back-up, but any ideas how to insert data from newer files that isn’t corrupt?
User avatar
waltervl
Posts: 5736
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Today counter stopped working

Post by waltervl »

Check the troubleshooting wiki for repair of your database: https://www.domoticz.com/wiki/Troubleshooting
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
HvdW
Posts: 599
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Today counter stopped working

Post by HvdW »

Bugs bug me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest