[SOLVED] 8CH Relay Board Clicks Same Relay Each Time

ajaz1986

Reputable
Oct 30, 2018
45
0
4,540
Got a Pi4 which I am using with a monitoring script, controlled via a Telegram bot. The script has been tested and runs perfectly and I've got it setup to autorun on bootup, here is the script: https://github.com/Kasmetski/auto-hard-reset I'm using an 8CH board instead of 4CH since I have 6 devices to monitor.

Problem:
I command it to reboot machine 1 via Telegram and it does so fine.
I command it to reboot machines 2-6 via Telegram and it reboots machine 1 every time.

My config.json:
{ "Name": "m0", "Pin": "40", "Ip": "192.168.1.101", "Info": "RX480 8GB" },

{ "Name": "m1", "Pin": "38", "Ip": "192.168.1.102", "Info": "RX480 8GB" },

{ "Name": "m2", "Pin": "37", "Ip": "192.168.1.103", "Info": "RX470 4GB" },

{ "Name": "m3", "Pin": "36", "Ip": "192.168.1.104", "Info": "RX480 8GB" },

{ "Name": "m4", "Pin": "35", "Ip": "192.168.1.105", "Info": "RX480 8GB" },

{ "Name": "m5", "Pin": "33", "Ip": "192.168.1.106", "Info": "RX480 8GB" }

Does anyone have any ideas why this could be happening? I haven't changed any other code from Github, only the config.json was changed as above to match my LAN IP's.
 
Last edited:
Solution
It's ok I worked it out... it seems from the below image, the dev used the command /turnon 1,2,3, etc instead of the name m0,m1,m2 etc... it seems the "Name" has no relevance to the command.

It's ok I worked it out... it seems from the below image, the dev used the command /turnon 1,2,3, etc instead of the name m0,m1,m2 etc... it seems the "Name" has no relevance to the command.

 
Solution