Closed eczajk1 closed 7 years ago
More info:
I was making the shadow_update
call from within the loop()
function. I am able to get the code to work if I make the call from the delta callback function, as is done in the ThingShadowEcho example.
But, I need to try to update the shadow more frequently. Any insight into what why the call fails when called from loop()?
Thanks in advance.
Hi @eczajk1 ,
Thank you very much for using AWS IoT Arduino Yun SDK.
From the serial monitor output, it seems that the Python runtime got an exception and exited. All serial1 commands after that started failing because the expected response is not available any more.
You should be able to do shadow update in loop(). You can check out the example provided along with the SDK: https://github.com/aws/aws-iot-device-sdk-arduino-yun/blob/master/AWS-IoT-Arduino-Yun-Library/examples/ThermostatSimulatorDevice/ThermostatSimulatorDevice.ino
Do you have any log in the file when the exception happened? It should be logged as this: https://github.com/aws/aws-iot-device-sdk-arduino-yun/blob/master/AWS-IoT-Python-Runtime/runtime/runtimeHub.py#L335
Thanks, Liusu
Thanks. I found the message:
DEBUG:runtimeHub:Exception in run: <type 'exceptions.ValueError'>invalid literal for int() with base 10: ''
I think this was just another coding error on my part. Thanks again for your help.
I am experiencing a situation where the
shadow_update
function seems to work once, but will then fail. I believe it returnsGENERIC_ERROR
(-1). This is the output from serial monitor:and...
and
Later I am getting a yield error:
...where
-35
is the result ofmyClient.yield()
This is from my log: