cdpuk / ha-bestway

Home Assistant integration for Bestway / Lay-Z-Spa hot tubs
MIT License
74 stars 18 forks source link

Problem E32 when triggering changes to climate.set_temp through an automation #66

Closed tmh88 closed 1 month ago

tmh88 commented 4 months ago

Bestway device

S100202 Wifi:Airjet v01

Describe the bug

Im getting a spa error "Problem E32" when triggering changes to climate.set_temp through an automation also it seems to lose the climate entity, eg dosent relfelect the app.

Logs

Automation setting temp to 20'c

2024-07-09 16:23:47.842 DEBUG (MainThread) [custom_components.bestway.bestway.api] Device list refreshed: {"devices": [{"protoc": 3, "ws_port": 8080, "port_s": 8883, "gw_did": null, "host": "eum2m.gizwits.com", "sleep_duration": 3600, "port": 1883, "mcu_soft_version": "D4H90227", "product_key": "****", "state_last_timestamp": 1720538617, "role": "owner", "is_sandbox": false, "type": "normal", "product_name": "Airjet_V01", "is_disabled": false, "mcu_hard_version": "P4660011", "wifi_soft_version": "04X3000B", "dev_alias": "Lay z spa", "mesh_id": null, "is_online": true, "dev_label": [], "wss_port": 8880, "remark": "25", "did": "**", "mac": "****", "passcode": "**", "wifi_hard_version": "0ESP32C3", "is_low_power": false}]} 2024-07-09 16:23:47.915 DEBUG (MainThread) [custom_components.bestway.bestway.api] New data received for device xxxxxxxxxxxxxxxxxxxxx 2024-07-09 16:23:47.915 DEBUG (MainThread) [custom_components.bestway.bestway.api] Status for device type 'Airjet_V01' returned: {"E19": 0, "E18": 0, "E32": 1, "E31": 0, "E30": 0, "E11": 0, "E10": 0, "E13": 0, "E12": 0, "E15": 0, "E14": 0, "E17": 0, "E16": 0, "word5": 1, "word4": 0, "word7": 37, "word6": 0, "word1": 0, "word0": 0, "E29": 0, "word2": 111, "option6": 10244, "ver": 1126, "E22": 0, "jet": 0, "E23": 0, "power": 1, "Tnow": 36, "option7": 10260, "option4": 0, "option5": 27178, "option2": 0, "option3": 30, "option0": 59940, "option1": 59940, "E24": 0, "E25": 0, "E26": 0, "E27": 0, "E20": 0, "E21": 0, "E08": 0, "E09": 0, "E06": 0, "E07": 0, "E04": 0, "E05": 0, "E02": 0, "E03": 0, "E01": 0, "bit7": 0, "heat": 6, "Tunit": 1, "wave": 0, "word3": 0, "Tset": 40, "filter": 2, "E28": 0, "bit6": 0, "bit5": 0, "bit4": 0, "bit3": 0, "bit2": 1} 2024-07-09 16:23:47.915 DEBUG (MainThread) [custom_components.bestway.coordinator] Finished fetching Bestway API data in 0.306 seconds (success: True) 2024-07-09 16:23:50.052 DEBUG (MainThread) [custom_components.bestway.bestway.api] Setting target temperature to 20 2024-07-09 16:23:50.234 DEBUG (MainThread) [custom_components.bestway.bestway.api] Device list refreshed: {"devices": [{"protoc": 3, "ws_port": 8080, "port_s": 8883, "gw_did": null, "host": "eum2m.gizwits.com", "sleep_duration": 3600, "port": 1883, "mcu_soft_version": "D4H90227", "product_key": "****", "state_last_timestamp": 1720538617, "role": "owner", "is_sandbox": false, "type": "normal", "product_name": "Airjet_V01", "is_disabled": false, "mcu_hard_version": "P4660011", "wifi_soft_version": "04X3000B", "dev_alias": "Lay z spa", "mesh_id": null, "is_online": true, "dev_label": [], "wss_port": 8880, "remark": "25", "did": "**", "mac": "****", "passcode": "**", "wifi_hard_version": "0ESP32C3", "is_low_power": false}]} 2024-07-09 16:23:50.302 DEBUG (MainThread) [custom_components.bestway.bestway.api] Ignoring update for device xxxxxxxxxxxxxxxxxxxxx as local data is newer 2024-07-09 16:23:50.303 DEBUG (MainThread) [custom_components.bestway.coordinator] Finished fetching Bestway API data in 0.146 seconds (success: True)

Automation setting hvac to off

2024-07-09 16:24:19.817 DEBUG (MainThread) [custom_components.bestway.bestway.api] Device list refreshed: {"devices": [{"protoc": 3, "ws_port": 8080, "port_s": 8883, "gw_did": null, "host": "eum2m.gizwits.com", "sleep_duration": 3600, "port": 1883, "mcu_soft_version": "D4H90227", "product_key": "****", "state_last_timestamp": 1720538630, "role": "owner", "is_sandbox": false, "type": "normal", "product_name": "Airjet_V01", "is_disabled": false, "mcu_hard_version": "P4660011", "wifi_soft_version": "04X3000B", "dev_alias": "Lay z spa", "mesh_id": null, "is_online": true, "dev_label": [], "wss_port": 8880, "remark": "25", "did": "**", "mac": "****", "passcode": "**", "wifi_hard_version": "0ESP32C3", "is_low_power": false}]} 2024-07-09 16:24:19.888 DEBUG (MainThread) [custom_components.bestway.bestway.api] New data received for device xxxxxxxxxxxxxxxxxxxxx 2024-07-09 16:24:19.889 DEBUG (MainThread) [custom_components.bestway.bestway.api] Status for device type 'Airjet_V01' returned: {"E19": 0, "E18": 0, "E32": 1, "E31": 0, "E30": 0, "E11": 0, "E10": 0, "E13": 0, "E12": 0, "E15": 0, "E14": 0, "E17": 0, "E16": 0, "word5": 1, "word4": 0, "word7": 37, "word6": 0, "word1": 0, "word0": 0, "E29": 0, "word2": 111, "option6": 10244, "ver": 1126, "E22": 0, "jet": 0, "E23": 0, "power": 1, "Tnow": 36, "option7": 10260, "option4": 0, "option5": 27178, "option2": 0, "option3": 30, "option0": 59940, "option1": 59940, "E24": 0, "E25": 0, "E26": 0, "E27": 0, "E20": 0, "E21": 0, "E08": 0, "E09": 0, "E06": 0, "E07": 0, "E04": 0, "E05": 0, "E02": 0, "E03": 0, "E01": 0, "bit7": 0, "heat": 4, "Tunit": 1, "wave": 0, "word3": 0, "Tset": 20, "filter": 2, "E28": 0, "bit6": 0, "bit5": 0, "bit4": 0, "bit3": 0, "bit2": 1} 2024-07-09 16:24:19.889 DEBUG (MainThread) [custom_components.bestway.coordinator] Finished fetching Bestway API data in 0.280 seconds (success: True) 2024-07-09 16:24:20.361 DEBUG (MainThread) [custom_components.bestway.bestway.api] Setting heater mode to OFF 2024-07-09 16:24:20.611 DEBUG (MainThread) [custom_components.bestway.bestway.api] Device list refreshed: {"devices": [{"protoc": 3, "ws_port": 8080, "port_s": 8883, "gw_did": null, "host": "eum2m.gizwits.com", "sleep_duration": 3600, "port": 1883, "mcu_soft_version": "D4H90227", "product_key": "****", "state_last_timestamp": 1720538630, "role": "owner", "is_sandbox": false, "type": "normal", "product_name": "Airjet_V01", "is_disabled": false, "mcu_hard_version": "P4660011", "wifi_soft_version": "04X3000B", "dev_alias": "Lay z spa", "mesh_id": null, "is_online": true, "dev_label": [], "wss_port": 8880, "remark": "25", "did": "**", "mac": "****", "passcode": "**", "wifi_hard_version": "0ESP32C3", "is_low_power": false}]} 2024-07-09 16:24:20.740 DEBUG (MainThread) [custom_components.bestway.bestway.api] Ignoring update for device xxxxxxxxxxxxxxxxxxxxx as local data is newer 2024-07-09 16:24:20.741 DEBUG (MainThread) [custom_components.bestway.coordinator] Finished fetching Bestway API data in 0.228 seconds (success: True)

Manually changing setpoint to 21'c

2024-07-09 16:24:39.059 DEBUG (MainThread) [custom_components.bestway.bestway.api] Setting target temperature to 21 2024-07-09 16:24:39.395 DEBUG (MainThread) [custom_components.bestway.bestway.api] Device list refreshed: {"devices": [{"protoc": 3, "ws_port": 8080, "port_s": 8883, "gw_did": null, "host": "eum2m.gizwits.com", "sleep_duration": 3600, "port": 1883, "mcu_soft_version": "D4H90227", "product_key": "****", "state_last_timestamp": 1720538677, "role": "owner", "is_sandbox": false, "type": "normal", "product_name": "Airjet_V01", "is_disabled": false, "mcu_hard_version": "P4660011", "wifi_soft_version": "04X3000B", "dev_alias": "Lay z spa", "mesh_id": null, "is_online": true, "dev_label": [], "wss_port": 8880, "remark": "25", "did": "**", "mac": "****", "passcode": "**", "wifi_hard_version": "0ESP32C3", "is_low_power": false}]} 2024-07-09 16:24:39.478 DEBUG (MainThread) [custom_components.bestway.bestway.api] Ignoring update for device xxxxxxxxxxxxxxxxxxxxx as local data is newer 2024-07-09 16:24:39.478 DEBUG (MainThread) [custom_components.bestway.coordinator] Finished fetching Bestway API data in 0.170 seconds (success: True)

tmh88 commented 4 months ago

if there is anything else i can do to help diagnose, please let me know

alexkrishnan commented 4 months ago

Is this problem happening consistently 100% of the time or intermittently?

tmh88 commented 4 months ago

Is this problem happening consistently 100% of the time or intermittently?

seems fairly consistent

alexkrishnan commented 4 months ago

Does using the first-party Bestway app surface any errors or does that work without complaint? Also have you power-cycled the spa at the plug?

alexkrishnan commented 4 months ago

The "good" news is that after power cycling with the green button I am now experiencing the exact same E32 on my AirJet V01 on US servers. To answer my previous questions:

1) No, a hard power cycle does not clear the error. 2) No, the first-party Bestway app does not surface this error in any way.

Even being able to reproduce the error doesn't really give my any clues however. I am unable to find any documentation anywhere for errors in the E3x range so it's quite the frustrating mystery.

tmh88 commented 4 months ago

I have done a bit of debugging, the error isn't caused by setting the hvac mode. It's only caused by altering the setpoint.

cdpuk commented 4 months ago

E32 isn't something I've come across before.

When we get E32, is that only as per the errors sensor in HA? Does the physical spa or app still behave OK?

Are you able to clear E32 in any way?

If it's changing the setpoint that's the issue, I suggest collecting logs while doing this in the app. It should then be possible to spot the property change in the logs and see if anything else changes at the same time.

pdecat commented 2 months ago

So apparently, the issue I reported in #76 is linked to this E32 code, which isn't actually an error as I do not see any issues in the Bestway app nor on the pump display.

pdecat commented 2 months ago

It seems to clear if I turn off Heat in the Bestway app, and comes back as soon as I re-enable Heat but target temp is already reached.

pdecat commented 2 months ago

So FWIW, I've updated my alerting automation to ignore this specific E32 error code.

pdecat commented 2 months ago

I believe E32 just means heating is requested, but the heater element isn't actually on because target temperature is already reached.

cdpuk commented 1 month ago

Well spotted, I'll get this updated