OFFLINE (COMMUNICATION_ERROR): Unerwarteter Fehler - Unable to create object of type ShellySettingsGlobal from JSON (syntax/format error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2697 path $.ext_temperature.1): {"device":{"type":"SHUNI-1","mac":"98CDAC2B8C87","hostname":"shellyuni-98CDAC2B8C87","num_outputs":2},"wifi_ap":{"enabled":false,"ssid":"shellyuni-98CDAC2B8C87","key":""},"wifi_sta":{"enabled":true,"ssid":"FRITZ!Box 7530 GY","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"ap_roaming":{"enabled":false,"threshold":-70},"mqtt": {"enable":false,"server":"192.168.33.3:1883","user":"","id":"shellyuni-98CDAC2B8C87","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"enabled":true,"update_period":15,"peer":""},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":true,"unprotected":false,"username":"admin"},"pin_code":"","name":"shelly-dimplex","fw":"20230503-102354/v1.13.0-g9aed950","factory_reset_from_switch":true,"discoverable":true,"build_info":{"build_id":"20230503-102354/v1.13.0-g9aed950","build_timestamp":"2023-05-03T10:23:54Z","build_version":"1.0"},"cloud":{"enabled":false,"connected":false},"timezone":"Europe/Berlin","lat":51.854740,"lng":6.866400,"tzautodetect":true,"tz_utc_offset":7200,"tz_dst":false,"tz_dst_auto":true,"time":"21:31","unixtime":1693251071,"debug_enable":false,"allow_cross_origin":false,"actions":{"active":false,"names":["out_on_url","out_off_url","btn_on_url","btn_off_url","longpush_url","shortpush_url","out_on_url","out_off_url","btn_on_url","btn_off_url","longpush_url","shortpush_url","adc_over_url","adc_under_url","report_url","report_url","report_url","ext_temp_over_url","ext_temp_under_url","ext_temp_over_url","ext_temp_under_url","ext_temp_over_url","ext_temp_under_url","ext_temp_over_url","ext_temp_under_url","ext_temp_over_url","ext_temp_under_url","ext_hum_over_url","ext_hum_under_url"]},"hwinfo":{"hw_revision":"prod-202101", "batch_id":0},"mode":"relay","longpush_time":800,"relays":[{"name":"disturbance","appliance_type":"General","ison":false,"has_timer":false,"default_state":"off","btn_type":"detached","btn_reverse":0,"auto_on":0.00,"auto_off":0.00,"schedule":false,"schedule_rules":[]},{"name":"unused","appliance_type":"General","ison":false,"has_timer":false,"default_state":"off","btn_type":"detached","btn_reverse":0,"auto_on":0.00,"auto_off":0.00,"schedule":false,"schedule_rules":[]}],"adcs":[{"range":30,"offset":0.00,"relay_actions":[{"over_threshold":0,"over_act":"disabled","under_threshold":0,"under_act":"disabled"},{"over_threshold":0,"over_act":"disabled","under_threshold":0,"under_act":"disabled"}]}],"ext_sensors":{"temperature_unit":"C"},"ext_temperature":{"1":[{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0},{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0}],"0":[{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0},{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0}],"2":[{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0},{"overtemp_threshold_tC":0.0,"overtemp_threshold_tF":32.0,"undertemp_threshold_tC":0.0,"undertemp_threshold_tF":32.0,"overtemp_act":"disabled","undertemp_act":"disabled","offset_tC":0.0,"offset_tF":0.0}]},"ext_humidity":null,"eco_mode_enabled":true}
When running the Shelly UNI with one DS18B20 it could initialize and progress to ONLINE.
With two DS18B20 it doesn't work (just a shorter JSON).
Expected Behavior
Thing become
ONLINE
stateCurrent Behavior
OFFLINE
. Complete "state":ONLINE
.Possible Solution
The reason might come from this line: https://github.com/openhab/openhab-addons/blob/5cc5ee6f7bcdbaf6fffb2a0213d86c5659672bcc/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java#L129
A analysis of the JSON from the Shelly shows, that the
ext_temperature
array entries are sorted in the following order 1, 0, 2:This causes the
if
to fail and the "fix" not to take place.Steps to Reproduce (for Bugs)
Context
I'm trying to use a Shelly UNI with three DS18B20.
Your Environment