Ardunio Shield not receiving events

(Alex_R) #1


I’m having trouble with setting up SmartThnigs Arduino Shield.

I followed the instructions on setting up a SmartThnigs Arduino Shield as a simple on/off switch. I mounted it on my Arduino Uno R2, pressed the Switch button, registered it in the SmartThings app. I went to the SmartThings IDE and changed the type of this device to “On/Off Shield (example)”. I uploaded the sample sketch that came with Shield into the Arduino. I opened serial monitor and saw “setup…”. The switch on the board is set to D2/D3, so are the constants in PIN definitions. When I press the icon in my iOS SmarThings App, the icon changes its state to on/off, but nothing happens on the shield side, and I don’t see any output in serial monitor. I don’t see anything in the logs in the IDE either.

I repeated the same steps with another Arduino/SmarthThings shield combo with the same result (to rule out a hardware issue). The software is all fresh, downloaded and installed yesterday. The firmware version of the hub is 000.010.00246. I have a motion sensor connected to the hub and it’s functioning perfectly. I also tried changing device type to “On/Off Shield”, tried creating my own device type from code, and tried sending an event using an action, all without success.

Any ideas?

(Ben Edwards) #2

What think you @mager, @urman?

(Alex_R) #3

I have finally figured it out. It was a combination of the following:

  1. Weak battery that powers Arduino. My (old) 9V battery was able to power the Arduino, but not the shield. Lesson: check your power!
  2. Buggy “On/Off Switch (example)” device type. This one only delivers “hello” message. Using just “On/Off Switch” works! By the way, the source of that example on git no longer compiles by the IDE. Please update.
  3. Stuck SmartThings Arduino shield. I needed to unpair/pair the shield to revive it.

I had another suspicion: my Arduinos were R2, and I went and bought an R3, since the documentation states that the board must be compatible with R3. In the end, it didn’t make a difference – the shield works with R2 as well.

I hope this will help other developers!

(Brian T) #4

Help -
I have the same issue - Using the “Arduino SmartThings Shield LED Example” I Simply cannot get the Ardunio to register anything - looking at the code the callout method never gets called ( ie SmartThingsCallout_t messageCallout; )

Also running the sample code that come with the smartthings libraries "stLEDwithnetwoprkstatus"
Produces the following on serial monitor


Indicating it cant see any network?

Now I have tried with two different Smartthings Ardunio Shields on Ardunio Mega powering it via a 7.5V 0.5Amp plugpack

Tried it with “On/Off Shield (example)” and “On/Off Shield” Device types

I have no problem pairing the shield see from “My Devices”

Display Name Type Location Hub Zigbee Id Device Network Id Status Last Activity
Arduino ThingShield On/Off Shield Home Home Hub D052A8000F060007 A221 ACTIVE a few seconds ago

Live Logging shows activity when I press the on/off icon on my cell
39fcf04a-e3ad-4530-afab-a7585d22a58e 12:31:59 PM: debug Parse returned Arduino ThingShield received ''
39fcf04a-e3ad-4530-afab-a7585d22a58e 12:31:59 PM: debug Parse returned Arduino ThingShield received ‘’

my version of home hub is
Firmware Version 000.014.00040
Hardware Version hub v2, US customer Rev E

Any Help/Comments Would Be Appreciated


(Michael) #5

You may want to read through this thread as there are many great examples and a better Arduino library than the one ST provides:

@ogiewon is the Arduino Jedi master.

(Dan) #6


If you are using an Arduino MEGA 2560, you’ll need to do a little extra wiring if you want it to work with the ST ThingShield. Since the “official” ThingShield library is only able to use SoftwareSerial, it has a problem with the Arduino MEGA’s pin layout with respect to interrupt capability. It can be done, but you’ll need to use a jumper wire from pin 10 to pin 3 (if I recall correctly) and then make the corresponding code changes as well when initializing the “SmartThings” ThingShield library to reference pin 10 instead of pin 3. Also, make sure you have the small switch on the ThingShield set to the D2/D3 position (not D0/D1.)

Here’s some info on how to get the MEGA to work with the ThingShield library available from SmartThings

Alternatively, you can use my improved version of the ThingShield library which is able to use the Arduino MEGA 2560’s additional Hardware Serial ports. This is the preferred solution as Hardware Serial (i.e. UARTs) work better than the Software Serial library. Check out the details within the ReadME on my GitHub at