Amazon Echo SmartJ Binding issue with Amazon Thermostat

I recently added an Amazon Thermostat which appears to work in OH with the Amazon Echo SmartJ Binding, but I get the messages below every few seconds.

This is with OH 4.1.1 and this binding version:

247 │ Active │ 80 │ 4.1.0 │ SmartHome/J Add-ons :: Bundles :: Amazon Echo Control Binding

@J-N-K any ideas?

2024-03-18 13:22:15.962 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - mapInterfaceToState='{Alexa.RangeController=[{"namespace":"Alexa.RangeController","name":"rangeValue","instance":"1","value":3.0,"timeOfSample":"2024-03-18T20:22:14.795Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.RangeController","name":"rangeValue","instance":"7","value":68.0,"timeOfSample":"2024-03-18T20:22:14.817Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.RangeController","name":"rangeValue","instance":"8","value":75.0,"timeOfSample":"2024-03-18T20:22:14.822Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.RangeController","name":"rangeValue","instance":"3","value":3.0,"timeOfSample":"2024-03-18T20:22:14.804Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.RangeController","name":"rangeValue","instance":"2","value":3.0,"timeOfSample":"2024-03-18T20:22:14.799Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.RangeController","name":"rangeValue","instance":"6","value":3.0,"timeOfSample":"2024-03-18T20:22:14.813Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ThermostatController.Schedule=[{"namespace":"Alexa.ThermostatController.Schedule","name":"adaptiveRecoveryEnabled","value":false,"timeOfSample":"2024-03-18T20:22:14.838Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.Schedule","name":"scheduleEnabled","value":true,"timeOfSample":"2024-03-18T20:22:14.843Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.Schedule","name":"lastActivityType","value":"HOME","timeOfSample":"2024-03-18T20:22:14.849Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.HumiditySensor=[{"namespace":"Alexa.HumiditySensor","name":"relativeHumidity","value":53.0,"timeOfSample":"2024-03-18T20:22:14.755Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ThermostatController.HVAC.Components=[{"namespace":"Alexa.ThermostatController.HVAC.Components","name":"fanOperation","value":"OFF","timeOfSample":"2024-03-18T20:22:14.757Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.HVAC.Components","name":"primaryHeaterOperation","value":"OFF","timeOfSample":"2024-03-18T20:22:14.757Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.HVAC.Components","name":"coolerOperation","value":"OFF","timeOfSample":"2024-03-18T20:22:14.757Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ThermostatController=[{"namespace":"Alexa.ThermostatController","name":"thermostatMode","value":"HEAT","timeOfSample":"2024-03-18T20:22:14.749Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController","name":"targetSetpoint","value":{"value":40.0,"scale":"FAHRENHEIT"},"timeOfSample":"2024-03-18T20:22:14.748Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController","name":"adaptiveRecoveryStatus","value":"INACTIVE","timeOfSample":"2024-03-18T20:22:14.785Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ThermostatController.ExternalTemperatureSensor=[{"namespace":"Alexa.ThermostatController.ExternalTemperatureSensor","name":"temperature","value":{"value":-252.0,"scale":"FAHRENHEIT"},"timeOfSample":"2024-03-18T20:22:14.854Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.ExternalTemperatureSensor","name":"mode","value":"BUILT_IN","timeOfSample":"2024-03-18T20:22:14.863Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.Energy.DemandResponseController=[{"namespace":"Alexa.Energy.DemandResponseController","name":"eventStatus","value":{"eventId":"","status":"NO_EVENT","activeSignals":[]},"timeOfSample":"2024-03-18T20:22:14.828Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ModeController=[{"namespace":"Alexa.ModeController","name":"mode","instance":"5","value":"2","timeOfSample":"2024-03-18T20:22:14.808Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.EndpointHealth=[{"namespace":"Alexa.EndpointHealth","name":"connectivity","value":{"value":"OK"},"timeOfSample":"2024-03-18T20:22:14.616Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.ThermostatController.Configuration=[{"namespace":"Alexa.ThermostatController.Configuration","name":"setupState","value":"REMOTE_CONTROL","timeOfSample":"2024-03-18T20:22:14.766Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.Configuration","name":"allowedTemperatureRange","value":{"heating":{"minimum":{"value":40.0,"scale":"FAHRENHEIT"},"maximum":{"value":74.0,"scale":"FAHRENHEIT"}},"cooling":{"minimum":{"value":68.0,"scale":"FAHRENHEIT"},"maximum":{"value":90.0,"scale":"FAHRENHEIT"}}},"timeOfSample":"2024-03-18T20:22:14.766Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.ThermostatController.Configuration","name":"temperatureScale","value":"FAHRENHEIT","timeOfSample":"2024-03-18T20:22:14.766Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.TemperatureSensor=[{"namespace":"Alexa.TemperatureSensor","name":"temperature","value":{"value":55.0,"scale":"FAHRENHEIT"},"timeOfSample":"2024-03-18T20:22:14.751Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}, {"namespace":"Alexa.TemperatureSensor","name":"preciseTemperature","value":{"value":55.3984375,"scale":"FAHRENHEIT"},"timeOfSample":"2024-03-18T20:22:14.751Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}], Alexa.AutomationManagement=[{"namespace":"Alexa.AutomationManagement","name":"automationStatuses","value":[{"status":"AUTOMATED","capability":"Alexa.ThermostatController"}],"timeOfSample":"2024-03-18T20:22:14.789Z","uncertaintyInMilliseconds":10,"deepQuery":true,"timeOfStateChange":""}]}'
2024-03-18 13:22:15.962 [DEBUG] [ernal.handler.SmartHomeDeviceHandler] - Updating states failed
java.lang.IllegalStateException: Not a JSON Object: 53.0
        at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:101) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerHumiditySensor.updateChannels(HandlerHumiditySensor.java:66) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.updateChannelStates(SmartHomeDeviceHandler.java:279) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeState(AccountHandler.java:834) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$1(AccountHandler.java:171) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]
2024-03-18 13:22:15.968 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState finished

2024-03-18 13:22:04.945 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'amazonechocontrol:smartHomeDevice:AmazonAccount:df1914cd-9544-44b0-87ce-08a791b0b682' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): RuntimeException while processing updates
2024-03-18 13:22:04.948 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'amazonechocontrol:smartHomeDevice:AmazonAccount:df1914cd-9544-44b0-87ce-08a791b0b682' changed from OFFLINE (COMMUNICATION_ERROR): RuntimeException while processing updates to ONLINE

It seems that either the API changed or there are different types of responses. Please uninstall the binding, change your JSON 3rd party setting to https://download.smarthomej.org/addons.json|https://download.smarthomej.org/addons-beta.jsonand install the (beta) version of the binding. If it works, please report back. This only works for openHAB 4.1.x.

@J-N-K: Thank you, that works.

There appears to be a bit more information in this JSON payload. Would it be possible to expose some of them as channels? I’m guessing these are giving runtime information on what is operating.

{"namespace":"Alexa.ThermostatController.HVAC.Components","name":"primaryHeaterOperation","value":"OFF"

{"namespace":"Alexa.ThermostatController.HVAC.Components","name":"coolerOperation","value":"OFF"

{"namespace":"Alexa.ThermostatController.HVAC.Components","name":"fanOperation","value":"OFF"

Can you send the full payload (of that device) to github@klug.nrw?

@J-N-K I sent the full payload to the email above. Any chance we could get the 3 listed above as channels?

Thanks

I can’t find that mail, maybe I accidentally deleted it or there was some other error. Can you please send it again? Thanks alot.

I just sent it again. Let me know if there is any issue. Thanks.

Which openHAB version? I have something to test for you.

I am using 0H 4.2.0. Thanks

Please uninstall the binding, change your JSON 3rd party setting to https://download.smarthomej.org/addons.json|https://download.smarthomej.org/addons-beta.json and install the (beta) version of the binding. If it works, please report back.

I have this installed:
349 x Active x 80 x 4.2.1.202407261428 x SmartHome/J Add-ons :: Bundles :: Amazon Echo Control Binding
That looks like the new binding - is it correct? Or should it say ‘beta’ in there somewhere?

I deleted the thermostat Thing and scanned again, and added the thermostat again, but I don’t see any new channels. Do I need to do something else to re-scan and see the new channels?

thanks

image

1 Like

I think I made an error. Can you try again with the new version I uploaded some seconds ago? Thanks.

@jswim788 Os the latest version working?

Hi @J-N-K , I see no change after deleting the thermostat thing, uninstalling the binding, clearing the cache, restarting, and installing the beta version and scanning and adding the thermostat. But the version appears identical. Should I be seeing an updated version?

345 x Active x  80 x 4.2.1.202407261428    x SmartHome/J Add-ons :: Bundles :: Amazon Echo Control Binding

Hi @J-N-K, any chance you could see if your latest version got uploaded properly so I can try it again? It seems like the timestamp didn’t change.

i put in the 3rd party json
https://download.smarthomej.org/addons.json|https://download.smarthomej.org/addons-beta.json

but there is no beta version…

https://download.smarthomej.org/addons-beta.json
seems not working…

and in https://download.smarthomej.org/addons.json
seems missing version 4.2.1