change the sensor type and subtype without losing the history?

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
keesberg
Posts: 2
Joined: Wednesday 02 August 2023 14:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

change the sensor type and subtype without losing the history?

Post by keesberg »

I previously created virtual sensors for my Omnik inverter.
(Type: General, Subtype: Custom Sensor) Because these values are incorrect, I can't correctly record the Omnik values in my Energy Dashboard.
How I can change the sensor type and subtype without losing the history?
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: change the sensor type and subtype without losing the history?

Post by waltervl »

Create a new correct virtual sensor, update your scripts and start from there.... Do not remove the old one yet.
See how things work out for a couple of days.
Then you probably need some manual database manipulation to copy the old data into the new device meter_calender table. The normal replace device function will not work as the devices are different.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
keesberg
Posts: 2
Joined: Wednesday 02 August 2023 14:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: change the sensor type and subtype without losing the history?

Post by keesberg »

OK thanks for this solution.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest