Simple way to Send On/Off/Dim command to Hub?

I’m looking for a way to send On/Off/Dim commands to the Hub from a Raspberry Pi (Using node.js or curl). The Raspberry Pi will be on the same LAN and I would prefer to do the locally not having to go out on the internet and back in. Is their any easy to use node.js apps or anything that I can use?

Unfortunately, at this time, absolutely not… well, maybe some really, really obscure way…

  • If you use a Pi or anything, you’ll need a custom SmartApp to talk to. Since all custom SmartApps only run “in the cloud”, you won’t be able to be “local”.

  • The only possiblity? You have to emulate a fully supported local Device Type … e.g., a Z-Wave Dimmer.

Okay, so, if I do a SmartApp then… (which I have something that was done for a garage door sensor I’m modding… ) How can I do a milt-state? I’m setting up the Raspberry Pi to be a touch sensor for 2 lamps. With multi states… off,on-low,on-med,on-hi. I’ve got it working where the status is showing up as those on the app. but, looks like the only way it’ll link to the light is weather it’s “on” or “off” if I call it a switch or sensor… What am I missing?

If you want to be compatible across various SmartApps like official “Smart Lighting”, or even Community apps like “CoRE”, then you have to conform to one of the official Capability definitions (in the Dev docs) with their exact Commands and Attributes.

Since there is no Capability multi-state-Switch, I recommend the closest match: Capability Switch + Capability Switch Level.

Level takes a 0 to 100% … just map ranges… 0 to 33% = on-low, 34% to 66% med, etc.

Looking at this…

http://docs.smartthings.com/en/latest/ref-docs/device-handler-ref.html#capability

but not seeing the definitions… and how do you link it to my dimmer module?

FYI, this is what I’m using as a base for my project… Which might not be the best thing to use…

No… I think you need to use a Web Services SmartApp… Do a lot more reading.