imcooltanmay
Posts: 2
Joined: Sat Jan 05, 2019 2:46 pm

Get status of manual wall board switch.

Mon Jan 07, 2019 7:36 am

Hello Techies,

Currently i am developing home automation system.
Can any one help me to get wall switch status on raspberry pi I have research a lot but no luck


Sorry for my bad English.
switch.JPG
switch.JPG (13.37 KiB) Viewed 179 times

PhatFil
Posts: 1685
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Get status of manual wall board switch.

Mon Jan 07, 2019 9:09 am

Mixing mains voltage with diy electronics can be FATAL! its not a good idea.. not forgetting that adding a diy device to your mains wiring will probably invalidate any insurances when it burns your house down.

Generally the solution involves a smart switch which replaces the 'olde worlde' mechanical device. there are lots of esp8266 soc based devices which can be interfaced via manufacturer supplied apps and remote servers or in many cases can be reprogrammed with your own custom or community developed firmware.


the shelly https://shelly.cloud/ is an off the shelf product that does the job via wifi and can be interfaced with a mqtt broker you host on your pi out of the box, the itead/sonoff brand range of wifi devices are a little cheaper and can be reflashed with tasmota firmware for a fully featured iot device you can control directly via its own web interface or via a number of established protocols and control systems. https://github.com/arendst/Sonoff-Tasmota/wiki

the problem with many of the commercial products (here in the UK) is that they require a constant mains feed while many switch box housings only contain a switched live line resulting in an always on light when a smart switch is wired into the loop ..

so Perhaps enclosing in a suitably certified safe device behind a plate and covering with something like:

https://www.aliexpress.com/item/Wall-Pa ... st=ae803_4

for circa $10 usd a sonoff RF bridge can be reprogrammed with tasmota (link above) and convert the 433mhz signals from such a switch to a wifi- mqtt topic/payload which your pi can pick up and process and issue further mqtt to control any relevant devices.

Return to “Troubleshooting”