#I guess a better question would be how
1 messages · Page 1 of 1 (latest)
Same as every other container - volumes/bind mounts
https://jupyter-docker-stacks.readthedocs.io/en/latest/ and other results from Google
I'll give a look. To be honest, I run everything in Docker but I'm on a pretty basic level of understanding. With this, I understand that I want the notebook to interact with HASS so that I can try things out with py-script before I start writing it in python. I'm confident that the notebook approach will help get a better idea on how to do things but it's the set up that's the 'problem'
At the moment, I have HASS in one container and jupyter notebook running in another container. I'm trying to figure out how to get notebook to be able to run code that interacts with HASS or is running in that environment.
You know that add-ons are just containers too?
From https://data.home-assistant.io/docs/quick-start-core#launch-jupyterlab it appears that it uses HA's database, so all you have to do is mount HA's config folder in Jupyter - ideally read only
https://docs.docker.com/guides/use-case/jupyter/#use-compose-to-run-your-container (found from a quick Google)
jupyter:
build:
context: .
ports:
- 8889:8888
volumes:
- /pat/to/jupyter/config:/home/jovyan/work
- /path/to/HA/config:/homeassistant
command: start-notebook.py --NotebookApp.token='my-token'
I do, but when I looked at them previously they seemed to have some differences that I wasn't able to translate to plain docker. Again, I am a novice so maybe it is easy. This would be handy but for the most part it is usually easy to find a docker config for many of them
Thanks for providing this. I'll give it a go. I am still unsure how this interacts with the HA system but certainly in no position to question.
Well... it appears to just read the database file, based on the links you posted, but I'm no #analytics-archived expert
I think I'm going to just take the normal route and modify the python script and debug rather than continue to spend time trying to get notebook running. I may spin up a VM of HASSOS so I can use the addon later. I guess that's just one of the downsides of using container HA.