Smappee broken?

Hi,

yesterday my graphs based on the smappee integration (cloud) suddenly flatlined. Is seems that the integration can’t connect anymore to the cloud api. Any one else facing the same?

Logger: homeassistant.config_entries
Source: components/smappee/__init__.py:104
First occurred: 17:31:04 (1 occurrences)
Last logged: 17:31:04

Error setting up entry smappeeCloud for smappee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/smappee/__init__.py", line 104, in async_setup_entry
    await hass.async_add_executor_job(smappee.load_service_locations)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/pysmappee/smappee.py", line 30, in load_service_locations
    sl = SmappeeServiceLocation(service_location_id=service_location.get('serviceLocationId'),
  File "/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py", line 74, in __init__
    self.load_configuration()
  File "/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py", line 227, in load_configuration
    self.mqtt_connection_central = self.load_mqtt_connection(kind='central')
  File "/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py", line 522, in load_mqtt_connection
    mqtt_connection.start()
  File "/usr/local/lib/python3.9/site-packages/pysmappee/mqtt.py", line 219, in start
    self._client.connect(host=config['MQTT'][self._farm]['host'],
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
  File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
socket.timeout: timed out

https://status.smappee.net/

Seems like an issue existed yesterday

1 Like

That seems indeed related. I think it was around noon that it stopped working.
Smappee status shows the issue is resolved in the meantime. However, seems that there is still an issue. Tried restarting the Smappee and HA, but keep getting ‘socket.timeout: timed out’ error

Somone opened an issue on github in the meantime: smappee integration · Issue #61384 · home-assistant/core · GitHub

Sorry, I do not even know Smappee at all, but your error mention Service_location and looking at their manuals it looks like something you need to log in correctly to their site.
Check you setup again as if you where installing it the first time.

On github @bsmappee has created a pullrequest Bump pysmappee to 0.2.29 by bsmappee · Pull Request #61160 · home-assistant/core · GitHub.
This will normally correct the problem.

the integration is not working yet. This is the error message I get:

Logger: homeassistant.config_entries
Source: components/smappee/init.py:104
First occurred: 13:24:47 (1 occurrences)
Last logged: 13:24:47

Error setting up entry smappeeCloud for smappee
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/usr/src/homeassistant/homeassistant/components/smappee/init.py”, line 104, in async_setup_entry
await hass.async_add_executor_job(smappee.load_service_locations)
File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 52, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.9/site-packages/pysmappee/smappee.py”, line 30, in load_service_locations
sl = SmappeeServiceLocation(service_location_id=service_location.get(‘serviceLocationId’),
File “/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py”, line 74, in init
self.load_configuration()
File “/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py”, line 227, in load_configuration
self.mqtt_connection_central = self.load_mqtt_connection(kind=‘central’)
File “/usr/local/lib/python3.9/site-packages/pysmappee/servicelocation.py”, line 522, in load_mqtt_connection
mqtt_connection.start()
File “/usr/local/lib/python3.9/site-packages/pysmappee/mqtt.py”, line 219, in start
self._client.connect(host=config[‘MQTT’][self._farm][‘host’],
File “/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py”, line 914, in connect
return self.reconnect()
File “/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py”, line 1044, in reconnect
sock = self._create_socket_connection()
File “/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py”, line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File “/usr/local/lib/python3.9/socket.py”, line 844, in create_connection
raise err
File “/usr/local/lib/python3.9/socket.py”, line 832, in create_connection
sock.connect(sa)
socket.timeout: timed out

@Trouble-51, I’m afraid that the correction did not get yet included in the HA release…
I see the 2021.12.1 version, I will try it to see…

Edit : no, still the same error
@bsmappee, do you have an idea when your correction will be included in HA?
The energy section in HA is now broken :frowning:

@evb I have no idea when the correction will be included in HA (the PR already got approved, but it was not released with 2021.12.1).

and also not in 2021.12.2. I am missing my energy information of the last 10 days or so.

@Trouble-51, for me Smappee is working again in the 2021.12.2 version!

Release 2021.12.2 - December 15
Bump pysmappee to 0.2.29 (@bsmappee - #61160) (smappee docs)

thanks it’s working. Didn’t have internet for 8 days despite having optical fibre. Major issue with the cables somewhere down the road.