perara / python-systemair-saveconnect

API bindings for the systemair-savecair web interface
MIT License
14 stars 4 forks source link

Bug when transitioning from Fireplace => Away, Holiday ...ect #1

Open perara opened 5 years ago

perara commented 5 years ago

When querying savecair to chang from Fireplace to another mode, the system does not respond correctly to the command. Takes about 30 seconds before the module reacts again.

hwikene commented 5 years ago

Is it possible to add time for how long the "fireplace" mode will be active?

perara commented 5 years ago

Currently, I have statically set the maximum time of each of the modes. This could be changed to work variably, however (except that the websocket connection closes all together if invalid time or larger then maximum in inputted)

hwikene commented 5 years ago

Ok.. does the mode change work now? I need to set up a new IAM when i get to work tomorrow. I have not testet anything yet.

perara commented 5 years ago

@hwikene Does not work. I did abit of testing:

Got message from back-end: {"type":"READ","readValues":{"alarm_emt_state":"inactive","control_regulation_airflow_manual_fan_stop":true,"function_active_heat_recovery":true,"function_active_service_user_lock":false,"alarm_rat_state":"inactive","alarm_low_sat_state":"inactive","control_regulation_demand_co2_status":false,"function_active_heating":false,"function_active_defrosting":false,"alarm_fpt_state":"inactive","function_active_cooker_hood":false,"alarm_eat_state":"inactive","alarm_ect_state":"inactive","alarm_rh_state":"inactive","alarm_manual_mode_state":"inactive","alarm_secondary_air_state":"inactive","alarm_overheat_temperature_state":"inactive","components_filter_time_left":18588146,"week_schedule_any_defined":true,"alarm_filter_state":"inactive","alarm_oht_state":"inactive","control_regulation_demand_rh_status":false,"alarm_bys_state":"inactive","alarm_sat_state":"inactive","alarm_defrosting_state":"inactive","alarm_manual_fan_stop_state":"inactive","function_active_cooling":false,"function_active_heater_cooldown":false,"function_active_free_cooling":false,"function_active_cooling_recovery":false,"control_regulation_airflow_type":"rpm","function_active_vacuum_cleaner":false,"alarm_frost_prot_state":"inactive","alarm_rgs_state":"inactive"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"user_mode_fireplace_duration":60}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_change_request":"4"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_time_left_seconds":3600}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"main_user_mode":"4"}}

bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"user_mode_away_duration":72}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_change_request":"5"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_time_left_seconds":3592}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"main_user_mode":"4"}}

bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"user_mode_holiday_duration":365}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_change_request":"6"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_time_left_seconds":3583}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"main_user_mode":"4"}}

bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"user_mode_refresh_duration":240}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_change_request":"3"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"READ","readValues":{"main_user_mode":"4"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_time_left_seconds":3569}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"main_user_mode":"4"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"READ","readValues":{"mode_time_left_seconds":3569}}

Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_change_request":"1"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"mode_time_left_seconds":0}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"VALUE_CHANGED","askedByClient":false,"changedValues":{"main_user_mode":"1"}}
bundle.a7a9ec6c.js:71 Got message from back-end: {"type":"READ","readValues":{"mode_time_left_seconds":0}}

Now i changed between FIreplace -> Away Fireplace -> Holiday Fireplace -> Refresh Each of these recieve a third mode set back to Fireplace

Finally is set it to Manual, which work. The different from what i can see is that "mode_time_left_seconds":0 is set in the backend. Maybe this causes issues? When i change modes i do not reset model_time_left, but then again, i cannot see that the savecair platform does either :P

perara commented 5 years ago

Worth to mention that this is also an issue in the savecair web interface and not only in HA

hwikene commented 5 years ago

Could it be that some of the modes have different time functions like minutes, hours and days? I know "Fireplace" have minutes and "Away" have days.

perara commented 5 years ago

Could be, but it does not work between Fireplace => Refresh, which is both minute based

hwikene commented 5 years ago

Is it possible to male a function so you can choose how long you want the mode activated? Mabey that could help? Is it also possible to use other Systemair units? Or does this only work with VTR300 unit?

perara commented 5 years ago

I suppose it work with most systemair units that are compatible with the save cair module. I have not tested it because I only have access to a vtr 300.

hwikene commented 5 years ago

I can test that tomorrow :) Do you also get a sensor on filter changes?

perara commented 5 years ago

Yes :) components_filter_time_left which is found in the data dictionary.

hwikene commented 5 years ago

Great!! Are you on Home Assistant Discord channel?

perara commented 5 years ago

Yes :)

hwikene commented 5 years ago

What is you nick?