Can i copy the old “0.8” database to use it in 0.9?
-
[solved] copy v0.8 Database to v0.9
Pimatic 0.9 i love it!
-
I did that on both my machines (but had backups) and it functions without problem. It simply continues where it left. All my “old” sensor values from before the update are still there.
I also tried that with a direct query (on a copy of the database) like
select deviceattribute.id, deviceAttribute.deviceId, strftime('%Y-%m-%d %H:%M:%S', time / 1000,'unixepoch'), attributeValueNumber.value from attributeValueNumber inner join deviceAttribute on deviceAttribute.id = attributeValueNumber.deviceAttributeId where deviceAttribute.deviceId='garagebuitensensor' and deviceAttribute.attributeName='temperature';
My device was
garagebuitensensor
and it measures temperature which is also the name for ittemperature
.You can also use some sqlite gui and copy the queries in.
-
Somehow something went wrong with my first post. It only contained 1 line but I could not edit it. I deleted it, restored it and could edit it.
This 2nd post is only to make clear to “early” viewers that the first oneliner was not correct. -
it is possible to copy the whole database?
withcp /home/pi/pimatic-v08/pimatic-database.sqlite /home/pi/pimatic-app/pimatic-database.sqlite pimatic-database.sqlite
?
i have never done something with database in the terminal .Pimatic 0.9 i love it!
-
Yes, that is exactly what I did on my 2 installations.
I mentioned that I had backups and that were the ones in my “old” V 0.8 folder (next to nightly backups).Of course you need to make sure that pimatic is not running when doing the copy (and do a copy and not a move).
However, your command should be:
cp /home/pi/pimatic-v08/pimatic-database.sqlite /home/pi/pimatic-app/pimatic-database.sqlite
or
cp /home/pi/pimatic-v08/pimatic-database.sqlite /home/pi/pimatic-app
-
@Harry-van-der-Wolf
ok thanks a lot it worksPimatic 0.9 i love it!
-
I will add this information to the update thread. Thx guys!
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !