Device type issue with a shield

Hello.
I have a shield and have been having a very frustrating time debugging the devicetype code.

The following function works fine as expected. The message appears at the zigbee module and is processed by the arduino.
def fanOut(){
log.debug "fanOut"
zigbee.smartShield(text: “fanOut”).format()
}

HOWEVER… swapping the two lines of code causes the following.
The command appears in the device event log (so i assume it has gone out) however does not appear at the zigbee module (i have checked with a terminal @2400 baud on the module its self, It is not arduino releated!)

def fanOut(){
zigbee.smartShield(text: “fanOut”).format()
log.debug “fanOut”
}

Can some one explain what is going on here this is really been messing with me.
Regards
Bart

Any one??? Surely someone knows whats going on here?

Hey @Bart_aiotec, I wish I could help you, but I am experiencing a very similar problem. I have a method that looks very similar to yours, just a log.debug and a zigbee.smartShield call. In certain circumstances, it works (called from a tile in the device page), but in other circumstances (like when called from another method) the message is not actually sent (even though I do see the debug message. It has also been driving me crazy. I reached out to support, but they declined helping with any SmartShield projects :frowning:

Hello Obycode.
Thanks for the reply… At least I am not the only one getting frustrated with this.
I am somewhat surprised no one else has had any issues?
My main gripe is that the outbound message are in the event logs but wont arrive at the zigbee module.
swap the two lines and everything is good WTF!.. I got so annoyed at it i almost took to the hub with a hammer after spending so much time trying to figure out why stuff wasn’t working when it should and appeared to be ok.

You are correct in that support has been somewhat unhelpful. I just think they have too many bigger issues to do with at the moment.
The documentation has been a good intro but forget trying to get working code out of it.
I still have not found any documentation that lists all classes and members at all let alone in any detail…
I can see the shields taking up much support effort and it wouldn’t surprise me if ST drop it in future.

However I have my device type finished and working well for this project. It has been a rather frustrating journey but we are done. :smiley:

PM me if you have a particular issue i may be able to help you from what i have found.

All the best
Regards Bart

Hi @obycode, Do you see the message in the device event list?

Hey @Bart_aiotec. I see the call to the outer method in the event list, and I see the debug message from the inner method in the log, but I do not see the call to the inner method in the event list. Should I? Also, I can’t get mine to work when I rearrange the order of the logging and the smartShield calls.

To make that clearer, my situation looks like this:
I have on/off methods so I can give my device switch capabilities. The on method just has a call to another method, call it foo. foo has a log.debug and a zigbee.smartShield. The on method is called from a Hello, Home phrase and I see the log message, but do not receive anything on the smartShield.

Hello,
I assume you mean the debug.log when you mean log message??
if so then That makes sense but if you look at your shields event log under the ide.
My device > shield > list events. do you see the data sent in the log?
if so you have exactly the same issue as i do. everything is being processed but not ending up at the shield.
different method but same issue.

Regards
Bart

All I see in the events list is the call to “on”. I don’t see anything in there about the smartShield call. You actually see something else in there?

Hello,
You should see the command event below every time your command is sent to the shield like below.
I was seeing this but it never got to the shield.
Regards
Bart

2014-12-03 8:39:13.990 AM NZDT DEVICE temperature 26.6 Shield3 temperature is 26.6°C true
2014-12-03 8:37:24.493 AM NZDT DEVICE temperature 26.8 Shield3 temperature is 26.8°C true
2014-12-03 8:37:22.034 AM NZDT COMMAND Closed Closed command was sent to Shield3 true
2014-12-03 8:37:16.854 AM NZDT DEVICE temperature 26.7 Shield3 temperature is 26.7°C true
2014-12-03 8:37:16.345 AM NZDT COMMAND fanOut fanOut command was sent to Shield3 true
2014-12-03 8:37:13.997 AM NZDT DEVICE temperature 24.3 Shield3 temperature is 24.3°C true
2014-12-03 8:37:13.320 AM NZDT DEVICE humidity 31 Shield3 humidity is 31% true
2014-12-03 8:37:11.520 AM NZDT COMMAND fanIn fanIn command was sent to Shield3 true

I finally just tried deleting my device (trying to avoid this since I had a lot of SmartApps using it). After deleting and re-pairing my SmartShield, it now works fine.

I’ve packed the project away so can’t check to see if my problem is related in that sense.
But if that is the case that is pretty dumb fault on St behalf!
Regrads
Bart