Dear all,
I would like to use R (and if possible even RStudio) as add on in Home Assistant. R is a statistical programming language (open source) that is broadly used by social science researchers, but also in other academic communities More on R. RStudio is a popular GUI to work with R.
I hope it should be possible to get R working as add on in Home Assistant, at least for me it would be a super helpful tool to do more advanced computational stuff and existing R libraries would speed up my home automations. I guess I am not the only one.
In fact, I am able to run an example docker file that installs R with the following code as add-on (this is my first add-on ever, so my apologies if I did something stupid). Nevertheless, at least, I don’t see any errors in the add-on logs.
RUN \
apk add --no-cache \
R
To test R, I tried the following run.sh
script
#!/usr/bin/with-contenv bashio
Rscript test.R
This test.R
simply has the following code.
print(“hello world”)
Unfortunately, in the logs of the add-on, I get an error No such file or directory
. I changed the path to /Volumes/addons/hello_world/test.R
, but without succes.
What should be the correct address for this path?
Maybe, there should be another way to install R, or maybe there is an add on already out there? (And yes, if R works, I need to find a way to get the results from rscripts back into home assistant.