Luke,
Unless I’m missing something, all you have to do is connect your Arduino digital input directly across your switch. Be sure to get the polarity right. COM or resistor side should be tied to GND.
HOLY, COW. it works.
tied my ground in before the resistor and the system is up and running,
Now to figure out the multiplexer
Nice team-work everybody!
Hello ogiewon,
Just wondering if you ever implemented Mysensors? Being based in the UK. I don’t have access to The Smartthings shield.
Best wishes.
James
No, I never did get around to incorporating MySensors. However, it would not have helped you as my original thought was to still use the ST ThingShield to do so.
Thank you.
@foggy take a look at this thread which demonstrates using an Ethernet shield to communicate with ST through the HUB. No ThingShield required.
@ogiewon - Have you seen this? It’s interesting, though I’d love to see what people can use this for without going through the cloud. The Beta IDE might prove to be something in the future…
http://makezine.com/2016/04/02/arduino-mkr1000-project-platform/
@Jason_Fay - This does look very intriguing. There has been some success by others in direct bi-directional Ethernet communications between an Arduino (with Ethernet Shield) and the ST Hub v2. I have even built a small proof of concept sketch based on that work and verified it for myself. I may spend some time adding Ethernet support to ST_Anything at some point in the future.
Check out this post by @Charles_Schwer
https://community.smartthings.com/t/how-to-send-data-from-my-lan-connected-device-to-hubv2/28825/2?u=ogiewonGreat project, looks really nice. Impressed that an Arduino could accomplish that. It feels like a Raspberry could be a better alternative for the longer run, what do you think? I haven’t really looked through every comment in this thread, obviously, so I might have missed that discussion already!
Thanks for the feedback… The SmatThings ThingShield is designed specifically for an Arduino. Thus, an Arduino is the best, lowest cost platform to run it on. You can pick up an Arduino MEGA 2560 clone for about $15 on eBay. Raspberry Pi’s are typically $35+, especially the Pi 3’s. Also, the ThingShield is designed for 5V TTL logic, not 3.3V like a PI…
If I were to integrate a Pi, I would do a pure Ethernet solution, but still try to route all communications through the ST Hub.
I like the Arduino platform due to its very low cost, high performance I/O, and widespread adoption in the sensor/actuator space of embedded electronics. I also prefer not having an operating system to worry about, nor the heftier power requirements.
Both platforms have their uses, and have done an incredible job of opening up the small embedded controller market to the hobbyist.
Ok, thanks for the answer!
Hi dan.
I really want to thank you for this. Ive veen playing withbyour project and is awesome. However, Ive a small issue with the motion sensor, im uaing a generic pir and the app is intermitently detecting the motion and I realised that if I try to turn on the switch when motion is detected it takes about 10 seconds. Is the any way to first hold the status of the sensor when it detects motion ? And second, is posible to reduce the time that the arduino takes to execute the switching?
Thanks gor your help!!
Raspberry Pi Zeros are $5. Of course you’ll need to drop another $5 or more for a microSD card (which is pretty funny when you think about it).
@DParker Yea, the Pi Zero is interesting, but not available for $5 anywhere in the US that I’ve found. Demand is just way too high. Also, the Zero has no Ethernet/Wifi built in. So you’re going to need to add that too, along with the micro sd card. It also is not voltage compatible with the ST ThingShield, and I haven’t seen anyone port the library yet. So, while Pi is interesting, it really is not an Arduino replacement, especially in terms of power consumption.
If want to try Arduino on the cheap, you can get Arduino Nano clones on eBay for about $4 shipped from China. This is the lowest cost entry point that I have seen. I’ve bought several and they work very well. I’ve just ordered an esp8266 to try. That looks like another low cost, very capable platform with built in WiFi.
The motion sensor class relies on the PIR motion sensor to adjust sensitivity and the delay between events. Usually there is also a jumper that changes whether the sensor sends a pulsing signal when motion is sensed versus a constant high or low for motion/no motion. You need to set it for a constant signal, not a pulse train.
As for any delay between sensing motion and turning on a switch, that is not typical whatsoever.
I have one that I got for $5 at MicroCenter. They’re still that price there. They’re frequently sold out, but you can order one at that price. Adafruit also sells them at that price (though also backordered). You just need to check sites frequently.
Ditto Arduinos.
No, but a compatible version of TS could be made…which is I suspect what was being contemplated above.
A replacement? No, of course not…nor is the Arduino a replacement for something like the Pi. I think the point was that there are applications where the Pi (or the functional equivalent thereof) would be a better choice.
True. Also irrelevant if your solution can be plugged in all the time…like an awful lot of other things that ST works with.
Yeah, I’ve got several of those (as well as some $6 Uno and $10 Mega 2560 clones), all available locally at MicroCenter.
Yep. You can also use it directly with any Pi.
Hi Dan
I have another question, Why with ST_Anything_Alarm_Panel is not necessary to have a Multiplexer.smartapp if you are including many devices of the same type. From the ST_Anything_Relays project I understood that you need 1) the app 2) Multiplexer.smartapp and 3) the virtual device. But in this case, you just have the 1) App Could you please give us a small explanation of how it is work I’m a bit confuse now.
Thanks
ST_Anything_Alarm_Panel Was just a sample I created for a specific user’s need. The Arduino sketch plus the Device Handler are a matched pair that allows one to view all of the sensors from within the ST App on your phone. However, without a multiplexer and virtual devices, none of the sensors can be individually selected from other SmartApps.