Detecting on/off status and actuating a switch with Node-RED

Any advice on how to go about detecting the status of this type of led-switch in a non-destructive or intrusive way to automate it with Node-RED?

Going to need more of a clue than just a picture :slight_smile:

I need a way to detect if the device's switch is in the on or off position, it lights up an led inside the red switch when in the on position. And I need a way to actuate the red switch, hopefully without destructive/intrusive means (his mom would not appreciate that for a school project). But I don't know what kind of hardware/sensor would be best to accomplish this task. So far I tried an LDR but in a well lit room that seems to not work very well.

Does it have any comms capability? If not then I suppose you could sense it with a light sensor, but to actuate it you will presumably need some sort of mechanical device.

I have a servo that I think I'm going to end up using to actuate it, the detection part is more the issue I think. No comms unfortunately.

Surround the switch in a lightproof (more or less) box and then the sensing should be reliable. You are going to need some sort of housing for the solenoid anyway.

Thanks, I think this is the route I'll go down first, if no problems then I may have to go to a makerspace and 3D print a housing to replace a scrap materials test version.

Plug the device into a smart socket which has power monitoring and you can interrogate the socket.

My Espresso machine was built before the internet and it's definitely not smart, yet from the smart socket I can tell that it is currently switched on and consuming 1100 Watts

And because the Espresso machine switch is always On, I can turn the boiler on via the smart switch before I venture out of bed in the morning.

2 Likes

Yes, if the on/off feature can be achieved by switching the power supply then use an external device to do that. I use Zigbee sockets for such things.