Limych / ha-narodmon

Component to integrate Narodmon cloud into Home Assistant
Other
26 stars 5 forks source link

периодически отваливается плагин, помогает рестарт HA #117

Closed dsultanr closed 7 months ago

dsultanr commented 1 year ago

Environment

Describe the bug

за две недели отвалился пару раз плагин, показывает Unknown, помогает рестарт HA

Configuration.yaml


narodmon:
  verify_ssl: false
  devices:
    - name: "Narodmon"
      latitude: 55.661311
      longitude: 38.139066
      sensors:
        - temperature
        - pressure

Steps to Reproduce

Expected behavior

Debug log

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-19 23:22:14.038 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Connect call failed ('185.245.187.136', 443)]
2023-05-20 01:36:37.179 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-20 11:40:44.619 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message='Pause on PRI/Upgrade'
2023-05-20 13:25:19.010 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Try again]
2023-05-20 14:20:07.639 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Timeout fetching homeassistant_alerts data
2023-05-20 18:30:51.153 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-20 23:16:24.009 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Try again]
2023-05-21 08:53:56.950 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-21 15:01:24.079 ERROR (MainThread) [custom_components.narodmon] Error fetching narodmon data:
2023-05-21 18:44:06.873 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-21 23:25:29.014 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Try again]
2023-05-22 01:25:29.128 ERROR (MainThread) [custom_components.narodmon] Error fetching narodmon data:
2023-05-22 16:14:16.648 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-22 19:15:27.469 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message='Pause on PRI/Upgrade'
2023-05-22 23:22:33.047 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Connect call failed ('185.245.187.136', 443)]
2023-05-23 10:34:33.103 ERROR (MainThread) [custom_components.narodmon] Error fetching narodmon data:
2023-05-23 11:20:17.640 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Timeout fetching homeassistant_alerts data
2023-05-23 23:16:33.222 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2023-05-23 23:22:42.070 ERROR (MainThread) [custom_components.narodmon] Error fetching information from https://narodmon.com/api - Cannot connect to host narodmon.com:443 ssl:default [Connect call failed ('185.245.187.136', 443)]
^C

Additional context

Screenshot 2023-05-24 104605

Screenshot 2023-05-24 104523

dsultanr commented 1 year ago

any news on this?

Myumdom commented 11 months ago

как указать какие датчики передавать в этот нармон?

skadiexe commented 7 months ago

просто никак не работает. с конфигом плясал по всякому, ни один датчик не удалось получить

dsultanr commented 7 months ago

ну у остальных как-то работает

у меня даже отваливаться перестало после обновления HA

скидывай конфиги

вт, 27 февр. 2024 г., 12:56 Ivan Vasilev @.***>:

просто никак не работает. с конфигом плясал по всякому, ни один датчик не удалось получить

— Reply to this email directly, view it on GitHub https://github.com/Limych/ha-narodmon/issues/117#issuecomment-1966181716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM3AFCWCD2QMAV7Z4YHCWTYVWUWXAVCNFSM6AAAAAAYM7DE7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGE4DCNZRGY . You are receiving this because you authored the thread.Message ID: @.***>

skadiexe commented 7 months ago

image

narodmon:
  verify_ssl: false
# apikey: "----"
  devices:
    - name: "Narodmon"
      latitude: 00.12072
      longitude: 00.18236
      scan_interval: "00:20"
      sensors:
        - temperature
        - humidity
        - pressure
        - wind_speed
        - wind_bearing
#        - pm
#        - precipitation
#        - illuminance
#        - uv
#        - radiation
dsultanr commented 7 months ago

в логах смотрел?

у меня вот такой конфиг работает

image

плагин установлен через HACS

image

в settings / devices вот так видно

image

image

skadiexe commented 7 months ago

ну какая-то ругань есть, но она и в погоде гисметео есть, но там все работает

2024-02-27 13:40:42.954 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_HUMIDITY was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.HUMIDITY instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.960 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_ILLUMINANCE was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.ILLUMINANCE instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.965 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_PRESSURE was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.PRESSURE instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.971 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_TEMPERATURE was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.977 WARNING (MainThread) [homeassistant.const] LENGTH_MILLIMETERS was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.MILLIMETERS instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.982 WARNING (MainThread) [homeassistant.const] PRESSURE_MMHG was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.MMHG instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.988 WARNING (MainThread) [homeassistant.const] SPEED_METERS_PER_SECOND was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfSpeed.METERS_PER_SECOND instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
2024-02-27 13:40:42.993 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from narodmon, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/Limych/ha-narodmon/issues
skadiexe commented 7 months ago

image

dsultanr commented 7 months ago

ну и? сравнил свои и мои скрины?

skadiexe commented 7 months ago

сравнил, но я не знаю, что ему нужно, чтобы оно начало работать. делал по инструкции, ничего сложного не увидел.

что нужно, чтобы был 1 device ?

пробовал вручную добавить устройство -> narodmon image

но не работает. все равно 0 device

dsultanr commented 7 months ago

в папке custom_components есть папка narodmod?

skadiexe commented 7 months ago

image

есть

dsultanr commented 7 months ago

restart HA же делал?

попробуй тут дебаг включить, перезагрузи HA и шли полный лог image

skadiexe commented 7 months ago

home-assistant_2024-02-27T18-04-00.677Z.log этот лог?

dsultanr commented 7 months ago

похоже, но нет никаких ошибок.

https://community.home-assistant.io/t/integrations-are-working-but-missing-from-devices-services-where-did-they-go/614434/6 вот тут пишут, что настройка через YAML и через UI это разные вещи

попробуй удалить ha-narodmon в HACS, убрать или закоменть в configuration.yaml и удалить папку в custom_components. перезагрузись и потом заново добавь плагин через HACS и больше ничего не делай, оно должно по дефолту запуститься и появиться devices. еще помню у меня была проблема из-за того, что геопозиция в настройках самого HA не была настроена

dsultanr commented 7 months ago

обновление HA до 2024.1.6 помогло

skadiexe commented 7 months ago

обновился тоже начало ругаться на конфиг убрал строчку scan_interval заработало

ildar170975 commented 5 months ago

у меня порой тупо не работает при старте, со scan_interval или без, а не после отваливается.

narodmon:
  devices:

    - name: Narodmon xxx
      latitude: xxx
      longitude: xxx
      sensors:
        - temperature
        - radiation