|
Post by chrisinkc on Feb 21, 2016 23:57:54 GMT
Does anybody have a light switch node working? I want to be able to turn the lights on or off via openhab using the regular light switches that I already have. Has anybody done this? Papa, I see that you have done a light switch, but it looks like you used a push button switch instead of the normal light switch found in most homes.
Any ideas?
|
|
|
Post by greginkansas on Feb 22, 2016 1:19:19 GMT
I would use the SW to the node then use insteon for the light then if the node or wireless goes down. Openhab or the insteon app will still work. Greg Are you in KC kansas?
|
|
|
Post by papa on Feb 22, 2016 1:24:40 GMT
A light switch box is tight quarters, esp if one would try to include the switch itself. In my case, a small, square of circuit board under the switch plate holds the pushbutton (sticking thru the switch slot), DHT Sensor connections, resistors for the push button & a DHT sensor). The push button works fine for a switch & is small & uses the existing DHT End Node code.
Low Power Lab has a commercial product. They use larger push buttons.
|
|
|
Post by greginkansas on Feb 22, 2016 1:31:03 GMT
I meant to add tie the 120V together and the SW can work just like a push switch.
|
|
|
Post by papa on Feb 22, 2016 1:53:40 GMT
I see, greginkansas. Part of what I meant is that a light switch module protrudes quite a bit into the switch box, making it harder to fit in the Arduino, etc.
However, if you could make it work or substitute some sort of dummy switch, the WAF might be higher.
Keep us posted.
|
|
|
Post by lewishollow on Feb 22, 2016 5:41:07 GMT
I don't know if this is helpful, but I use wemo light switches to accomplish this. They are easily programmed through openhab. I have a node in my office that has two PIRs on it, and when either detects motion, it sends a message to the gateway that gets processed on openhab, which tells the switch to turn on. If neither PIR detects motion for 10 min, the openhab server sends a message to turn off the switch. They're $40, but much easier than hiding a node in the wall while maintaining all of the programmability. I'm happy to share my code for this if you wish to go this route.
|
|
|
Post by chrisinkc on Feb 22, 2016 21:51:18 GMT
Greg, I'm on the Missouri side, up by Liberty. How about you?
I was wanting to do this for less than $20 a switch and still have it look and feel like a normal switch, but maybe this is not yet possible.
Lewishollow, would you mind posting your code. The wemo switches seems to be cheaper than the insteon ones.
|
|
|
Post by greginkansas on Feb 22, 2016 23:55:19 GMT
20$ a SW is a tight budget The pro mini's I use are 16.50 with radio not sure what the AC Solid State Relays are papa has used some. I'm in Wichita.
|
|
|
Post by chrisinkc on Feb 23, 2016 0:37:56 GMT
Wow, I must have been looking at the wrong Pro mini's. The ones I saw were for around $2. The radios are $4 each, the regulator for 3V is $3 so that brings us to $9. The SSR I bought for the garage doors was $8 so I assume an AC SSR would be similarly priced. That puts us at $17 not including any misc wires, breadboards and such.
|
|
|
Post by greginkansas on Feb 23, 2016 2:01:02 GMT
Yea, I hand built the first few then found these www.anarduino.com/miniwireless/ RTC flash mem "working on over the air downloads" and rfm69 all on one one unit. Makes for a small clean unit.
|
|
|
Post by papa on Feb 23, 2016 14:10:30 GMT
I had not looked at anarduino for a while. Good call, greginkansas, on considering the rfm69 miniwireless for a light switch node where tight quarters are a concern: arduino, rfm69, + RTC in small package could give us a good start. The schematic says 3.3 - 7 volts to power them & 3.3 volts on the board. One hopes it has enough juice to trigger a Solid State Relay on a chip (probably not the larger kind that comes in a box with screw terminals). Triggering those SSRs on a chip does not take much, in fact, a bigger concern is burning them out. A miniwireless' small package & less construction needed could be worth the cash. For the light switch node, as I figure it, one would still need a compact power supply, a switch (the switch box's original, push button, or ??), & a solid state relay on a chip. One would also need the ability to upload a sketch to the miniwireless. For the compact solid state relays on a chip, I've used Sharp's s102s02 or s202s02. The latter is rated for 220 volts, but works fine in the US. I think computourist used this one. Be careful about connecting these items. To the DC inputs connect only the arduino's 3.3 volts. Soldering a wire to the connecting pins can burn out the chip's insides. Also connecting wires to the pins creates greater leverage for breaking the pins. After I broke a pin & burned out a chip, I used a female socketed dupont cable to connect to the DC inputs & I inserted the AC output pins under the insulation & next to the copper of 14 gauge solid wire. So far that's worked in the one light switch node I made. Using the chip's screw hole, I mounted it to a thin, strong piece of wood (a piece of paint stirring stick). To stabilize the pins from breaking or shorting, I wrapped the pins & the wood. For possible heat dissipation needs, I left the chip's sides & front open. Whoever tries building a light switch node, please keep us posted on what works & not.
|
|
|
Post by Ryan on Feb 24, 2016 2:58:54 GMT
I don't know if this is helpful, but I use wemo light switches to accomplish this. They are easily programmed through openhab. I have a node in my office that has two PIRs on it, and when either detects motion, it sends a message to the gateway that gets processed on openhab, which tells the switch to turn on. If neither PIR detects motion for 10 min, the openhab server sends a message to turn off the switch. They're $40, but much easier than hiding a node in the wall while maintaining all of the programmability. I'm happy to share my code for this if you wish to go this route. Hi Lewishollow, Could your share your PIR controlled Light Switch Codes for me to try it out. Thanks.
|
|
|
Post by lewishollow on Feb 24, 2016 4:43:14 GMT
Items - Switch WeMo_Insight_1 {wemo="WeMo_Insight_1"} Switch Danny_Office_Main_Light {wemo="Danny_Office_Main_Light"} Switch itm_node2_pir1_mqtt "PIR1 [%s]" {mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev41:state:default]"} Switch itm_node2_pir2_mqtt "PIR2 [%s]" {mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev43:state:default]"}
Rules - rule "turn on light motion response" when Item itm_node2_pir1_mqtt changed or Item itm_node2_pir2_mqtt changed then if (itm_node2_pir1_mqtt.state == OFF && itm_node2_pir2_mqtt.state == OFF) { timer = createTimer(now.plusMinutes(10))[| sendCommand(WeMo_Insight_1, OFF) sendCommand(Danny_Office_Main_Light, OFF) ] } else { if (timer != null) { timer.cancel timer = null } sendCommand(WeMo_Insight_1, ON) sendCommand(Danny_Office_Main_Light, ON) } end
|
|
|
Post by Ryan on Feb 24, 2016 7:08:30 GMT
Thanks a lot and very nice of you.
|
|
|
Post by Ryan on Feb 24, 2016 11:29:12 GMT
Dear Lewishollow, the device Id 43 is not defined or used any where, please suggest a solution. Ref:Switch itm_node2_pir2_mqtt "PIR2 [%s]" {mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev43:state:default]"}
|
|
|
Post by lewishollow on Feb 24, 2016 15:57:51 GMT
Hi Ryan -
First of all, this is openhab code only, just to clarify. I'm assuming you already have the arduino code set up and running.
You'll have to set up devices and such to match your specific node network.
If you need help getting your arduino code set up, you should try papa's success thread or my re-imagined node code thread.
|
|
|
Post by Ryan on Feb 25, 2016 13:10:30 GMT
Thank you, I will learn to do that.
|
|