mathieu-mp / aio-intex-spa

Python client for Intex Spa wifi interface
https://pypi.org/project/aio-intex-spa/
MIT License
17 stars 2 forks source link

Parse error from status #3

Closed Elkropac closed 2 years ago

Elkropac commented 2 years ago

Hi, i wanted to see, if error is presented in code returned as status. My SPA now says , that it has E81 (no power) on display, and

DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16555066810742","data":"FFFF110F010001B5000000008080801B00008B","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_status:Spa status: '{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°C', 'current_temp': 181, 'preset_temp': 27}'

after restoring power

DEBUG:intex_spa.intex_spa_network_layer:Receiving bytes from the spa: b'{"sid":"16555066641209","data":"FFFF110F01000016000000008080801B00002C","result":"ok","type":2}\n'
DEBUG:intex_spa.intex_spa_status:Spa status: '{'power': False, 'filter': False, 'heater': False, 'jets': False, 'bubbles': False, 'sanitizer': False, 'unit': '°C', 'current_temp': 22, 'preset_temp': 27}'

so the error is mixed in the current_temp. Don't have time to debug now, just reporting

mathieu-mp commented 2 years ago

Nice finding, again !

Could you identify which exact bits are used to represent E81 ? Should I (re) enable the displaying of data bits in debug log mode, which can be useful ?

Elkropac commented 2 years ago

Can you tell me where in code is the debug message? Or send the correct line here.

I can paste it to code while debuging, no need to commit to repository

Elkropac commented 2 years ago

It differs only in 0016h vs 01b5h

16h is 00010110b b5h is 10110101b

10110b is in both. We will need to experiment with other error codes, i guess

Elkropac commented 2 years ago

I just saw, what CyrilP pasted in hass forum. They don't send temperature at all, when there is an error, is that it? I suspected it, because, when you have error, app does not show temperature. You will need to hold last know temperature in some property and use it in case, we have an error on spa Screenshot_20220619-011314_Intex

mathieu-mp commented 2 years ago

To follow on the discussion on the forum: