The SynoCommunity has released a current version of HomeAssistant Core for Synology. Yves Martin put together a framework that seems to allow any version of HomeAssistant to be compiled into a .spk file ready to install on a Synology SAN server. HomeAssistant Core makes sense for folks with Synology SAN Servers that are not capable of running Docker or who don’t wish to run Docker on a San Server.
The SynoCommunity does not put out updates to packages at the same frequency as the HomeAssistant developers. Currently the HomeAssistant 0.114.2 package is available. My goal was to find a way to create an installable .spkr file at any level I desire. Further I can pick what Python modules my system needs as compiled wheels. FAQ-HomeAssistant
I did some testing with 0.114.4 and 0.115.0b8. HomeAssistant worked as a proof of concept. There certainly is no need to install every minor version if things are working well, but compiling will allow the user to pick their version of choice on the Synology.
I decided to use the Docker version of spksrc cross compilation framework to compile and package software for Synology NAS devices.
First get the current source files: git clone https://github.com/SynoCommunity/spksrc.git
Update Homeassistant version and wheel components: vi spksrc/spk/homeassistant/src/requirements.txt
Update version to match version selected in requirements.txt: vi spksrc/spk/homeassistant/Makefile
Linux Docker:
docker run -it --rm -v ~/spksrc:/spksrc -w /spksrc synocommunity/spksrc:latest /bin/bash
make setup cd spk/homeassistant make arch-armadaxp
The make setup defaults to DSM 6.1 which is a reasonable minimum level. My DS414 is an armadxp architecture. Replace armadaxp with the model for your Synology: Synology Models You can also see the list of supported architectures listed in spksrc/toolchains
If everything was successful, the package will be in spksrc/packages
Install that package on your Synology from the Package Center Manual Install button.
This is promising! I’m really looking forward for it to work, since my Synology NAS is Docker incompatible.
But… for now I’m stuck on running docker command posted by you and on spksrc GIT. The output I get is as follows:
pi@raspberrypi:~ $ docker run -it -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash
standard_init_linux.go:211: exec user process caused "exec format error"
As you can see I run it on RPi. Versions are as follows:
I’m quite new to docker, so I’d be more then welcome if you could point me in the right direction with this. Tried to look for solution on stackoverflow, etc. but with no success…
SPK I’m trying to make will be for DS216play (monaco) which fortunately is listed in Synology Models and spksrc/toolchains.
Updating the requirements.txt file for each new version of Home Assistant Core was not obvious to me. There may be some ‘trial and error’ to find all the python packages needed.
To update spksrc:
cd spksrc
git pull
Many packages are commented out in the requirements.txt file. I uncomment packages that I am using which include skybell and konnected for my hardware.
In the FAQ HomeAssistant, Yves Martin suggests checking error messages about packages that need to be upgraded in /var/packages/homeassistant/target/var/homeassistant.log He also has a process to submit packages to be included in the next release. As of today, proposed changes to HomeAssistant are: https://github.com/SynoCommunity/spksrc/pull/4149/files
To see the changes by date select History on each page. If a requirement has been updated since the file was last edited, update the package level to meet the requirements of that core level.
Ok, some progress here. Docker up and running on almost-Debian. I say “almost” because it is running as a “Linux on Windows (WSL2)” with Docker attached to it.
But back to topic - I have problem with setting up toolchain. Tried for DSM-6.1, DSM-6.2, DMS-6.2.2 and the output for all of them is exactly the same.
DSM-6.1
root@40895e28474b:/spksrc# make setup
Setting default toolchain version to DSM-6.1
root@40895e28474b:/spksrc# cd spk/homeassistant/
root@40895e28474b:/spksrc/spk/homeassistant# make arch-monaco
===> Building package for arch monaco
make[1]: Entering directory '/spksrc/spk/homeassistant'
===> Set up toolchain
===> Downloading files for syno-monaco
inux%203.10.102/monaco-gcc493_glibc220_hard-GPL.txz
2020-09-24 14:52:50 URL:https://master.dl.sourceforge.net/project/dsgpl/Tool%20Chain/DSM%206.1%20Tool%20Chains/STMicroelectronics%20Monaco%20Linux%203.10.102/monaco-gcc493_glibc220_hard-GPL.txz [42375044/42375044] -> "monaco-gcc493_glibc220_hard-GPL.txz.part" [2]
===> Verifying files for syno-monaco
===> Checking sha1sum of file monaco-gcc493_glibc220_hard-GPL.txz
sha1sum: 'standard input': no properly formatted SHA1 checksum lines found
===> Wrong sha1sum for file monaco-gcc493_glibc220_hard-GPL.txz
===> Renamed as monaco-gcc493_glibc220_hard-GPL.txz.wrong
===> Download cookie removed to trigger the download again
make[2]: *** [../../mk/spksrc.checksum.mk:42: checksum_target] Error 1
/spksrc/spk/homeassistant/work-monaco-6.1/tc_vars.mk:1: *** An error occured while setting up the toolchain, please check the messages above. Stop.
make[1]: Leaving directory '/spksrc/spk/homeassistant'
make: [../../mk/spksrc.spk.mk:436: arch-monaco] Error 2 (ignored)
DSM-6.2
root@a783f9dc769a:/spksrc# make setup
Setting default toolchain version to DSM-6.2
root@a783f9dc769a:/spksrc# cd spk/homeassistant/
root@a783f9dc769a:/spksrc/spk/homeassistant# make arch-monaco
===> Building package for arch monaco
make[1]: Entering directory '/spksrc/spk/homeassistant'
===> Set up toolchain
===> Downloading files for syno-monaco
wget https://sourceforge.net/projects/dsgpl/files/Tool%20Chain/DSM%206.2%20Tool%20Chains/STMicroelectronics%20Monaco%20Linux%203.10.102/monaco-gcc493_glibc220_hard-GPL.txz
2020-09-24 15:15:15 URL:https://master.dl.sourceforge.net/project/dsgpl/Tool%20Chain/DSM%206.2%20Tool%20Chains/STMicroelectronics%20Monaco%20Linux%203.10.102/monaco-gcc493_glibc220_hard-GPL.txz [42219044/42219044] -> "monaco-gcc493_glibc220_hard-GPL.txz.part" [2]
===> Verifying files for syno-monaco
===> Checking sha1sum of file monaco-gcc493_glibc220_hard-GPL.txz
sha1sum: 'standard input': no properly formatted SHA1 checksum lines found
===> Wrong sha1sum for file monaco-gcc493_glibc220_hard-GPL.txz
===> Renamed as monaco-gcc493_glibc220_hard-GPL.txz.wrong
===> Download cookie removed to trigger the download again
make[2]: *** [../../mk/spksrc.checksum.mk:42: checksum_target] Error 1
/spksrc/spk/homeassistant/work-monaco-6.2/tc_vars.mk:1: *** An error occured while setting up the toolchain, please check the messages above. Stop.
make[1]: Leaving directory '/spksrc/spk/homeassistant'
make: [../../mk/spksrc.spk.mk:436: arch-monaco] Error 2 (ignored)
DMS-6.2.2
root@a783f9dc769a:/spksrc# make setup
Setting default toolchain version to DSM-6.2.2
root@a783f9dc769a:/spksrc# cd spk/homeassistant/
root@a783f9dc769a:/spksrc/spk/homeassistant# make arch-monaco
===> Building package for arch monaco
make[1]: Entering directory '/spksrc/spk/homeassistant'
===> Set up toolchain
===> Downloading files for syno-monaco
wget https://sourceforge.net/projects/dsgpl/files/Tool%20Chain/DSM%206.2.2%20Tool%20Chains/STMicroelectronics%20Monaco%20Linux%203.10.105/monaco-gcc493_glibc220_hard-GPL.txz
2020-09-24 15:32:12 URL:https://master.dl.sourceforge.net/project/dsgpl/Tool%20Chain/DSM%206.2.2%20Tool%20Chains/STMicroelectronics%20Monaco%20Linux%203.10.105/monaco-gcc493_glibc220_hard-GPL.txz [42227184/42227184] -> "monaco-gcc493_glibc220_hard-GPL.txz.part" [2]
===> Verifying files for syno-monaco
===> Checking sha1sum of file monaco-gcc493_glibc220_hard-GPL.txz
sha1sum: 'standard input': no properly formatted SHA1 checksum lines found
===> Wrong sha1sum for file monaco-gcc493_glibc220_hard-GPL.txz
===> Renamed as monaco-gcc493_glibc220_hard-GPL.txz.wrong
===> Download cookie removed to trigger the download again
make[2]: *** [../../mk/spksrc.checksum.mk:42: checksum_target] Error 1
/spksrc/spk/homeassistant/work-monaco-6.2.2/tc_vars.mk:1: *** An error occured while setting up the toolchain, please check the messages above. Stop.
make[1]: Leaving directory '/spksrc/spk/homeassistant'
make: [../../mk/spksrc.spk.mk:436: arch-monaco] Error 2 (ignored)
I’ll try to get proper installation of Debian working on some unused computer, but I’m not so sure “Linux on Windows” is the issue here.
The first post in this thread originally had documentation on using Windows WSL2 Docker. I removed any reference to Windows since I could not solve some problems.
The most important thing with Windows is to make sure every file is in Linux format. That’s probably the root of issues with spksrc on Windows. I suggest you delete spksrc directory and then git it again without crlf at the end of each line. Make sure you use an editor that does not add crlf. Windows notepad will leave files in Unix format. My favorite is notepad++.
If you still have checksum errors, perhaps the spksrc needs an update. Compare the checksums of the downloaded file to the contents of /spksrc/toolchains/syno-monaco-6.1/digests
This cross compile method will not be useful much longer. Then we must wait until the SynoCommunity releases Python 3.8 support. The release notes for 0.116 state: Python 3.9 has been released on 5 October. This means that Python 3.7 support is now deprecated and will be removed after two months (which will be effective in 0.118).
I have just installed the Core on my Synology DSM7. And i can see that the version is 2021. Is it not possible to use and update functionality inside the HA system as i normally would do when installed on an RPI?
That’s not supported (or recommended) method of running HA.
For Core, on Synology, only “supported” method is running it in Docker.
All updates for spk versions have to be done by maintainer of that package.
Yes, you answered it correctly - it’s supported by SynoCommunity, not Home Assistant devs
There are 2 main supported installation types:
Home Assistant Operating System: Minimal Operating System optimized to power Home Assistant. It comes with Supervisor to manage Home Assistant Core and Add-ons. Recommended installation method.
Home Assistant Container: Standalone container-based installation of Home Assistant Core (e.g. Docker).
And also 2 alternatives that are for experienced users that can fix and tinker with issues by themselves.
Home Assistant Supervised: Manual installation of the Supervisor.
Home Assistant Core: Manual installation using Python virtual environment.
SPK is alternative to last one - so it’s not officially supported. You can use it - if it works great, if there are issues, you are on your own (or help from very limited number of users that are maybe using same type of install).
I did test that or similar SPK some time ago (and various ones that were available in last few years) - when they work, they work (sometimes with some limitation in regard to integration or two.
But they don’t get updated very often.