problems reconnecting to slave

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jamarcusking
Posts: 1
Joined: Thursday 13 May 2021 9:31
Target OS: Windows
Domoticz version:
Contact:

problems reconnecting to slave

Post by jamarcusking »

Dunno where to post this.

I have a setup with a master and slave raspeberry pi, both running domoticz 4.9700, For some reason the slave pi hangs now and then and the only solution is a reboot by power toggle. So I set up an AC-swith on the slaves power adapter. The switch is controlled by the master. On the master I set up an event that toggles the power of the switch when the slave pi has been down for ten minutes (I use thepinger to check that). After reboot the slave comes up as it should and I can access it directly if I want, but the master never reconnects to the slave. I have to enter setup -> hardware and chose the slave and press [update] to reconnect. How can I make it do that automatically?

I would like to be able to do the same as a command in the event handler.

Thanks for any help!
User avatar
psubiaco
Posts: 222
Joined: Monday 20 August 2018 9:38
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Italy
Contact:

Re: problems reconnecting to slave

Post by psubiaco »

I believe it's better you solve the hang-up problem. It's not safe to turn off power supply to a linux machine with filesystem monted in read-write mode!
Linux must not crash: check the logs and connect a monitor to the HDMI output to understand why it crashes.

This is my raspberry, with hundreds of sensors and switches, 59 days uptime (because I manually switchoff it for maintenance 2 months ago).
root@casa:~# uptime
09:35:28 up 59 days, 13:06, 1 user, load average: 0,14, 0,27, 0,31

Paolo
Paolo
--
I use DomBus modules to charge EV car, get a full alarm system, control heat pump, fire alarm detection, lights and much more. Video
Facebook page - Youtube channel
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: problems reconnecting to slave

Post by waaren »

jamarcusking wrote: Thursday 13 May 2021 9:32 I would like to be able to do the same as a command in the event handler.
If you enable the developer window in your browser before you press the update button you will see the JSON/API that is send from the GUI to domoticz in the network tab.

For me it is something like

Code: Select all

http://<dz IP: dz port>/json.htm?type=command&param=updatehardware&htype=3&loglevel=0&address=192.168.192.65&port=6144&username=PI&password=obscured&extra=&name=Synology&enabled=true&idx=17&datatimeout=0&Mode1=&Mode2=0&Mode3=0&Mode4=0&Mode5=0&Mode6=0
If you send the url you copied from the network tab from your script it will update / reconnect.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest