Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

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

Open
Micha70 opened this issue Aug 21, 2022 · 8 comments
Open

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

Micha70 opened this issue Aug 21, 2022 · 8 comments

Comments

@Micha70
Copy link

Micha70 commented Aug 21, 2022

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 (FaserF/hassio-addons#86), however error message above refers to this developer of bt-mqtt-gateway.

@antoniomolram
Copy link

I have the same issue as @Micha70

@Micha70
Copy link
Author

Micha70 commented Sep 22, 2022

I have the same issue as @Micha70

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

@antoniomolram
Copy link

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? :)

@Micha70
Copy link
Author

Micha70 commented Sep 23, 2022

@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!

@antoniomolram
Copy link

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

@Micha70
Copy link
Author

Micha70 commented Sep 24, 2022

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?

@antoniomolram
Copy link

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

@antoniomolram
Copy link

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

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

No branches or pull requests

2 participants