keeping Raspberry PI up-to-date
Moderator: leecollings
-
- Posts: 94
- Joined: Monday 26 October 2015 10:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
keeping Raspberry PI up-to-date
Hi,
I sinstalled Domoticz on a Raspberry Pi 2 by late 2015, using the standard image provided by the Domoticz team.
So far, everything is all right..
But I now want to install also a Mysensors gateway, and I wanted to install that gateway on the PI hosting Domoticz, which should run smoothly based on Mysensors team feedback.
But I face issues on installing that gateway, and part of my worries (or at least part of them), seem to come from my old version of linux: apparently, the standard image I used is Wheezy, whereas instructions for that gateway are for Jessie (instrtuctions, but also version of GCC creates errors when making the files).
So, I've one basic question : is it worth upgrading my PI to get the latest Jessie versions, or should I rather stay with Wheezy and see if I can find workarounds without Jessie ? (I also saw that Jessie is now the preferred Domoticz environment as per Wiki..)
Is an upgrade 'safe' ? or too risky, and I should go from another clean install.. but meaning I'd have to reinstall all scripts, CRON, whatever else I had to customize.
If you think upgrading is worthwhile and safe, do you know a good tutorial ? I found that one : http://www.journaldulapin.com/2016/03/0 ... pberry-pi/
Is there a better one ?
br,
Ricorico94
I sinstalled Domoticz on a Raspberry Pi 2 by late 2015, using the standard image provided by the Domoticz team.
So far, everything is all right..
But I now want to install also a Mysensors gateway, and I wanted to install that gateway on the PI hosting Domoticz, which should run smoothly based on Mysensors team feedback.
But I face issues on installing that gateway, and part of my worries (or at least part of them), seem to come from my old version of linux: apparently, the standard image I used is Wheezy, whereas instructions for that gateway are for Jessie (instrtuctions, but also version of GCC creates errors when making the files).
So, I've one basic question : is it worth upgrading my PI to get the latest Jessie versions, or should I rather stay with Wheezy and see if I can find workarounds without Jessie ? (I also saw that Jessie is now the preferred Domoticz environment as per Wiki..)
Is an upgrade 'safe' ? or too risky, and I should go from another clean install.. but meaning I'd have to reinstall all scripts, CRON, whatever else I had to customize.
If you think upgrading is worthwhile and safe, do you know a good tutorial ? I found that one : http://www.journaldulapin.com/2016/03/0 ... pberry-pi/
Is there a better one ?
br,
Ricorico94
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: keeping Raspberry PI up-to-date
Even Jessie is already old... Now it's Stretch.
Either you update from Wheezy to Jessie and then to Stretch using apt-get update && apt-get upgrade && apt-get dist-upgrade
Or you do a clean install of Jessie and restore your Domoticz backup.
Either you update from Wheezy to Jessie and then to Stretch using apt-get update && apt-get upgrade && apt-get dist-upgrade
Or you do a clean install of Jessie and restore your Domoticz backup.
-
- Posts: 676
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: keeping Raspberry PI up-to-date
I hope your pi is not connected to the internet. Not updating can be risky, got me a phishingpage hosted on a linux system once.
Anyway, in your case I would by a second sd card and install the new system on that card. So you can put the working card back at the end of an evening or so. Also keeps you wife (or so) happy.
Anyway, in your case I would by a second sd card and install the new system on that card. So you can put the working card back at the end of an evening or so. Also keeps you wife (or so) happy.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: keeping Raspberry PI up-to-date
Pieuw.. Fingers crossed.. Jessie to Stretch it will have to be.....Egregius wrote:Even Jessie is already old... Now it's Stretch.
Either you update from Wheezy to Jessie and then to Stretch using apt-get update && apt-get upgrade && apt-get dist-upgrade
Or you do a clean install of Jessie and restore your Domoticz backup.
Sent from my SM-G925F using Tapatalk
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 94
- Joined: Monday 26 October 2015 10:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: keeping Raspberry PI up-to-date
Hi,
Your advice make sense.. Clean install is always better..
However, I couldn't find a tutorial detailing all steps to really migrate domoticz to new installation: in my understanding, copying the domoticz is not enough, as there are other files and customizations : wifi config, files to make USB persistent assignment, CRON tabs, openzwave (unless domoticz is now installing it by default?), installing python, pigz, some scripts (potentially stored under domoticz folder), etc..
Is there an easy way to migrate all these cstimisations to new SD image ?
br,
Ricorico94
Your advice make sense.. Clean install is always better..
However, I couldn't find a tutorial detailing all steps to really migrate domoticz to new installation: in my understanding, copying the domoticz is not enough, as there are other files and customizations : wifi config, files to make USB persistent assignment, CRON tabs, openzwave (unless domoticz is now installing it by default?), installing python, pigz, some scripts (potentially stored under domoticz folder), etc..
Is there an easy way to migrate all these cstimisations to new SD image ?
br,
Ricorico94
-
- Posts: 676
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: keeping Raspberry PI up-to-date
What I did starting the first installation, I wrote down all steps needed. When I do a new install I simply use that and adapt it a bit because jessie took some different thins as well did stretch. Openzwave has been compiled in in domoticz since a long time. (At least over 2 years).
With crontab -l > crontab.txt you can make a backup of your crontab. Backup your scripts directory. All other files I update (for instance rsyslog.conf, zwfg file) I copy to a subdir of the scripts dir so it gets backupped automatically daily. Finally I backup the file I personally added or updated in the www dirs. Not the complete dir because you get problems when updating domoticz.
And use google a lot.
With crontab -l > crontab.txt you can make a backup of your crontab. Backup your scripts directory. All other files I update (for instance rsyslog.conf, zwfg file) I copy to a subdir of the scripts dir so it gets backupped automatically daily. Finally I backup the file I personally added or updated in the www dirs. Not the complete dir because you get problems when updating domoticz.
And use google a lot.
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: keeping Raspberry PI up-to-date
I have the same challenge ahead of me as I'm still running Domoticz on RPi2 / Wheezy and will migrate to RPi3 / Stretch. After the normal RPi / Raspbian procedures I will (at least):ricorico94 wrote: ↑Wednesday 18 October 2017 0:27 Hi,
Your advice make sense.. Clean install is always better..
However, I couldn't find a tutorial detailing all steps to really migrate domoticz to new installation: in my understanding, copying the domoticz is not enough, as there are other files and customizations : wifi config, files to make USB persistent assignment, CRON tabs, openzwave (unless domoticz is now installing it by default?), installing python, pigz, some scripts (potentially stored under domoticz folder), etc..
Is there an easy way to migrate all these cstimisations to new SD image ?
br,
Ricorico94
- Install monit and copy the config file (/etc/monit/monitrc)
- Install git
- Install jq
- Install homebridge and eDomotic-homebridge (and copy the config file, maybe also persistent data)
- Install HarmonyHubCLI
- Install mosquitto
- Install node
- Install python-oauth
- Install python-setuptools
- Install nginx
- Copy crontab
- Copy persistent USB devices config (/etc/udev/rules.d/99-usb-serial.rules)
- Install Domoticz
- Install dtgbot
- Restore latest domoticz.db backup
- Restore latest ../domoticz/xxx backup (/scripts, /www/templates etc)
- Copy certain files from /etc/init.d, at least domoticz.sh and dtgbot, maybe homebridge (but ok, not sure if all these can be used with Stretch anymore?)
- Change IP to same as the original RPi2 (after everything is ready with the new installation)

-
- Posts: 744
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: keeping Raspberry PI up-to-date
When I did such a job a couple months back, i had an issue with my fritzbox: putting a new device on the network, with the same ip address as the disconnected old one. It did not work well. I had to delete in the fritzbox the current port forward for the original pi to really release the old mac address/ip combination of the old pi. Really weird.
Verstuurd vanaf mijn SM-G930F met Tapatalk
Verstuurd vanaf mijn SM-G930F met Tapatalk
-
- Posts: 676
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: keeping Raspberry PI up-to-date
I also have a fritzbox with also a port forward, but no issues when changing pi's. Already did it twice. The pi has no dhcp.
-
- Posts: 94
- Joined: Monday 26 October 2015 10:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: keeping Raspberry PI up-to-date
Hi,
@jannl:
@Nautilus : would you by chance have the list of commands you use for doing all these steps ? My knowledge is still limited in Linux and despite I try to understand the logic and the commands, there most often plenty of switches and I'm always afraid of making a mistake.
Thanks a lot !
Ricorico94
@jannl:
Could detail me how you do that ? do you add a script in a CRON table ?I copy to a subdir of the scripts dir so it gets backupped automatically daily
@Nautilus : would you by chance have the list of commands you use for doing all these steps ? My knowledge is still limited in Linux and despite I try to understand the logic and the commands, there most often plenty of switches and I'm always afraid of making a mistake.
Thanks a lot !
Ricorico94
-
- Posts: 676
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: keeping Raspberry PI up-to-date
It is in the wiki: https://www.domoticz.com/wiki/Daily_bac ... ternal_hdd.
There are several examples, use pieces from all of them.
Do not stop/start Domoticz when using the json backup call.
There are several examples, use pieces from all of them.
Do not stop/start Domoticz when using the json backup call.
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: keeping Raspberry PI up-to-date
Sorry I'm afraid the answer is no. I'll probably document it step by step once I get around it but until then it is only that list. And please note that for a "standard" Domoticz installation majority of the steps is not required. I think it is mostly that you install Domoticz, then copy over you backup of /home/pi/domoticz....ricorico94 wrote: ↑Thursday 19 October 2017 12:50 @Nautilus : would you by chance have the list of commands you use for doing all these steps ? My knowledge is still limited in Linux and despite I try to understand the logic and the commands, there most often plenty of switches and I'm always afraid of making a mistake.
Who is online
Users browsing this forum: No registered users and 1 guest