HELP! Restore from backup caused both Studio Code Server and File Editor to fail!

To undo a failure with a Home Assistant core upgrade (reported in a separate post) I reverted to a full backup I had made a month earlier. That fixed the problem but now neither Studio Code Server nor File Editor work.They both say that the add-on is not running and needs to start. I press the start button but nothing happens.

I tried uninstalling and reinstalling. That did not help and in the File Editor case removed it from the sidebar as well.

I tried different backups (in which I know at least Studio Code Server was working) but that did not help.

I can open the configuration files with Nano in Terminal, and change them on the screen, but cannot exit from nano.

The fact that both addons fail suggests to me it is not an addon problem but something in the file system that was changed by backup restore?

So, I have no way of editing files in a week whan I was planning to do a lot :frowning_face: I need to fix this urgently!

Any ideas?

It is a HASSIO installation.

If I remember nano correct then it is CTRL+O to save and CTRL+X to quit.

Otherwise the logs from the HA and from the addons page would be helpful.

exit from nano is CTRL-X. If changes are made, you will be asked, if save or not.

Beg pardon Nano is in fact working, but it is still not a good way of editing configuration files. I want my Studio Code Server back :cry:

Studio Code Server Log


s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Studio Code Server
 Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.
-----------------------------------------------------------
 Add-on version: 5.5.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / generic-x86-64)
 Home Assistant Core: 2022.12.9
 Home Assistant Supervisor: 2023.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[08:20:49] INFO: Configuring timezone (Europe/London)...
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-code-server successfully started
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-user successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
[08:20:50] INFO: Starting code-server...
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2023-02-10T08:20:50.529Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-02-10T08:20:50.806Z] info  code-server 4.9.1 f7989a4dfcf21085e52157a01924d79d708bcc05
[2023-02-10T08:20:50.807Z] info  Using user-data-dir /data/vscode
[2023-02-10T08:20:50.822Z] info  Using config file ~/.config/code-server/config.yaml
[2023-02-10T08:20:50.822Z] info  HTTP server listening on http://0.0.0.0:1337/ 
[2023-02-10T08:20:50.822Z] info    - Authentication is disabled 
[2023-02-10T08:20:50.822Z] info    - Not serving HTTPS 

General log of a restart

(though I am not sure how that helps)

2023-02-10 14:52:42.038 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration bhyve 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
2023-02-10 14:52:42.039 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hildebrandglow_dcc 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
2023-02-10 14:52:42.039 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs 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
2023-02-10 14:52:42.039 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration ble_monitor 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
2023-02-10 14:52:42.040 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration sonoff 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
2023-02-10 14:52:42.040 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration zha_toolkit 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
2023-02-10 14:52:42.041 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration localtuya 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
2023-02-10 14:52:42.041 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration watchman 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
2023-02-10 14:52:42.041 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration alexa_media 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
2023-02-10 14:52:42.042 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration nodered 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
2023-02-10 14:52:48.249 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Contact Sensor A09C' for switchbot integration not ready yet: Could not find Switchbot contact with address DE:F4:1F:D7:A0:9C; Retrying in background
2023-02-10 14:53:34.010 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0xA902:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.MAC_CHANNEL_ACCESS_FAILURE: 225>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_CHANNEL_ACCESS_FAILURE: 225>')]


Here’s a small extract (forum will not allow more) of the log of me repeating the restore from a full backup … maybe this will offer more clues if you know where to look … ?


2023-02-10 15:30:14.641 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:16.484 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)
2023-02-10 15:30:17.021 ERROR (MainThread) [custom_components.localtuya.common] [bff...dqa] Connect to 192.168.1.22 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.22', 6668)
2023-02-10 15:30:19.093 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:19.160 ERROR (MainThread) [custom_components.localtuya.common] [bfb...xbm] Connect to 192.168.1.7 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.7', 6668)
2023-02-10 15:30:19.556 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)
2023-02-10 15:30:21.163 WARNING (MainThread) [homeassistant.components.zha.core.channels.base] [0x1293:1:0x0500]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), TimeoutError(), TimeoutError(), TimeoutError()]
2023-02-10 15:30:22.031 ERROR (MainThread) [custom_components.localtuya.common] [bff...dqa] Connect to 192.168.1.22 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.22', 6668)
2023-02-10 15:30:24.080 ERROR (MainThread) [custom_components.localtuya.common] [bfb...xbm] Connect to 192.168.1.7 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.7', 6668)
2023-02-10 15:30:24.112 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:26.532 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)
2023-02-10 15:30:27.029 ERROR (MainThread) [custom_components.localtuya.common] [bff...dqa] Connect to 192.168.1.22 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.22', 6668)
2023-02-10 15:30:28.956 ERROR (MainThread) [custom_components.localtuya.common] [bfb...xbm] Connect to 192.168.1.7 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.7', 6668)
2023-02-10 15:30:29.238 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:29.604 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)
2023-02-10 15:30:32.037 ERROR (MainThread) [custom_components.localtuya.common] [bff...dqa] Connect to 192.168.1.22 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.22', 6668)
2023-02-10 15:30:34.286 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:34.292 ERROR (MainThread) [custom_components.localtuya.common] [bfb...xbm] Connect to 192.168.1.7 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.7', 6668)
2023-02-10 15:30:36.580 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)
2023-02-10 15:30:37.027 ERROR (MainThread) [custom_components.localtuya.common] [bff...dqa] Connect to 192.168.1.22 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.22', 6668)
2023-02-10 15:30:38.975 ERROR (MainThread) [custom_components.localtuya.common] [bfb...xbm] Connect to 192.168.1.7 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.7', 6668)
2023-02-10 15:30:39.433 ERROR (MainThread) [custom_components.localtuya.common] [bf9...nio] Connect to 192.168.1.40 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.40', 6668)
2023-02-10 15:30:39.652 ERROR (MainThread) [custom_components.localtuya.common] [bfa...saw] Connect to 192.168.1.38 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 186, in _make_connection
    self._interface = await pytuya.connect(
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 704, in connect
    _, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.1.38', 6668)


Lots of localtuya errors but really not much of other errors.
Can you access port 1337 on your HA installation.
Http://homeassistant.local:1337 or IP?

Come to think of it, sometimes the page do not get updated on addons, so you do not see it as started.
Try to force refresh the page.
In some browsers it is CTRL+F5, others Shift+F5 and others might have yet another way, so check your manual or Google it.

No I can’t

No it is nowhere that simple. I have done everything including a complete repeat of the restore

BTW I noticed that part of my dashboard has disappeared too :angry:

I think they are just devices that have gone offline - a different problem. Like you, I cannot see anything that explains why the Studio Code Server and File Editor would stop working. I have seen other postings of similar problems but no solution. I am really stumped!

Hey guys I am desperate here. What do I do? 24 hours ago I had a working system with no issues that had been running for six months, now I am bouncing around between ZHA failure, SniTun server failure and no working file editor. What do I do? Erase the disk and rebuild my whole system from scratch? Switch to another product?? I am finding it hard to understand how things could so quickly go so badly wrong! :cry: :frowning_face: :angry: :thinking: :grimacing:

Possibly related Studio Code Server issues

If you reinstall, then you can still extract a lot of your setup from the backup by opening it in compression program, like zip or 7-zip. I use 7-zip, because it is free. https://www.7-zip.org/

I still think you can save it though, but you need to scavenge the logs for small clues.
I think it has something to do with your docker setup here, but I have no info to tell me what it is.

I am running HASSIO not Docker. There is a lot in the log files but I cannot find anything that appears relevant, and the Studio Code Server addon log seems to say everything is fine.

I don’t know how to do that … what am I looking for?

I dread the prospect. First problem is that I do not have my SD card writer here on site. If I did re-install HA I could reload the backup but who knows it won’t cause the same problem again? And I suppose that I would have to re-install all my ZigBee devices? A mammoth task – it would take me a week. Why is there not a simpler fix?
:grimacing:

It might be a dummy question, but have you already tried to reboot the host?

Many times! And it reboots itself after a full backup restore.

Suspecting a permissions error somewhere in the file system I am using Terminal to look at the HA file structure, though I am no Linux expert…

The apparently empty /config directory would seem to be a clue?

I do not see how it could be really empty because HA is running and if I run the check in developer tools it says there is no problem.

Any suggestions?