-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Hello @merdok !
I have been using the plugin successfully for several years, thank you 🙏🏻
Recently, I discovered a problem with the zhimi.airfresh.ua1
https://home.miot-spec.com/spec/zhimi.airfresh.ua1
When the inlet temperature drops below zero, a data parsing error occurs.
When it is higher, there is no problem.
Plugin log:
[Fresh Air] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: Call to device timed out
I stopped the plugin, tried to figure it out via command line, and here's what I found out.
When the inlet temperature drops below zero, a data parsing error occurs.
% miot get-prop 192.168.88.124 8.5 --debug
INFO Connecting to device at 192.168.88.124
INFO Device found! Retrieving property value: 8.5
[DEBUG] (Protocol) Call 192.168.88.124: get_properties - [{"siid":8,"piid":5}] - {"retries":2,"timeout":5000}
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (2) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":1}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� 㰯��*T�x�*J��ɽ
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-,.0}],"exe_time":70}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-,.0}],"exe_time":70}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: No number after minus sign in JSON at position 73 (line 1 column 74)
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (1) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":101}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� �X#Sn�.t�j"�/7��
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":101,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":--.'}],"exe_time":120}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":101,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":--.'}],"exe_time":120}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: No number after minus sign in JSON at position 75 (line 1 column 76)
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (0) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":201}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� 㺡E��x�* ���F�
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":201,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":--.'}],"exe_time":60}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":201,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":--.'}],"exe_time":60}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: No number after minus sign in JSON at position 75 (line 1 column 76)
(Protocol) 192.168.88.124 <- Reached maximum number of retries, giving up get_properties - [{"siid":8,"piid":5}]
[DEBUG] (Protocol) 192.168.88.124 <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":201}
ERROR Call to device timed out
% miot get-prop 192.168.88.124 8.5 --debug
INFO Connecting to device at 192.168.88.124
INFO Device found! Retrieving property value: 8.5
[DEBUG] (Protocol) Call 192.168.88.124: get_properties - [{"siid":8,"piid":5}] - {"retries":2,"timeout":5000}
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (2) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":1}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� �ж=��
t����[�5
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.)}],"exe_time":130}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.)}],"exe_time":130}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: Unterminated fractional number in JSON at position 75 (line 1 column 76)
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (1) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":101}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� ��`'��S���^�q~/
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":101,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.)}],"exe_time":30}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":101,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.)}],"exe_time":30}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: Unterminated fractional number in JSON at position 77 (line 1 column 78)
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (0) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":201}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� �و]ʗN����j^�k
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":201,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.*}],"exe_time":120}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":201,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":-0.*}],"exe_time":120}
(Protocol) 192.168.88.124 -> Invalid JSON: SyntaxError: Unterminated fractional number in JSON at position 77 (line 1 column 78)
(Protocol) 192.168.88.124 <- Reached maximum number of retries, giving up get_properties - [{"siid":8,"piid":5}]
[DEBUG] (Protocol) 192.168.88.124 <- Error during send! (timeout) Call to device timed out | Request: {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":201}
ERROR Call to device timed out
Then I stopped the air flow and wait two minutes.
When the inlet temperature is above zero, there are no problems.
% miot get-prop 192.168.88.124 8.5 --debug
INFO Connecting to device at 192.168.88.124
INFO Device found! Retrieving property value: 8.5
[DEBUG] (Protocol) Call 192.168.88.124: get_properties - [{"siid":8,"piid":5}] - {"retries":2,"timeout":5000}
[DEBUG] (Protocol) Start handshake 192.168.88.124
[DEBUG] (Protocol) 192.168.88.124 <- (2) {"method":"get_properties","params":[{"siid":8,"piid":5}],"id":1}
[DEBUG] (Protocol) 192.168.88.124 <- !1p�� �37�x䊺<�_�#� �
[DEBUG] (Protocol) 192.168.88.124 -> Data: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":1.2}],"exe_time":170}
[DEBUG] (Protocol) 192.168.88.124 -> Message: {"id":1,"result":[{"did":"333830665","siid":8,"piid":5,"code":0,"value":1.2}],"exe_time":170}
SUCCESS Got property value -> 1.2
Please fix it.
Thanks!