masaccio / ha-kingspan-watchman-sensit

Kingspan Connect Sensor integration for Home Assistant
MIT License
9 stars 0 forks source link

Integration fails to query #29

Open mikeeales opened 4 months ago

mikeeales commented 4 months ago

Hi

Thanks for this excellent App and fantastic support.

I am running latest version of HA as a container as below: Core 2024.4.2 Frontend 20240404.1

The [ha-kingspan-watchman-sensit] v1.6.5 integration works but fails to query the API intermittently. Logs are below (have removed my email addreess)...

2024-04-17 09:33:16.106 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Unhandled error logging in as x.y@gmail.com: 2024-04-17 10:33:15.828 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Unhandled error logging in as x.y@gmail.com: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)

mikeeales commented 2 months ago

Would it be possible to have a look at this issue? Many Thanks

masaccio commented 2 months ago

I believe the consensus of others is that the integration works. I can only think there is a transport problem between your device and the Kingspan API

mikeeales commented 2 months ago

Thanks for your reply It's very strange as the Integration works maybe 50% of the time? I have the Kingspan python API working as well on the same RPi 4 running the HA on docker which works 100%? Thanks for your help Mike

On Fri, 31 May 2024, 21:42 Jon Connell, @.***> wrote:

I believe the consensus of others is that the integration works. I can only think there is a transport problem between your device and the Kingspan API

— Reply to this email directly, view it on GitHub https://github.com/masaccio/ha-kingspan-watchman-sensit/issues/29#issuecomment-2142952028, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDDVE2ZIAZLWGNRYB656PB3ZFDOFFAVCNFSM6AAAAABGLD3FLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSHE2TEMBSHA . You are receiving this because you authored the thread.Message ID: @.***>

masaccio commented 2 months ago

That is very odd! It should be possible to enable the Zeep debug and dump the SOAP transport XML but you’d need to edit it for personal info. I am skeptical it will help though as the error seems to come from the SSL layer.

mikeeales commented 2 months ago

Where is the Zeep debug enabled? Thanks

On Sat, 1 Jun 2024, 11:32 Jon Connell, @.***> wrote:

That is very odd! It should be possible to enable the Zeep debug and dump the SOAP transport XML but you’d need to edit it for personal info. I am skeptical it will help though as the error seems to come from the SSL layer.

— Reply to this email directly, view it on GitHub https://github.com/masaccio/ha-kingspan-watchman-sensit/issues/29#issuecomment-2143398255, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDDVE255CVVLUHYUAD7UV2TZFGPLRAVCNFSM6AAAAABGLD3FLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGM4TQMRVGU . You are receiving this because you authored the thread.Message ID: @.***>

mikeeales commented 2 months ago

Hi Jon Here are the logs with all the debug switched on. I edited out my email address: Worked twice, failed twice. Thanks for all the help Mike

2024-06-08 08:20:30.138 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'kingspan_watchman_sensit' calls async_add_job, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/kingspan_watchman_sensit/init.py, line 81: hass.async_add_job(hass.config_entries.async_forward_entry_setup(entry, platform)), please create a bug report at https://github.com/masaccio/ha-kingspan-watchman-sensit/issues

2024-06-08 09:20:31.182 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Fetching tank data with @.***

2024-06-08 09:20:31.581 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Unhandled error logging in as @.***:

2024-06-08 09:20:31.582 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Error fetching kingspan_watchman_sensit data:

2024-06-08 09:20:31.582 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Finished fetching kingspan_watchman_sensit data in 0.400 seconds (success: False)

2024-06-08 09:20:31.587 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ (now() + timedelta(days=states('sensor.forecast_empty')|int)).strftime('%B %d, %Y') }}' but no default was specified') while processing template 'Template<template=({{ (now() + timedelta(days=states('sensor.forecast_empty')|int)).strftime('%B %d, %Y') }}) renders=128>' for attribute '_attr_native_value' in entity 'sensor.date_oil_runs_out'

2024-06-08 10:20:31.182 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Fetching tank data with @.***

2024-06-08 10:20:32.236 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank data: level=384, capacity=1800, serial_number=20003530,last_read=2024-06-08 00:05:21.070000+01:00, usage_rate=1.3, forecast_empty=293

2024-06-08 10:20:32.236 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Found tank name 'MV'

2024-06-08 10:20:32.236 INFO (MainThread) [custom_components.kingspan_watchman_sensit] Fetching kingspan_watchman_sensit data recovered

2024-06-08 10:20:32.236 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Finished fetching kingspan_watchman_sensit data in 1.054 seconds (success: True)

2024-06-08 10:20:32.237 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read oil level: 384 litres

2024-06-08 10:20:32.237 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read oil level: 21.3 percent

2024-06-08 10:20:32.237 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read tank capcity: 1800 litres

2024-06-08 10:20:32.237 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank last read 2024-06-08 00:05:21.070000+01:00

2024-06-08 10:20:32.238 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Current oil usage 1 litres/day

2024-06-08 10:20:32.238 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank forecast empty 293 days

2024-06-08 11:00:33.473 WARNING (Recorder) [homeassistant.components.recorder.db_schema] State attributes for sensor.octopus_energy_electricity_22j0486836_2000004416431_current_rate exceed maximum size of 16384 bytes. This can cause database performance issues; Attributes will not be stored

2024-06-08 11:20:32.182 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Fetching tank data with @.***

2024-06-08 11:20:33.321 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank data: level=384, capacity=1800, serial_number=20003530,last_read=2024-06-08 00:05:21.070000+01:00, usage_rate=1.3, forecast_empty=293

2024-06-08 11:20:33.321 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Found tank name 'MV'

2024-06-08 11:20:33.321 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Finished fetching kingspan_watchman_sensit data in 1.139 seconds (success: True)

2024-06-08 11:20:33.321 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read oil level: 384 litres

2024-06-08 11:20:33.322 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read oil level: 21.3 percent

2024-06-08 11:20:33.322 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Read tank capcity: 1800 litres

2024-06-08 11:20:33.322 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank last read 2024-06-08 00:05:21.070000+01:00

2024-06-08 11:20:33.322 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Current oil usage 1 litres/day

2024-06-08 11:20:33.322 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Tank forecast empty 293 days

2024-06-08 12:20:33.182 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Fetching tank data with @.***

2024-06-08 12:20:33.646 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Unhandled error logging in as @.***:

2024-06-08 12:20:33.646 ERROR (MainThread) [custom_components.kingspan_watchman_sensit] Error fetching kingspan_watchman_sensit data:

2024-06-08 12:20:33.646 DEBUG (MainThread) [custom_components.kingspan_watchman_sensit] Finished fetching kingspan_watchman_sensit data in 0.464 seconds (success: False)

On 1 Jun 2024, at 11:32, Jon Connell @.***> wrote:

That is very odd! It should be possible to enable the Zeep debug and dump the SOAP transport XML but you’d need to edit it for personal info. I am skeptical it will help though as the error seems to come from the SSL layer.

— Reply to this email directly, view it on GitHub https://github.com/masaccio/ha-kingspan-watchman-sensit/issues/29#issuecomment-2143398255, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDDVE255CVVLUHYUAD7UV2TZFGPLRAVCNFSM6AAAAABGLD3FLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGM4TQMRVGU. You are receiving this because you authored the thread.