it is possible to control the Gpio of a raspberry pi connected by WiFi by another raspberry pi by a python script? I need to Connect\disconect some electric loads of my house switchboard, controled by a script runnig in a raspberry PI in my garage, this one manage the solar system like the charge of the baterries. Try to use a remote controle AC switch but is to far and ins't reayable.
You can use the SocketServer module to create a server on your pi which will make the GPIO actions. Then you can connect with your second pi as a client to that server an send your commands. Basic exmaple from the docs: server.py
client.py
|
|||
|
My pigpio Python module lets you control many networked Pis from one Python script. The controlling script can be running on Windows, Mac, Linux, or a Raspberry Pi, i.e. anything which can run Python. The Pis to be controlled each require the pigpio daemon to be running. |
|||
|