yo-han / Home-Assistant-Carelink

Unofficial Home Assistant Carelink Component
MIT License
19 stars 8 forks source link

exception __get_data() session get response is not OK204 #82

Open milekrisz opened 1 week ago

milekrisz commented 1 week ago

Dear Yo-ha! Thank you for your work! I have a little issue. The new integration (2024.3.1) working fine, but no data is received. I tried to write the optional PatientID, too. The oldiest integration (2024.1.0) brought the informations.

The debug log:

2024-04-25 18:04:04.135 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration carelink which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-25 18:04:20.299 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __execute_init_procedure()
2024-04-25 18:04:20.299 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _process_token_file()
2024-04-25 18:04:20.302 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _get_access_token_payload()
2024-04-25 18:04:20.302 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_config_settings()
2024-04-25 18:04:21.377 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: User region: EU
2024-04-25 18:04:21.466 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_my_user()
2024-04-25 18:04:21.467 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_data()
2024-04-25 18:04:21.467 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __handle_authorization_token()
2024-04-25 18:04:21.467 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _get_access_token_payload()
2024-04-25 18:04:21.586 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __getPatients()
2024-04-25 18:04:21.586 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_data()
2024-04-25 18:04:21.586 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __handle_authorization_token()
2024-04-25 18:04:21.586 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _get_access_token_payload()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: Found patient **redacted** (**redacted**)
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __handle_authorization_token()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _get_access_token_payload()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_connect_display_message()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_data()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __handle_authorization_token()
2024-04-25 18:04:21.637 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: _get_access_token_payload()
2024-04-25 18:04:21.740 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_data() failed: exception __get_data() session get response is not OK204
2024-04-25 18:04:21.741 DEBUG (MainThread) [custom_components.carelink] Using timezone Europe/Budapest
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] Using timezone Europe/Budapest
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] the marker with type 'MEAL' could not be tracked correctly. Check if your Carelink data contains a key with the name list index out of range, it seems to be missing.
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] the marker with type 'INSULIN' could not be tracked correctly. Check if your Carelink data contains a key with the name list index out of range, it seems to be missing.
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] the marker with type 'AUTO_BASAL_DELIVERY' could not be tracked correctly. Check if your Carelink data contains a key with the name list index out of range, it seems to be missing.
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] the marker with type 'AUTO_MODE_STATUS' could not be tracked correctly. Check if your Carelink data contains a key with the name list index out of range, it seems to be missing.
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] the marker with type 'LOW_GLUCOSE_SUSPENDED' could not be tracked correctly. Check if your Carelink data contains a key with the name list index out of range, it seems to be missing.
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] _async_update_data: {'client_timezone': zoneinfo.ZoneInfo(key='Europe/Budapest'), 'pump_battery_level': None, 'conduit_battery_status': None, 'sensor_battery_level': None, 'sensor_duration_hours': None, 'sensor_duration_minutes': None, 'reservoir_level': None, 'reservoir_amount': None, 'reservoir_remaining_units': None, 'last_sg_trend': None, 'time_to_next_calib_hours': None, 'active_insulin': None, 'active_insulin_attributes': {}, 'last_alarm': None, 'last_alarm_attributes': {}, 'active_basal_pattern': None, 'average_glucose_level_mgdl': None, 'below_hypo_limit': None, 'above_hyper_limit': None, 'time_in_range': None, 'max_auto_basal_rate': None, 'sg_below_limit': None, 'last_marker_meal': None, 'last_marker_insulin': None, 'last_marker_auto_basal_delivery': None, 'last_marker_auto_mode_status': None, 'last_marker_low_glucose_suspend': None, 'binary_sensor_pump_comm_state': None, 'binary_sensor_sensor_comm_state': None, 'binary_sensor_conduit_in_range': None, 'binary_sensor_conduit_pump_in_range': None, 'binary_sensor_conduit_sensor_in_range': None, 'pump serial': None, 'pump name': 'Name Unvailable', 'pump model': None, 'app_model_type': None}
2024-04-25 18:04:21.742 DEBUG (MainThread) [custom_components.carelink] Finished fetching carelink data in 1.443 seconds (success: True)

What could be the problem? Thank you for your help!

yo-han commented 1 week ago

I redacted some personal info in your issue. You do not want that to be found on the internet.

The error is not very specific, but when ik can find the time I will take a look at it.

milekrisz commented 1 week ago

Ohh, thank you, I did not notice.