@jodyalbritton Can you share the groovy code that goes along with this?
@jodyalbritton Can you share the groovy code that goes along with this?
Sure. I added the groovy file to the repository.
This got me unstuck. I was confused by the device type structure and just needed a good example. I have my existing alarm system devices connected through the ThingShield connecting directly to the panel. Thanks!
I have an existing lightning detector circuit along with some other weather relater sensors already built I want do integrate next (just ordered another shield). I will have to use a mega since I need a few more interrupt pins. I have a few actions I want to trigger through the smart hub if a lightning storm comes up.
For the shield itself, a pass-through of the I2C pins would be nice
Others have mentioned, this, but I’ll second the need to represent more than one type of device from the ST Arduino shield.
It’s really inefficient to use the shield as a sensor. There are a couple of projects out there using inexpensive wireless transceivers coupled with battery powered Arduino sensors. The ST Arduino shield is too expensive to use (and not energy efficient enough) as sensor nodes. It’s much better suited as a gateway between the ST hub and DIY wireless Arduino sensor nodes. As an example, take a look at this Arduino sensor node setup: http://goo.gl/Q8Fy8O
The hang up seems to be you can’t represent the Arduino shield as more than one device type. Is that still an issue or has that been solved?
The Arduino shield should be able to be presented as anything, and be event driven. So ST hub doesn’t specify any update rates for sensors, it’s the Arduino field nodes that define the update rate, so all updates are event driven as far as the ST hub is concerned.
A Thing Shield can represent many device capabilities, but only one of each capability. I was able to use a SmartApp to multiplex/demultiplex multiple “contact sensors” into virtual contact sensors. This gives one the ability to have one Arduino host many of the same capabilities. Not ideal, but it works.
Frustrating. Lots of questions about what we’d like, but not much visible improvement. I have an X10 to ST interface using the Arduino Shield that works perfectly and is completely self contained (no PC required).
I have it running, and haven’t had to reset it in months, and have never had it not work. However, the huge limitation is that, as others have mentioned, the shield can only represent one device. If I was able to have multiple virtual devices from one shield, I could completely eliminate my Homeseer system and control all the x10 devices I have.
But I can’t, simply because ST doesn’t support the idea of multiple devices per shield.
Please, please, please, ST, make this possible or at least give us a reason why the architecture won’t allow it. Please?
Its doable now, though a bit of work [shield device <–> smart app <–> virtual device(s)]
As the trainer guys say, just do it…
I have written some smart apps to expose individual devices. But having to expose the virtual device via a smart app means that natively assigning those devices (lights, switches, whatever) to existing smart apps won’t work, which is the best part of smartthings imo.
@johnwest80: Thank-you for putting in words what’s been in my head (and various posts…) for a long time now. And your proof-of-concept builds is also tremendously reassuring that you understand these issues.
I sensed that this would be a problem (i.e., the one:one physical device to device object relationship) for a very long time now.
Even with the SmartThings branded multi-sensor, for example, there is no practical way to have multiple tiles for the various functions visible without drill-down into the tile configuration page (i.e., at least 4 tiles should be generated for each multi-sensor: open/closed, temperature, orientation, activity). Some sort of shortcut system would be great, and then it could also be possible to place “copies” of the same device tile in multiple groups (e.g., open/closed could be in the “Foyer Group” as well as the “Security Group”.
The Dashboard is the current hack that implements some shortcut features, obviously, but I think that many consumer-type users find it confusing.
And, overall, consistency between object representations for SmartApps, GUI, and external-API is highly desirable. So I hope that any conceptual architecture change that “makes sense” and is “flexible and powerful” can be thoroughly considered by ST. It is hard to drive such changes from the bottom up, I fear. A lot of differing opinions (don’t get me started again on my Christmas list concept of “Scenes” as first level objects…).
If you use a SmartApp as a multiplexer/demultiplexer between your custom Arduino DeviceType’s capabilities, and a set of virtual devices… You can then use standard SmartApps to interact with the Arduino via the Virtual Devices. I have successfully accomplished this, as have others. Check out my code for my Garage Door Arduino project.
Before I dig into your code, are you saying that I could, for example, have two switches that “turn on and off” via my Smartshield, and use either/both in all smartapps that ask for a switch?
x10 -> smartshield -> switch 1
Any smartapp that asks for switch or light, I can in some way add any of those above somehow? This would be awesome!
Please confirm and make my day (and, if you can point me to your code or somewhere that explains this, that’d be great!).
Yes, you should be able to control many “Switch” type of devices (e.g. X10 Appliance Modules or Wall Switches) via one Arduino. You will need to create a custom Virtual Switch DeviceType. You could start with one of my Virtual “GarageDoor” DeviceTypes, and simply change the icons and limit them to only two states (on and off). There are probably other examples of this as well floating around.
You will definitely need a custom SmartApp to link the Virtual Switch devices, to your Arduino DeviceType code. Take a look at my Mux/Demux SmartApp as an example. You will probably need to pass to the Arduino, via the DeviceType code, a numeric index to represent which X10 module you want to turn on/off. Similar to how I handle the Open/Close commands for my two distinct Garage Door relays.
Here is a link to my post about my garage door Arduino code (Arduino code, ST DeviceType, SmartApp, and Virtual Contact Sensor + Virtual Garage Door switch/button) Arduino SmartShield Garage Controller
Hope this helps!
I definitely Echo making it smaller with pin headers instead of an entire shield, most of my work I have done with nano’s and the shield just takes up too much space. I would also like to see the price point slightly lower, I can currently get an industrial temp rated wifi module for 14 dollars.
I have just posted a new topic about a project, ST_Anything, my son and I have developed to make using an Arduino with SmatThings as simple as we believe possible.
Check it out at Announcing the "ST_Anything" Arduino/ThingShield Project
Hopefully the ST_Anything project will at least provide some examples of what is possible. It also includes an upgraded Arduino SmartThings library which you can read about in the other post as well as on the GitHub repo at https://github.com/DanielOgorchock/ST_Anything
I’d love to have an LCD or TFT console that would display status of lights, doors, etc. It would be handy to have in the kitchen or bedroom so you don’t always have to look at your phone. Is this something anyone has tackled with the shield?
@Dallas_Kincaid you should probably take a look at the following discussion. No need to use an Arduino and LCD screen as a display when you can simply re-purpose an old smartphone or tablet to create a custom dashboard that is always on and only displays what you desire.
If any of you are still curious how to expose multiple inputs/outputs on one Arduino as individual top level tiles, please take a look at my new ST_Anything_Doors project. In this example, I expose 4 Contact Sensor devices and 2 Door Control devices from one Arduino as 6 individual tiles that standard SmartApps can use without customization.
I’d like to echo the comments that suggest XBee since that is all but the de facto solution for many add-ons, shields, etc. and not only Arduino, but RPi, BeagleBone, Propellers, PIC’s and whatever. And nothing really needs to be done in hardware since XBee shields/adaptors would work out of the box. I’m guessing the current ST/Arduino lib would need to be ported to the XBee API.
As far as new ST hardware for the maker world, how about an RPi add-on to add both the XBee socket and break out the I/O for easy access, and maybe add some SPI/I2C driven analogue inputs? Or, now this is getting a bit adventurous, some servo or motor controllers? SmartThings controlled robotics anybody?
For those looking for a full SoC solution the meshbee from seeedstudios is promising. A powerful enough MCU with multiple DIOs SPI i2c and enough ram and flash to hold a large app with full zigbee profiles. For $20. It’s based on the jn5168 by NXP. I haven’t used it with ST yet (I’m in the process of switching from Wink to ST) but all the tools and SDKs are free, although you do have to jump through some hoops to get them.
Interesting. I’d be interested to see someone do a project with this, I don’t know that I’m 1337 enough to give it a try.