How to build an overridable MySensors relay based device (e.g. lamp with manual switch)
-
@ghiglie
It's stalled a bit due to work commitments. Prototype does everything EXCEPT keep the OpenHAB status in sync. I can control from openhab or from a separate node (that's just a switch).I need to update the code on the light node to keep openhab in sync and it'll be done. Then on to trying to build hardware that'll suit.
@anonymouslemming I understand. I'll track this topic! ;)
-
@ghiglie
It's stalled a bit due to work commitments. Prototype does everything EXCEPT keep the OpenHAB status in sync. I can control from openhab or from a separate node (that's just a switch).I need to update the code on the light node to keep openhab in sync and it'll be done. Then on to trying to build hardware that'll suit.
@anonymouslemming Sorry for self-advertising, but i'm think my project https://forum.mysensors.org/topic/7417/ikea-varv-lamp-and-mysensors exactly what you wish - lamp with local control and, of course, OpenHab status automatically updated on flick a switch.
-
@anonymouslemming Sorry for self-advertising, but i'm think my project https://forum.mysensors.org/topic/7417/ikea-varv-lamp-and-mysensors exactly what you wish - lamp with local control and, of course, OpenHab status automatically updated on flick a switch.
@doctor64
Hey - that does look really really good! I think I looked at it early in the project as inspiration.The lamps I'm using (http://www.ikea.com/gb/en/products/lighting/table-lamps/fado-table-lamp-white-art-10096375/) have in-line switches and there's no sensible space in the body to mount anything, so I need something that controls power at the plug socket end.
I also want them at the plug socket end just for more flexibility in the longer term so that they can drive things other than just lamps.
-
@doctor64
Hey - that does look really really good! I think I looked at it early in the project as inspiration.The lamps I'm using (http://www.ikea.com/gb/en/products/lighting/table-lamps/fado-table-lamp-white-art-10096375/) have in-line switches and there's no sensible space in the body to mount anything, so I need something that controls power at the plug socket end.
I also want them at the plug socket end just for more flexibility in the longer term so that they can drive things other than just lamps.
@anonymouslemming Hmm, you wish to use existing switch on mains cord? Or have some socket block with control is enough? I have use old one-for-all remote-controller socket for that - it have button, place for LED, nice case and i put inside arduino pro mini and 5 volt supply, using existing relay.

You are from Great Britain, right? So you have different power socket, but, may be you can find something similar?
-
I use the in-wall switches that I designed to control sonoffs around the room. The switch is basically a MySensorized scene controller. It does not have any relays or do any other kind of local switching. It simply talks to my Vera controller and the Vera controller handles the logic. Surprisingly, from pushing the switch to the light turning on, it is a nearly unnoticeable fraction of a second. When you think about what has to happen, that is awesome.
When the switch is pushed, it sends a radio signal to the gateway which tells the Vera controller that I pushed the switch. The Vera controller looks up the logic from my programmed scene and sends a wifi HTTP request to my Sonoff. The Sonoff then needs to process that and turn on the relay. ALL OF THAT in a fraction of a second.
Oh, and the WAF is a thumbs up.
-
I use the in-wall switches that I designed to control sonoffs around the room. The switch is basically a MySensorized scene controller. It does not have any relays or do any other kind of local switching. It simply talks to my Vera controller and the Vera controller handles the logic. Surprisingly, from pushing the switch to the light turning on, it is a nearly unnoticeable fraction of a second. When you think about what has to happen, that is awesome.
When the switch is pushed, it sends a radio signal to the gateway which tells the Vera controller that I pushed the switch. The Vera controller looks up the logic from my programmed scene and sends a wifi HTTP request to my Sonoff. The Sonoff then needs to process that and turn on the relay. ALL OF THAT in a fraction of a second.
Oh, and the WAF is a thumbs up.
-
@dbemowsk I was reading your thread... very inspirational. My main problem is can't change (for now!) the in-wall switches, so trying to figure out how to "decline" them.
@ghiglie There can be some issues in replacing normal switches with these kinds of switches. The main thing with ones that I built require a 110v (would work with 220v) line in the box where the switch is going to be located. Depending when the house was constructed, some wall switch boxes only have the switch line coming to the box. If this is the case then you are trying to re-wire things up where the switched device (light, fan , etc...) is located to send your power through the old switched line. That can be a pain if you don't know what you are doing. When doing that kind of re-wiring, I recommend labels, labels, labels to tell how things should be re-wired if you need to get it back to the way it was.
One other issue you can run into is that the box may be too shallow to where the switch won't fit all the way in with the wire nuts or connectors. If that is the case, you may need to cut out the old box and replace it with a new one.
If you are comfortable with remodeling and house wiring, these may not be issues for you.
-
I use the in-wall switches that I designed to control sonoffs around the room. The switch is basically a MySensorized scene controller. It does not have any relays or do any other kind of local switching. It simply talks to my Vera controller and the Vera controller handles the logic. Surprisingly, from pushing the switch to the light turning on, it is a nearly unnoticeable fraction of a second. When you think about what has to happen, that is awesome.
When the switch is pushed, it sends a radio signal to the gateway which tells the Vera controller that I pushed the switch. The Vera controller looks up the logic from my programmed scene and sends a wifi HTTP request to my Sonoff. The Sonoff then needs to process that and turn on the relay. ALL OF THAT in a fraction of a second.
Oh, and the WAF is a thumbs up.
Hmm - that's interesting. I've been looking at the Sonoff stuff since you posted this, thanks!
One of my goals is to have no Internet connectivity to my devices, and it looks like there are some firmware options that would let me achieve that. So that's a plus.
The minus so far is that I can't find anything about range extenders / relay (signal, not power) for these. Two of my early use cases are out of WiFi range, so I'd like to be able to have something between the shed and the controller that acts as a relay. One of the things that attracted me to MySensors is that nodes can act as relays for other nodes.
Do you know if that's possible with Sonoff ?
-
Hmm - that's interesting. I've been looking at the Sonoff stuff since you posted this, thanks!
One of my goals is to have no Internet connectivity to my devices, and it looks like there are some firmware options that would let me achieve that. So that's a plus.
The minus so far is that I can't find anything about range extenders / relay (signal, not power) for these. Two of my early use cases are out of WiFi range, so I'd like to be able to have something between the shed and the controller that acts as a relay. One of the things that attracted me to MySensors is that nodes can act as relays for other nodes.
Do you know if that's possible with Sonoff ?
@anonymouslemming I am not even sure this would work because I am not sure about how the 433MHz side of the Sonoff RF's work, but what about adding a repeater of some sort to your setup. Something like this
http://www.dx.com/p/dc-12v-2a-433mhz-ni-hi-wireless-signal-repeater-white-454782?tc=USD&gclid=CjwKCAjwranNBRBhEiwASu908AcpaXRztfgkD8tTEGI-DKxVMZWfywYffgjebQVSD5gl9fvpyAfcsBoCz1UQAvD_BwE#.WaqirHWGNpg -
I know this may sound weird, but I would recommend just going with the basic Sonoff switch and skip the MySensors part.
I build a lamp controlled by MySensors a long time ago, has external Tact button for on/off. Works great, took a while to build and I have an ugly box screwed to my lamp now that houses it all.
I wanted to build another, but didn't want it be be aesthetically displeasing. I ended up using these (https://www.itead.cc/sonoff-wifi-wireless-switch.html) and they are everything in one small package. You have wifi, a tact button for manual on/off, and it will report to any home automation system using MQTT after flashing some customer firmware (https://github.com/arendst/Sonoff-Tasmota). Just cut the power cable, screw into appropriate terminals and it's all good to go.
As much as I love MySensors; for this type of project I think there is a better solution.