Open twenzel opened 2 years ago
Hi, I reproduce the issue.
System.InvalidCastException: Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in D:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 124
at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 505
at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 394
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Error processing MQTT message on topic 'zigbee2mqtt/LivarnoStrip-0x588e81fffef2c9a4'
System.InvalidCastException: Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in D:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 124
at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 505
at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 394
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Error processing MQTT message on topic 'zigbee2mqtt/XiaomiMotionChamberSouth-0x00158d0006d41209'
System.InvalidCastException: Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in D:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 124
at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 505
at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 394
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Error processing MQTT message on topic 'zigbee2mqtt/XiaomiMotionBed-0x00158d0006d41425'
System.InvalidCastException: Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Newtonsoft.Json.Linq.Extensions.Value[U](IEnumerable`1 value)
at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in D:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 124
at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 505
at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in D:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 394
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Error processing MQTT message on topic 'zigbee2mqtt/XiaomiMotion-0x00158d0006d46f30'
On a side-note, the CPU is always used at 5 or 6% by zigbee2mqtt assistant:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3770 root 20 0 15.5g 67968 5300 S 6.2 1.7 107:03.45 dotnet Zigbee2MqttAssistant.dll
Environment: using containers
Payload:
This is for a
Aqara temperature, humidity and pressure sensor (WSDCGQ11LM)
, but happens also for aAqara door & window contact sensor (MCCGQ11LM)
.Steps I took to try resolve the problem
For all payloads I checked, it seems the
linkquality
is null.Installation