ThingShield and repeated incoming messages

I’m having a hard time getting the ThingShield to receive messages from the V2 hub in a reliable manner. I’m using the Switch on/off Shield device type.

Attached you can see the stLEDWithNetworkStatus sketch running:

This images shows me pressing the icon tile to turn the switch on (spammed with on and blank messages). Once that stopped spitting out, I hit the tile again to turn it off. Showed up in 1 line, hooray!

Hit the tile again to turn it on, got some spam, waited, hit the tile again and got “off” spam.

This may not be a problem when hitting the switch slowly and waiting, but if I do something like toggle the tile within 1-2 secs, I get mixed results, and more often than not I see extra ons or offs being fired after a single on or off.

eg. if I hit the tile to turn it on, then turned it off and back on again, I would see a single “on” message come in, but a bleed of “off” messages coming in after which would actually turn the switch off instead of being in the “on” position as being the last command I sent to it.

Has anyone else seen this issue and if so, how did you get around it?! (I’ve also tried the ST_Anything library to see if that would help, and it also suffers from getting multiple messages which makes me think that the hub or cloud is to blame here).

I am the author of ST_Anything. I’ve never seen multiple duplicate events received via the Arduino. Very interesting problem.

When the Arduino sends data to ST, does the Live Logging in the ST IDE show duplicates? What does the Live Logging show when the problem occurs?

The ’ ’ entries are fairly normal and can be ignored. ST_Anything automagically ignores them.

I’ve never tried using the ThingShield with a Macintosh. Have you tried with a Windows PC just as a troubleshooting step?

Also, I use v1.6.5 of the Arduino IDE as I find it to be more reliable than 1.6.6. I haven’t tried 1.6.7 yet.

1 Like

Do you have any log.debug, etc. commands in your Device Handler? I found and have heard they can mess up the steps of the ZigBee protocol used here.

My shield has been working fine in its assigned role for months now (controlling a projector and screen). I haven’t run a serial output on it too see if any duplication. Possibly I coded to ignore messages from the same state…

Yah it sure does. See here:

I’m using 1.6.7

Nope, this is just using the On/Off Shield device type from the drop down.

I would do that too, but the problem is that after my final state I’m getting repeated messages from my previous state.