I’m currently using this setup to control both my garage doors. I’ve been using the Ridiculously Automated Garage Door app, it’s been working great. Has anyone been able to figure out how to get this garage controller setup working with standard ST routines?
Sean,
So, can you elaborate a little more? If you are using my latest ST_Anything_Doors example as a baseline for your setup, and have implemented the corresponding Multiplexer App and Virtual DoorControl devices, I think you should be good to go.
I can “see” my 2 garage doors (the virtual door control devices) in standard ST routines. For example, I use Smart Home Monitor to notify me if either garage door is left open for too long. I have also tested this configuration with the Ridiculously Automated Garage Door app for a user, and it works fine as well. What “standard ST routines” are you trying to use it with? I’d be happy to help debug it with you.
Dan
Thanks Dan, I’m looking for the ability to open/close each door from a routine in addition to be able to control them with my Echo. When I create a routine, I can see each door, but I can’t actually open or close them from a routine, can you? For example, I’d like to incorporate the closing of the garage doors into the goodnight routine in case they’ve been left open, perhaps even open them with the “I’m back” routine as well and move away from the RAGD app to gain local processing with the V2.
EDIT: I figured it out…
@ogiewon Dan,
Did you do a virtual device type for water sensor? We’ve had unprecedented rain lately, and I got some water in my basement. I had one water sensor and ordered more and would like to multiplex them to virtual water sensors.
Was hoping you had a water device type and a sample multiplexer for water.
Thanks!
-Todd
This doesn’t work. The alarm always sees the door as closed, I guess because it is seeing the circuit as complete through the Arduino.
Todd,
In this scenario, be sure to NOT use the internal pull-up resistor in the Arduino. This is set via the constructor arguments, called when you create each contact sensor in the setup() routine. Refer to the IS_ContactSensor.h file’s comments near the top to see what all of the arguments and values are.
If the internal pull-up is used, the Arduino will send 5V out the pin, thereby confusing the old alarm system. You may also have to change the contact sensor constructor to get the OPEN/CLOSE setting to match the alarm’s wiring design. Finally, you may need an external resistor to pull-down the Arduino’s input pin to ground (0 Volts).
Dan
Glad you figured it out. Good idea to support multiple water sensors. I can see where that would be useful. I may add it to the library for others to use.
Sean,
I haven’t tried automating the garage doors using the V2 Routines (old Hello Home Actions) yet. I know others have had quite a few issues trying to get garage doors to work after the V2 “upgrade” so I am not surprised that there may be issues. Have you looked into the other garage door control discussions to see if they were able to get the new Routines to work yet? I am sure we can get this working without too much effort, assuming SmartThings doesn’t have a bug in their new Routines functionality.
Also, the only thing that I know for sure that runs locally on the v2 Hub is the new Smart Lighting app. Hopefully more will get ported to run locally in the future.
Dan
@ogiewon Dan,
Is it possible to communicate back to the Arduino from ST? In other words, can I alter something running on the Arduino based on state of a Z-Wave or Zigbee Device?
I have attached a 4x20 LCD display to my Arduino. It just so happens that the control panel for my alarm had 4 wires running to it. I am planning to replace the control panel with the LCD display.

I can easily display the status of the sensors that are hard-wired to the Arduino, but it would be kind of cool if I could get status of other “things” and display those there too. Like maybe the value of a temperature sensor on a wireless motion detector, or the state of a door sensor that is not wired into the Arduino.
(I was thinking of having it “page” through different screens on a delay so it can display even more than can fit on one screen… It’s GREAT having all the space that the Mega offers to play with stuff like this…)
Can the thing shield see this kind of information?
Thanks!
-Todd
It’s just messages sent back and forth, so sure, you can send anything you want to the Arduino. My Arduino device type has a command sendMessage(), that sends a text message to the Arduino. Then my sketch has “handlers” for the different messages it might receive. Very easy!!
As Bruce mentioned, yes you can easily send data from ST to the Arduino. In the ST_Anything Architecture, data sent back to the Arduino is handled in what we call the “beSmart()” routine of each ST_Anything Device.
You could create a new Polling Sensor derived class, which would allow you to periodically update the LCD display, and it could also receive messages from the ST Cloud via its beSmart routine.
Take a look at the PS_Water.h and PS_Water.cpp class files for a simple example of a device which implements the PollingSensor class. Obviously, you would not need to read values from an I/O pin as is shown in the PS_Water example. Instead, you would update the LCD screen with whatever data you need. Then, simply implement the beSmart() handler to receive data from the ST cloud and display on the LCD screen as well.
The nice thing about inheriting everything from the PollingSensor class, is scheduled periodic updates are handled for you by the rest of the ST_Anything library. You simply supply the refresh rate as part of the constructor for your new class.
Have fun! Sounds like a nice addition to your Arduino.
I wonder if you wouldn’t mind taking a look at this link to an Arduino sketch I am trying to run. I just got a Thingshield and as a total newbie I created this by copying from others’ code I found here and there. I am trying to control a servo to one position (180) when on and another when off (0). This works but the off (0) position is unstable; it strokes back and forth every couple of seconds. Any help finding a more elegant way to do this will be greatly appreciated.
https://github.com/FKabob/ts_servo/commit/a7452edcca1a4bd84f469479c83b9672e2aa8801
Sorry, but I have no experience using servo motors with an Arduino. Your code looks fine to me. Does it work properly in a sketch without the SmartThings library/shield? If it works fine without SmartThings, then you should check to see if the Servo library is compatible with the SoftwareSerial library. If they are both trying to use the same Arduino interrupt resources, then you may need to use to Arduino MEGA 2560 in order to use Hardware Serial resources for the ST ThingShield.
See https://forums.adafruit.com/viewtopic.php?f=25&t=29695 for a description of the issue that others have reported.
ST_Anything_Doors crashing the ST App. Has anyone used the ST_Anything_Doors device lately?
It causes my ST App on Android to crash. The first time I can go into the Device status, but after that it crashes by just going in the room. Nothing shows up in Live Logging or Arduino Serial debugger.
2nd question: ST App shouldn’t ever actually crash (even with the worse user code) right?
So…I need a little more information to help pinpoint the issue. Are you running just the ST_Anything_Doors DeviceType? Or are you also running the ST_Anything_Doors_Multiplexer SmartApp along with my Virtual DeviceTypes?
I’d like to know whether or not the issue is specific to the Arduino DeviceType or something else. I personally run the entire suite of code on my system everyday, all day. I have never had it crash my ST iPhone App. I just opened up both the DeviceType and SmartApp on my iPhone within the ST App with no issues whatsoever.
One more question… Is this the first time you’ve tried running the ST_Anything_Doors example? I have seen strange issues where a user has attempted to copy code from the GitHub web page and then paste it into the ST IDE. Please be sure to select “Raw Mode” within GitHub before performing the copy/paste, or simply download the entire repository to your system, and then copy/paste.
I am looking to use SHM as an Alarm. I have it set to disarm when people get home or when someone unlocks the front door.
The problem is there is usually a delay when the event that should disarm happens and often the door is opened before the alarm is disarmed.
I know I can add a “delay” for my doors where it will not report before it is seen x number of times.
But, I don’t want to miss a state change.
Is it possible to add an option to delay reporting, but not skip it?
Maybe queue the events up and just delay them by x seconds (still reporting all events).
Thoughts?
Thanks.
-Todd
Todd,
If I were you, I’d be looking at using the Smart Alarm app written by @geko. It includes entry and exit delays to prevent false alarms. I have a friend at work that has tried both SHM and Smart Alarm and finds SmartAlarm to be a much better solution for home security.
Thanks @ogiewon. I am just using the ST_Anything_Doors device type. I even commented everything out except one tile and it didn’t help…weird. It is my first time using the Doors example (I used the ST_Anything many months ago without problems). I will try again after copying using Raw Mode. Thanks, again.
Hi, I just installed and set up ST_Anything_Relays and it works great. Very reliable so far. One question, though. I would like to be able to schedule the individual virtual switch devices, but when I do I run into a problem. Switches turn on as scheduled by the Smart Lighting SmartApp, but turn back off within a minute by the ST_Anything_Relays_Multiplexer. I’m sure there’s a way but I just can’t see it… any advice?
BTW, thanks @ogiewon for all the work you’ve put into this. I love this stuff but don’t want to make it my life’s work and you put it within reach.
Betty,
Sounds like the Smart Lighting App is configured to turn the virtual switch back off after a time delay?
If you simply click on one of the virtual switch tiles to change the state of the relay, what happens? There is nothing in any of my groovy code that would turn the relay off after a .time delay.
However, on the Arduino side, I do have some devices designed to automatically turn an output off after a delay. Specifically the IS_DoorControl and S_TimedRelay devices will turn themselves off after a defined delay time. The EX_Switch will only change state if instructed to do so from the ST Cloud.
There is one more EXCEPTION to be aware of. The ST_Anything_Relays.ino sketch has support for local control using push buttons tied to Arduino digital inputs. Activating these digital inputs will toggle the state of the corresponding digital output and update the ST cloud.
Hope this helps!
Dan