Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sense Energy Monitor - Hassbian HA 0.98.2 #26388

Closed
undert03 opened this issue Sep 3, 2019 · 9 comments
Closed

Sense Energy Monitor - Hassbian HA 0.98.2 #26388

undert03 opened this issue Sep 3, 2019 · 9 comments

Comments

@undert03
Copy link

undert03 commented Sep 3, 2019

Hassbian Latest with HA 0.98.2 Getting this error with Sense Component

ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-03 16:56:56 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.energy_production fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 120, in async_update
    await self.update_sensor()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 60, in update_active
    await data.update_realtime()
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 41, in update_realtime
    await self.async_realtime_stream(single=True)
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 47, in async_realtime_stream
    async with websockets.connect(url) as ws:
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 519, in __aenter__
    return await self
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 537, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 986, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1014, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
@springstan
Copy link
Member

Please add some more information to your issue :) As a reference: how to report an issue

@undert03
Copy link
Author

undert03 commented Sep 3, 2019

Hardware:
RPI 3b+

Fresh install of hassbian OS:
Distro......: Raspbian GNU/Linux 10 (buster)
Kernel......: Linux 4.19.50-v7+

Homeassistant Version:
98.2

component
https://www.home-assistant.io/components/sense/

.87 was the last working version for sense for me

It seems it happened after the python 3.7 upgrade.

@springstan
Copy link
Member

Looks like this is an issue in the python package sense, see here for details.
You may even have invalid certificates installed and have to debug what exactly is going wrong.
Hopefully this post in the Raspberry Pi forum can help you.

@undert03
Copy link
Author

undert03 commented Sep 4, 2019

2019-09-04 11:34:42 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:42 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:42 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:42 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:42 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.energy_production fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 120, in async_update
    await self.update_sensor()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 60, in update_active
    await data.update_realtime()
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 41, in update_realtime
    await self.async_realtime_stream(single=True)
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 47, in async_realtime_stream
    async with websockets.connect(url) as ws:
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 519, in __aenter__
    return await self
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 537, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 986, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1014, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:43 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.energy_usage fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 120, in async_update
    await self.update_sensor()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/sensor.py", line 60, in update_active
    await data.update_realtime()
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 41, in update_realtime
    await self.async_realtime_stream(single=True)
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 47, in async_realtime_stream
    async with websockets.connect(url) as ws:
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 519, in __aenter__
    return await self
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 537, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 986, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1014, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:47 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:47 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)
2019-09-04 11:34:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sense/__init__.py", line 64, in async_sense_update
    await hass.data[SENSE_DATA].update_realtime()
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 41, in update_realtime
    await self.async_realtime_stream(single=True)
  File "/srv/homeassistant/lib/python3.7/site-packages/sense_energy/asyncsenseable.py", line 47, in async_realtime_stream
    async with websockets.connect(url) as ws:
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 519, in __aenter__
    return await self
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 537, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 986, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1014, in _create_connection_transport
    await waiter
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1056)

@probot-home-assistant
Copy link

Hey there @kbickar, mind taking a look at this issue as its been labeled with a integration (sense) you are listed as a codeowner for? Thanks!

@undert03
Copy link
Author

undert03 commented Sep 4, 2019

This did work for me on Hassbian

open up /etc/ssl/openssl.cnf and change “CipherString” from “DEFAULT@SECLEVEL=2” to “DEFAULT@SECLEVEL=1” Then you will have to reboot your system.

https://community.home-assistant.io/t/debian-10-and-openssl-1-1-1b-wrong-signature-type-errors/121050

@springstan
Copy link
Member

I agree with the last comment in the community post you linked:

Sense has to be the one to do the fixing, not Home Assistant
https://community.home-assistant.io/t/debian-10-and-openssl-1-1-1b-wrong-signature-type-errors/121050/3

@undert03
Copy link
Author

undert03 commented Sep 4, 2019

@springstan agreed, def not a solution but a workaround until a fix. When I get to work I am going to post it to the sense py issue page.

@stale
Copy link

stale bot commented Dec 3, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants