Hi there,
I used the P1-USB for 2,5 years and replaced it with the P1-WiFi Gateway.
Would like to migrate the data, which my P1-USB collected, to my P1-WiFi device so i habe all the log data in one place and can safely remove the P1-USB device.
So, does anyone know how i can migrate my P1 USB data to my new P1-WiFi device?
Kind regards,
Justino
Migrate P1-USB usage data to P1-WiFi
Moderator: leecollings
-
- Posts: 19
- Joined: Thursday 14 January 2016 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10548
- Location: The Netherlands
- Contact:
Re: Migrate P1-USB usage data to P1-WiFi
Anyone who can help me migrate this data?
-
- Posts: 153
- Joined: Tuesday 28 June 2016 16:38
- Target OS: Windows
- Domoticz version: Beta
- Location: Amersfoort NL
- Contact:
Re: Migrate P1-USB usage data to P1-WiFi
At the Electricity and Gas device you can click on Adjust/Aanpassen and the you can select replace/Vervang. Selecting the new device will do what you want as far as i know.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Migrate P1-USB usage data to P1-WiFi
Before you start; ensure you have a working and tested backup process !
stop domoticz
#copy live database to backup copy
cd domoticzdir
sudo cp domoticz.db domoticz.keep_20190320
# change OLD_ID and NEW_ID in sqlite commands below
sudo sqlite3 domoticz.db
-- For P1 elektricity
-- prevent double entries;
delete from multimeter where devicerowid = OLD_ID and date in (select date from multimeter where devicerowid = NEW_ID);
delete from multimeter_calendar where devicerowid = OLD_ID and date in (select date from multimeter_calendar where devicerowid = NEW_ID);
-- transfer old device to new device;
update multimeter set devicerowid = NEW_ID where devicerowid = OLD_ID;
update multimeter_calendar set devicerowid = NEW_ID where devicerowid = OLD_ID;
.quit
start domoticz and test. If not OK you can copy the domoticz.keep_20190320 back to domoticz db
Repeat the same for P1 Gas (change multimeter to meter and multimeter_calendar to meter_calendar)
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
Who is online
Users browsing this forum: No registered users and 1 guest