bt-mqtt-gateway icon indicating copy to clipboard operation
bt-mqtt-gateway copied to clipboard

Error message if bt-mqtt-gateway is started as home assistant addon

Open Micha70 opened this issue 2 years ago • 8 comments

Describe the bug Following error message appears if bt-mqtt-gateway is started as homeassistant addon (https://github.com/FaserF/hassio-addons/tree/master/bt-mqtt-gateway): Found config file at /share/bt-mqtt-gateway.yaml . Copying it now. Starting bt-mqtt gateway in normal mode If there are any bugs occurring below this line, please report it to the bt-mqtt-gateway developer and not to @FaserF - thanks. Traceback (most recent call last): File "./gateway.py", line 63, in from config import settings File "/application/config.py", line 4, in with open(os.path.join(os.path.dirname(os.path.realpath(file)), "config.yaml"), "r") as f: IsADirectoryError: [Errno 21] Is a directory: '/application/config.yaml'

To Reproduce Steps to reproduce the behavior:

  1. Install bt-mqtt-gateway as home assistant addon
  2. start add on
  3. add on does not start, error message posted above appears

Expected behavior Addon can be started, and addon is working

Server (please complete the following information):

  • OS: Linux
  • Distro: [Raspbian]
  • Version [11 (bullseye)]

Additional context running the bt-mqtt-gateway in an virtual environment since several month works very well. Created also a issue on addon (https://github.com/FaserF/hassio-addons/issues/86), however error message above refers to this developer of bt-mqtt-gateway.

Micha70 avatar Aug 21 '22 14:08 Micha70

I have the same issue as @Micha70

antoniomolram avatar Sep 21 '22 19:09 antoniomolram

I have the same issue as @Micha70

@antoniomolram: Have a look on https://github.com/FaserF/hassio-addons/issues/86. You can have a quick fix it by modifying start.h.

Micha70 avatar Sep 22 '22 17:09 Micha70

I am checking this, but I don't know where this repo is located, and you mean start.sh, right? How looks your start.sh. Any help? :)

antoniomolram avatar Sep 22 '22 19:09 antoniomolram

@antoniomolram the repo is located at /usr/share/hassio/addons/git/605cee21/bt-mqtt-gateway. Here I modified the start.sh and added the line sed -i -e 's|"config.yaml"|"../config.yaml"|' ./config.py directly after echo "Found config file at $config_path . Copying it now." cp $config_path /config.yaml

After restart is working. I'm not sure if pressing the button "Rebuild" (the right one) is necessary. I did it.

now log file looks like this: Found config file at /share/bt-mqtt-gateway.yaml . Copying it now. Starting bt-mqtt gateway in normal mode If there are any bugs occurring below this line, please report it to the bt-mqtt-gateway developer and not to @FaserF - thanks. 17:47:46 Starting 17:47:46 Adding 2 thermostat devices 17:47:46 Updating 2 thermostat devices 17:48:46 Updating 2 thermostat devices 17:49:46 Updating 2 thermostat devices

I hope I could help you and you get it running as well!

Micha70 avatar Sep 23 '22 15:09 Micha70

Hi, thank you for the info, now I get other error.... xD

Found config file at /share/bt-mqtt-gateway.yaml . Copying it now.
Starting bt-mqtt gateway in normal mode
If there are any bugs occurring below this line, please report it to the bt-mqtt-gateway developer and not to @FaserF - thanks.
23:30:25 Starting
Traceback (most recent call last):
  File "./gateway.py", line 77, in <module>
    workers_requirements.verify()
  File "/application/workers_requirements.py", line 25, in verify
    requirements = configured_workers()
  File "/application/workers_requirements.py", line 16, in configured_workers
    return _get_requirements(workers)
  File "/application/workers_requirements.py", line 66, in _get_requirements
    for worker_name in workers:
TypeError: 'NoneType' object is not iterable

any idea about this new one? I tried to find it on internet but not too much info about it

antoniomolram avatar Sep 23 '22 21:09 antoniomolram

Looks like you have a problem with your bt-mqtt-gateway.yaml.... Did you ever used the bt-mqtt-gateway standalone? Or do you start directly using it as HA add-on?

Micha70 avatar Sep 24 '22 17:09 Micha70

I was doing it with the HA add-on directly. I will try the standalone option.

antoniomolram avatar Sep 27 '22 18:09 antoniomolram

thank you for your comments Micha70, it was as you said a bt-mqtt-gateway.yaml error, some whitespaces issue.

antoniomolram avatar Sep 27 '22 20:09 antoniomolram