system-bridge icon indicating copy to clipboard operation
system-bridge copied to clipboard

System Bridge to HA - no entities shown

Open Anto79-ops opened this issue 3 years ago • 6 comments

Description

Hi All,

Just wanted to move my discussion to an issue now (details in the link):

https://github.com/timmo001/system-bridge/discussions/1829#discussioncomment-3403209

I still can't get System Bridge (SB) to work in HA. No entities are being reported.

Its running on my Ubuntu 22.04 machine, I can access the system bridge via weburl, and I see all the data there.

http://192.168.1.139:9170/app/data.html?apiKey=[redacted API]&apiPort=9170

HA auto discovers SB, it accepts my token, but no entities in HA while it runs. After a while, like hours, another issue happens, but I just wanted to solve the issue of getting information into HA first.

Perhaps its not not working with Ubuntu 22.04?

IF you have any ideas? that would be awesome, thanks!

What Platform / OS are you running?

Linux

What version are you running?

3.4.4

Anything in the logs or a references that might be useful?

Home Assistant 2022.8.5
Supervisor 2022.08.3
Operating System 8.5
Frontend 20220802.0 - latest

Additional information

No response

Anto79-ops avatar Aug 16 '22 17:08 Anto79-ops

just updated to system bridge 3.4.5 and it works!!

thank you very much!

Anto79-ops avatar Sep 04 '22 00:09 Anto79-ops

Ahhh ok it worked for about 5 minutes and I saw entities being reported to HA, but then they became unavailable.

I deleted the integration and tried again, but now it's back to not working.

The error in the logs are a bit different now.

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:96
First occurred: 7:00:46 PM (1 occurrences)
Last logged: 7:00:46 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/systembridgeconnector/websocket_client.py", line 492, in listen
    await self.listen_for_messages(callback=_callback_message)
  File "/usr/local/lib/python3.10/site-packages/systembridgeconnector/websocket_client.py", line 505, in listen_for_messages
    message = await self.receive_message()
  File "/usr/local/lib/python3.10/site-packages/systembridgeconnector/websocket_client.py", line 527, in receive_message
    raise ConnectionClosedException("Connection closed to server")
systembridgeconnector.exceptions.ConnectionClosedException: Connection closed to server

And

Logger: homeassistant.config_entries
Source: config_entries.py:1031
First occurred: 6:39:03 PM (5 occurrences)
Last logged: 7:01:45 PM

Config entry '192.168.1.139' for system_bridge integration not ready yet: Could not connect to 192.168.1.139 (192.168.1.139).; Retrying in background
Config entry '192.168.1.139' for system_bridge integration not ready yet: Timed out waiting for 192.168.1.139 (192.168.1.139).; Retrying in background

Got excited there for a few minutes, and actually saw entities for the first time! Looked good while it lasted.

Anto79-ops avatar Sep 04 '22 01:09 Anto79-ops

I'm unsure what is happening here.

I've set up a Ubuntu 22.04 instance and installed the application following the instructions in the docs and the Home Assistant can connect fine and holds the connection.

I don't see any errors show up that could point to what your issue is. Do you have anything special about your setup, such as a custom firewall or any special networking?

timmo001 avatar Sep 05 '22 20:09 timmo001

thanks @timmo001 for looking into this for Ubuntu 22.04.

I don't have anything special with the firewall, have just whatever comes standard in Ubuntu 22.04

To install System Bridge, I simply just typed below in the command line, one line at a time, except for the the last line, added 3.10 to the python3.10

sudo apt update
sudo apt install lshw upower
sudo apt install python3 python3-pip python3-setuptools python3-wheel
python3.10 -m pip install --upgrade systembridgeshared systembridgebackend systembridgecli systembridgefrontend systembridgegui

Installed without any errors.

running it I type:

python3.10 -m systembridgebackend --no-gui

and it runs.

Could you please detail how you installed it on your Ubuntu 22.04? if its different than the above thanks you!

Are there any logs I can share?

Also, just happened to see this when I checking the status of the service.

Sep 05 15:08:17 anto-GC676AA-ABA-m8150n python3.10[8572]: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
Sep 05 15:08:17 anto-GC676AA-ABA-m8150n python3.10[8572]: [SQL: UPDATE sensors SET timestamp=? WHERE sensors."key" = ?]
Sep 05 15:08:17 anto-GC676AA-ABA-m8150n python3.10[8572]: [parameters: (1662412092.0173047, 'temperatures_coretemp_critical')]
Sep 05 15:08:17 anto-GC676AA-ABA-m8150n python3.10[8572]: (Background on this error at: https://sqlalche.me/e/14/e3q8)

but to be honest, there's lots of information on the screen as it runs, I don't know what is important or not.

Anto79-ops avatar Sep 05 '22 20:09 Anto79-ops

any logs we can look into to figure this out?

I've worked with devs before, figuring out issues, and usually involves looking into logs.

Anto79-ops avatar Sep 19 '22 18:09 Anto79-ops

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Oct 20 '22 08:10 github-actions[bot]