Hi,
I reset a OWL Micro+180 because it didn't send anymore data to domoticz.
So, I have to restore the backup of the database, add the new device, and replace with the old one to have the entire history of the device.
But I have a problem. One data ("Utilisation de l'énergie") in the 7 days graph is stuck at zero and I don't know why.
If I look in the database, the new values are below than the older one. I think the problem comes here.
But if I change theses values, the problem will occurs again.
Have you an idea please ?
Thanks a lot.
Replace a device and conserve history
Moderators: leecollings, remb0
-
- Posts: 5
- Joined: Sunday 22 April 2018 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Replace a device and conserve history
- Attachments
-
- Capture d’écran 2018-04-22 à 10.46.33 copie.jpg (165.46 KiB) Viewed 1644 times
-
- Capture d’écran 2018-04-22 à 16.16.47.png (290.03 KiB) Viewed 1645 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Replace a device and conserve history
Recent data for this type of data is stored in the Meter table. Older data is summarized and moved to Meter_Calender.Unrender wrote: ↑Sunday 22 April 2018 21:05 ...
One data ("Utilisation de l'énergie") in the 7 days graph is stuck at zero and I don't know why.
If I look in the database, the new values are below than the older one. I think the problem comes here.
But if I change theses values, the problem will occurs again.
...
So if you want manipulate the values of this device in the database you have to do that in both tables.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 5
- Joined: Sunday 22 April 2018 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Replace a device and conserve history
I tried but it makes wrong data -> consumption of more than 300.000 kWh for a day
And after doing that, at the next send of data, it show again 0 kWh in the first graph.

And after doing that, at the next send of data, it show again 0 kWh in the first graph.
-
- Posts: 5
- Joined: Sunday 22 April 2018 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Replace a device and conserve history
Nobody has the same problem ?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Replace a device and conserve history
What is the hardware, type and subtype of this device ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 5
- Joined: Sunday 22 April 2018 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Replace a device and conserve history
It's an OWL Micro+ CM180 (used with RFLink).
Type General and Subtype kWh.
Type General and Subtype kWh.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Replace a device and conserve history
If I look at what the domoticz flow is with a similar sensor-device I use:
sensor updates DeviceStatus table (sValue field) with "usage;counter" -- independent of what is already in the database
DeviceStatus.sValue is copied to Meter table counter -> Value and computed usage -> Usage -- every 5 minutes
Meter.Value -> Meter_Calendar.Counter and computed Meter.Usage -> Meter_Calendar.Value -- once a day
So whatever you change in the database will not change what comes from the sensor-device. If you cannot access the memory of the sensor-device and change the counter there you are kind of stuck.
The only possible other work-around I can think of is creating a database trigger that modifies the values coming from the DeviceStatus table to the Meter table. My SQL knowledge is far to rusty to create such a trigger without messing up your data even further but there must be enough database guru's around on this forum...
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 5
- Joined: Sunday 22 April 2018 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Replace a device and conserve history
Hum OK.
It gets to hard for me
Never mind for the history.
I prefere start all over again.
I think it's better.
Thank you for your answers guy
It gets to hard for me

Never mind for the history.
I prefere start all over again.
I think it's better.
Thank you for your answers guy

Who is online
Users browsing this forum: No registered users and 1 guest