control relay through the ethernet gateway by curl / bash ?



  • I want to control a relaysensor directly through a bashscript.
    (for example with curl, but could also be python, php, whatever)

    The sense in it is, i have a server, running FHEM, i control various mysensor nodes through it.

    Sometimes, this server crashes, so i have to unplug power to reboot it.

    My idea is, as i have other servers running 24/7 (raspberry with debian), to be able to control that single relay actuator remotely to reboot the server..
    Is there any easy way to do that, or do i need a second gateway just for that purpose ?

    Best regards

    Klaus


  • Admin

    Not sure how the GW reacts if you have two separate connection open to it. You'll probably have to play with it to see what happens.



  • this was also my concern, i have to confess i don´t know what is sent between the gateway and the server

    Is there an easy solution to try ?


  • Admin

    Why don't you put up a MQTT broker (if you don't already have one) and let your RPI subscribe to some topic.


  • Hero Member

    You could hook a simple relay board to the GPIOs of the RPi and control them with a script. In case you don't have to do this over air.



  • The raspberry is far away, connected only be network

    I was thinking about a solution with a arduino mini, a network shield and a relay, looks like this is the way i also gonna go now, but had the hope that it would be totally easy to send a already existing mysensors node a simple command


  • Contest Winner

    It is relatively easy to send a command to an existing node (you can do this via serial monitor and a gateway node or even with any other mysensors node). But you did not write the setup of your system. Who will send the command (the fhem gw node)? which node will receive (another node especially for controlling the relais)? I did not get who shall do what with which ressources..


Log in to reply
 

Suggested Topics

21
Online

11.2k
Users

11.1k
Topics

112.5k
Posts