-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disconnected from MQTT without further errors #2
Comments
At the moment I have no idea if it would or would not work on hass.io. |
Quick reply, cheers. It makes sense the script doesn't get executed as root. It could have something to do with the fact that SSH for hass.io uses a docker container. Every time the container restarts, I lose the crontab functionality. I generally only run that container when I need it. But, to be fair, right now I have it in crontab (in the container), and it still doesn't seem to run. No errors either. But nothing connects to the broker and no home assistant errors. I'll try to append sudo as a command now, see what it does. If I just execute in shell I get an error bluepy doesn't exist. I don't know how to load that in that environment. |
Are you able to ssh outside of the container? I really have no idea how hass.io "behaves" compared to a regular Linux install. But on a Pi if you add a blank file called ssh on the root of the SD card it allows you to ssh into it. Dunno if this feature is kept in hass.io. If it is then you can do all the things you need outside of the hass.io container and it should work |
AFAIK (not extremely technical, so I may get things wrong) hass.io is a hypervisor that loads and manages multiple containers with functionality. Home assistant is one of those containers. Then you install add-ons (also containers) that add functionality. SSH is one of those add-ons. It works great, including remote access. But you can't access every linux function. For example, I would have no clue how to use apt. I also don't know how to get pip in there. Maybe it's possible, but I just don't know how 😅 Root access is possible, but it's access to the container. I know it's possible to turn off protection mode and "escape" to the system, but even then your access is limited. Long story short, hass.io makes things easier as a user, but power user features such as these are a bit harder. I'll continue looking and will of course let you know if I find a way. |
Thanks. I've done a quick search onhass.io and crontab and it doesn't appear possible to access the main OS's crontab. |
That's fair! Your library is aimed at hassbian and that's what it does 👍 For me hass.io is the way because it's a mad convenient way to do more than just automate your home. Besides this scale I have no further power use requirements. But I'll find a way! |
I've implemented this script according to the instructions. I couldn't get the script working via crontab (that seems to get reset on hass.io), so I use a home assistant service to trigger a shell script instead. As soon as I trigger the service, this happens in the log for mosquitto.
I know the information in the script is correct, because the client clearly connects. If I do anything else, it doesn't appear in the logs for mosquitto.
Home assistant's logs indicate nothing.
I would love to be able to fix this, because it seems very useful 😄
The text was updated successfully, but these errors were encountered: