I’ve been using HA for a while, originally via Hassbian. But I had an SD card fail and just reinstalled using Hass.io.
Where has the source code gone?
I SSH in and I cannot find any of the python libraries, component sources in a path such as
/usr/lib/python3.6/site-packages/homeassistant/components/
I cant even do a find for files I know exist.
I want to copy a component to a local custom_components folder to do some hacking.
I am running hassio virtual image in virtualbox. I am logging in with the ssh & webterminal addon (not the straight ssh one). There is a whole lot of stuff under /usr/local/lib/python3.7/site-packages
However on closer inspection it certainly isn’t all of what @jasebob wants. That we be in another container. Probably is easiest to fetch from github.
Yeah I found the packages in the Home Assistant container… not the ssh community addon one… but yeah probably far easier to get them from github. There’s a chrome github addon that lets you select a folder and then you can download the whole folder as a zip file which alleviates the PITA of github downloads for multiple files.
Hmm, not sure if I understand the different container. Can I log into that via a different SSH session? Or maybe just mount something to see it?
The issue is that I may not always be at the latest release, I might want to work with the fileset in my current install. And nothing is easier than cp -a.
Thanks for the help thus far.
I have got into Docker and managed to copy the components I want into custom_components folder. Details are at the bottom of this message for others to follow.
The whole point of this is to allow me to debug the Bose SoundTouch Component which is not very reliable and not being actively maintained. So I copied components/soundtouch and its dependency libsoundtouch to the custom_components folder.
But its not loading, which I base on
I don’t get any message from homeassistant.loader warning me about the custom override
I don’t get any logger.info messages I insert into the copied code
I have another custom component, a fix for velux component by @gibman which is working fine.
I do get the warning message from homeassistant.loader for this
I don’t see anything different about file ownership or permissions compared to the velux component
core-ssh:/config/custom_components# pwd
/config/custom_components
core-ssh:/config/custom_components# ls -l
total 16
drwxr-xr-x 4 root root 4096 May 23 03:55 libsoundtouch
drwxr-xr-x 4 root root 4096 Jun 16 14:41 pyvlx
drwxr-xr-x 3 root root 4096 Jun 16 21:02 soundtouch
drwxr-xr-x 3 root root 4096 Jun 16 14:41 velux
core-ssh:/config/custom_components#
From here I am kind of stumped. Any advice on how to debug this would be appreciated.
Here’s how I copied a released component into custom_components folder. This is specific to Hass.Io.
cp -a /usr/local/lib/python3.7/site-packages/homeassistant/components/soundtouch /config/custom_components/
cp -a /usr/local/lib/python3.7/site-packages/libsoundtouch /config/custom_components/
noting that the only reason for the 2nd copy is that libsoundtouch is a dependancy for the soundtouch component I am interested in playing with.