There is obviously something that must be missing around connecting the Chroot environment to the DSM environment. I am thinking it might be something around mounting the Chroot environment to the non-chroot environment. It still seems that everything is running fine from the root environment but within the Admin environment (all within Chroot) it is looking at the wrong config.json file. I am sure I installed globally.
I’m working at it but I suggest you uninstall and reinstall chroot to start fresh. Then use the updated instructions in my first post.
Thanks, will do! From all I have read, everything should still work with home bridge even with that Avahi fail error.
Just added a few more updates.
Thanks! Just removed everything I had around chroot and homebridge in order to start from scratch. Once my Synology comes back from reboot I will give it a shot.
Added sed -i s:3rdparty/debian-chroot/debian-chroot.cgi/direct/router:/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/router: /var/packages/debian-chroot/target/app/debian-chroot.js && sed -i s:3rdparty/debian-chroot/debian-chroot.cgi/direct/poller:/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/poller: /var/packages/debian-chroot/target/app/debian-chroot.js
to the instructions to fix the webGUI thing
Although, the web interface still doesn’t function properly.
For the Web GUI fix, do I just put the code you have above in terminal while logged into the root of the synology (not chroot)?
I did the fix before, just remember following some steps on a website I found.
Unfortunately, homebridge nor the task worked. :-[
Homebridge does not even work from Terminal (tried as root user in chroot)
root@Synology-White:~# /var/packages/debian-chroot/scripts/start-stop-status start
Debian Chroot is already running
root@Synology-White:~# homebrisge
-ash: homebrisge: command not found
root@Synology-White:~# /var/packages/debian-chroot/scripts/start-stop-status chroot
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
root@Synology-White:/# homebridge
bash: homebridge: command not found
I know this sounds strange but I think part of the issues have to do with any line of code you put with the && signs. Anytime I ran a line of code with those it did not seem to load correctly. Something is very strange because here is the code I used before to fix the GUI issue…but this time the lines of code it asks me to replace are not even there (I did a vi to try and edit the code)…and still the GUI does not work.
For fix SynoCommunity’s Debian-Chroot Web GUI on DSM6:
We have to edit file:
/var/packages/debian-chroot/target/app/debian-chroot.js
and change lines, from:
“url”: “3rdparty/debian-chroot/debian-chroot.cgi/direct/router”,
to:
“url”: “/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/router”,
and:
‘url’: ‘3rdparty/debian-chroot/debian-chroot.cgi/direct/poller’,
to:
‘url’: ‘/webman/3rdparty/debian-chroot/debian-chroot.cgi/direct/poller’,
I think I will try one more time tomorrow to uninstall everything and start again. Sometime does not seem to have installed correctly.
One other thing I noticed while installing the code is this line did not work:
rm -r /var/run && rm -r /var/lock && ln -s /run /var/run && ln -s /run/lock /var/lock && rm /run/dbus/*
Specifically the portion: rm /run/dbus/*
Got an error saying this location was not there. I figured it didn’t matter since I thought the rm was to remove, but who knows.
These lines with the && are long lines, make sure you copy the whole line when you select it.
The rm /run/dbus/* error is fine, just means the directory was empty.
If there’s really a problem with the && commands, you could paste them in a word document and enter each command one line at a time
[quote=“asggold, post:28, topic:194071”]------------------------------
root@Synology-White:~# /var/packages/debian-chroot/scripts/start-stop-status start
Debian Chroot is already running
root@Synology-White:~# homebrisge
-ash: homebrisge: command not found
root@Synology-White:~# /var/packages/debian-chroot/scripts/start-stop-status chroot
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
root@Synology-White:/# homebridge
bash: homebridge: command not found
------------------------------[/quote]
If you want to start manually,
The sequence would be /var/packages/debian-chroot/scripts/start-stop-status chroot
Then ./root/.homebridge/run.sh
Also seems like locales not set properly. Probably because one of this && commands didn’t work
Well, I tried EVERYTHING to get even the first line of code to work after installing Chroot and it does not work. Not sure why because I was able to do the fix before but when I put in the first line of code it does nothing.
So, I am trying to uninstall one more time and see if it works directly after reinstall. After that I think I am giving up on this and just running it from another machine.
Unfortunately, no luck. Reran through the ENTIRE thing again and nothing. does not even recognize the “homebridge” command (which tells me something is WAY wrong with the install. I also again noticed that certain lines of code did not do anything when you hit enter. Maybe that is correct but not sure how to check which code works and which doesn’t.
For example: When you get to the end and try and go back into Chroot it says npm command is not found. How is that possible? Something is the code must have deleted npm later because the install worked (or at least looked to) earlier in the script.
Oh Well! Guess I will need to try something else. I looked at Home Assistant too but there seems to be bugs in that install.
Try ./root/.homebridge/run.sh
instead of homebridge. certain variable need to be set.
If you need to use npm again you need to set the environment variable by doing export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
before running node or npm.
I guess I could create an install script to make this whole process easier. Might have time next weekend.
Otherwise your easiest route to get this working for you might be to install and get Docker working on your Mac. The Docker image I’ve created for Synology should work on Mac as well. That’s the nice thing about Docker.
I guess there is no way to install Docker on this Synology drive if it is not showing in the Package list already?
If I do use/install Docker on a Mac, will it run no matter which user is logged into the computer? That is the main reason why I moved it off the Mac was because if I was the one logged on and the computer was not sleeping it ran fine. However, if someone else logged in it stopped running.
Sent from my iPhone using Tapatalk
Actually I’m running a non-package version of Docker on my NAS because I needed the latest version. The only issue is that it installs on the system drive instead of volume1. You’ll be able to run one image but no more than that because of limited space on the system drive . The image I’ve created is Debian based. Perhaps if I created one based on Alpine the footprint on your system drive wouldn’t be so significant.
So, running ./root/.homebridge/run.sh as root in Chroot worked to start Homebridge. Unfortunately I am not at home. So, I can’t test the connection with my iPhone because it needs to connect (I think) before it will work through my Apple TV remotely.
Hopefully this is what the missing key was.
Only question I have now is: How can I use the following script you listed to auto start?
The sequence would be /var/packages/debian-chroot/scripts/start-stop-status chroot
Then ./root/.homebridge/run.sh
Basically wondering if there is a way to build this into the Task Manager or if it will basically just run (as long as the Synology does not reboot) once the above script is run? I just want to make sure this runs directly from the Synology and not dependent on a computer being connected running something in Terminal.
The last part of my instructions creates that script in /volume1/. Then you add that script in task manager to execute at boot-up.
(Had a typo on that last part, just fixed it)
Well, unfortunately it still will not connect to my iPhone. I have rebooted (iPhone and Synology) multiple times, I have tried changing the name and id for the homebridge in the config.json file, but still nothing. I know it is running because it runs when I start in Terminal the same code line I have set to start on boot-up in the Task Scheduler. I am not sure what else could be stopping it from working on my iPhone since I had no problems from a computer. I am on the same network as the Synology. Only difference is that the Synology does not have internal WiFi.
Any ideas? ???