Proxmox HA option = redundant Domoticz ?

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
renerene
Posts: 347
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Proxmox HA option = redundant Domoticz ?

Post by renerene »

I am currently preparing to transition from an RPi to a NUC with the help of Proxmox. My first impressions are very positive: no more reliance on SD cards or USB sticks, faster response times, the ability to manage each application in a separate Virtual Machine or Container, and easy backups.

My question: What are your recommendations regarding Clustering and the High Availability (HA) option in Proxmox? This feature mirrors storage across two or more nodes every 15 minutes and automatically starts a new VM if one fails. It seems like a great way to quickly recover and get back online in case of an NUC or SSD failure.

However, when I look into it further, it doesn’t seem as straightforward as I hoped. USB devices (e.g., RFXcom, Z-wave, P1 meter, Zigbee) would need to be reconnected manually, and more importantly, the IP address of the new VM would need to be adjusted for accessing the MQTT server (on the same VM) and Domoticz.

How do you approach these challenges?
jannl
Posts: 639
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by jannl »

The faster response times are most likely because of the NUC. I do not use SD cards or USB sticks since years (I use an SSD).

And for redundancy, I am thinking about implementing a powercycle on my Pi in case of a problem, which only occurs every few years (knock on wood). I guess doing this with for instance a HUE outlet would be the easiest way.

What you want is obviously the nice way to go. As far as I know it should be possible. As long as you only spin up the VM in case of a problem, the settings can be the same (same ip, usb settings etc), the never should be active at the same time.

Not really an answer to your question.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by waltervl »

I have Monit installed that checks my Domoticz server process and if Domoticz fails it tries to restart Domoticz, if that fails it reboots the complete system.
Never have long timeout due to this. So redundancy to have multiple VMs is in my opinion not needed. Redundancy is only needed if the host hardware (the NUC) is failing. And then you need another NUC so you can move the Domoticz VM to another host hardware (NUC). But this is way too big and complex setup for something like home automation.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jannl
Posts: 639
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by jannl »

That works as long as the PI is responding. I have my own scripts that checks if domoticz is responding and restarts/reboots when needed.

Just as monit will only work as long as the os is responding.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by Egregius »

I think you first need to ask yourself if it's all worth it? I mean, do you have that many failures to set up a redundant system? I worked with Windows print servers in cluster and that was just a pain to manage.
I am also running Domoticz in a Proxmox CT and never had an issue since. In case of a true hardware failure I can setup Proxmox quite quick on other hardware and recover the backup.
If you do want to go the cluster way I'm mostly wondering how you would handle the Z-wave stick. You simply can't have 2 controllers.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by waltervl »

jannl wrote: Friday 24 January 2025 11:12 That works as long as the PI is responding. I have my own scripts that checks if domoticz is responding and restarts/reboots when needed.

Just as monit will only work as long as the os is responding.
And how do you remotely reboot the Pi if the OS on the Pi is not responding anymore? External power switch?
I myself have never had this situation that my hardware/OS was not responding anymore.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jannl
Posts: 639
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by jannl »

I just bought a zigbee switch which I will connect to Philips Hue. When I connect via VPN, I will be able to powercycle the Pi.

I can remember I had that long ago. But as said, also this morning.

Edit: back in 2014 I had this a lot more, because of the backups Domoticz was making on the SD card. But with an SD card powercycling mostly corrupts the filesystem on the SD card.
renerene
Posts: 347
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by renerene »

I myself have never had this situation that my hardware/OS was not responding anymore.
Good for you.
I do not use SD cards or USB sticks since years (I use an SSD).
The SSD in my laptop broke after 7 years.
If you do want to go the cluster way I'm mostly wondering how you would handle the Z-wave stick. You simply can't have 2 controllers.
yes, see original post. I'm moving away from "Proxmox auto cluster take-over" idea therefor. Use Proxmox for better backup system, not for High Availability option. That is more for web server goals intended.
But this is way too big and complex setup for something like home automation.
After 10 years of automation with rpi/DZ my house (and my wife) is in pretty bad shape when it goes down. Load balancing, heating/cooling system, lights.... believe me, you don't want to go there. And yes, i made the mistake on same places to have the Domotiz system as only drinvig system, , i.e. zigbee switch turns on zwave light = only DZ operated. Not very smart, but that's the way it is.
No, i don't want buy a OTGW thermostat, i want the make the algorithm myself, with load balance based on dynamic pricing ;-)

Things got better, but every two years or so i have an issue that the system is down. After the last crash the time and stress no longer outweigh a €300 investment of two refurbished NUCs, which promise a more solid system.
PierreT
Posts: 50
Joined: Wednesday 03 May 2023 10:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by PierreT »

Hate to say it, but storage syncs are only valid when there are no pending writes in the system's memory. As there usually are, in particular databases are susceptible to corruption as a single write tends to touch multiple disk blocks not all of which may have been committed at the time the automated sync takes it snapshot.
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by solarboy »

I had to restore my Domoticz VM this week and a simple restore of the VM was not enough to bring up a working system, I had to reboot the whole node (Intel Nuc). This was repeatable so maybe related to what PierreT is saying.

Ultimately it still worked though, just something to bear in mind.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
renerene
Posts: 347
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by renerene »

solarboy wrote: Sunday 26 January 2025 23:28 I had to restore my Domoticz VM this week and a simple restore of the VM was not enough to bring up a working system, I had to reboot the whole node (Intel Nuc). This was repeatable so maybe related to what PierreT is saying.

Ultimately it still worked though, just something to bear in mind.
Interesting. Did you use clustering or just backup restore? If i remember correct there is an option in proxmox to shutdown before making backup.

In case of 'shutdown before backup': Unfortunatly i did not found a way to change backup time from 21:00 to 3:00 hr
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by solarboy »

It was a simple back up (which was made while the VM was running). I can't find the shutdown-before-backup option though.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Proxmox HA option = redundant Domoticz ?

Post by Egregius »

Do you mean in a Proxmox backup?
That's called STOP mode. The schedule and mode are set at Datacenter --> Backup
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest