Integration with [Solved]


(Pau Walko) #1

I have a question about a device handler I’m writing. It’s for an Arduino Thingshield which has 4 temp sensors and 6 switches in it. Each temp value is sent to smartthings like “temperature1” “temperature2”… and each switch is sent with a variable like “valve”, “water”… about what they control.
I’m using the “ST_Anything” library to do this.

For some reason, the data from this device doesn’t get forwarded to, even though the data from my other sensors do. Does anyone know what I need to do so the data from the arduino is forwarded from smartthings to

Here’s my current code:

(David Sulpy) #2

Hey @paulwalko! Out of curiousity, does it show up in the list of selectable items when you go through the OAuth process from Initial State?

(Pau Walko) #3

I probably should’ve updated this once I found my solution, but yes it does.

I ended up using the SmartApp provided by initial state since the library I was using custom attributes. So in the device handler I had attributes temperature{1,2,3,4}, but the default configuration only recognized a single attribute named “temperature.” Once I added support for the custom attributes, everything worked great.

For future reference, here’s the updated event streamer code:

and here’s the device handler code:

Side note: since my device has so many custom attributes, I gave it it’s own capability to keep everything nice & organized.