Closed ValiEne closed 3 years ago
Yeah, unintentionally docker instructions came to the readme earlier than expected. Anyway now it should work:
docker run --rm --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket corvis/prana-rc:0.3.5 --help
Also, I've updated readme section. Notice the last component of the command --help
you could replace it with any other cli command.
Nope, it doesn't work: _root@raspberrypi4:~# docker run --rm --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket corvis/prana-rc:0.3.5 --help standard_init_linux.go:211: exec user process caused "exec format error"_
The Docker Image is saved: root@raspberrypi4:~# docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE corvis/prana-rc 0.3.5 5e1668fc511f 3 hours ago 1.01GB
I see. This is because of different architecture. You use raspberry on arm chip while the image is for x86. I'll add arm image soon and will let you know
Aha, ok, thanks a lot π
Ok, building multi-platform docker images is more tricky then I expected. Anyway it seems like I've managed to build images for armv6 and armv7 so I hope now it should work on RPI. As I haven't raspberry at the moment and can't test could you please check this for me:
docker run --rm --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket corvis/prana-rc:alpha --help
Notice alpha
tag it is imprortant as at the moment I pushed arm images exclusively under this tag.
Thanks a lot, it works like a charm on my RPi4. Now I need to find how to make the HTTP page working, now, after running prana http-server, I get this output in browser:
That's because there are no any http pages here. The mentioned http-server
exposes api to make it easy programmatic communication (I started to work on Home Assistant integration finally). So it's not for humans :)
I just added a section which describes how to use api.
Shortly, you could now query your RPi from the laptop like this:
curl \
-X POST \
-H "Accept: application/json" \
http://YOUR_IP:8881/ \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "prana.get_state", "params": {"address": "XX:XX:XX:XX:XX:XX"} }'
Hey @ValiEne if this is still relevant you could check HomeAssistant integration https://github.com/corvis/homeassistant_prana Try to follow the readme instructions and feel free to raise an issue if it doesn't work.
Thanks @corvis, for the moment I switched to HASSOS on a Rpi4 and I have no clue how can I install prana-rc on this OS.
Oh I see. No worries. Just in case so far as I'm concerned the there is a Portainer Addon for HASSOS. Portainer is a simple GUI to manage any docker container (UI alternative to docker-compose). So with this addon you should be able to run any docker image including prana RC.
Oh I see. No worries. Just in case so far as I'm concerned the there is a Portainer Addon for HASSOS. Portainer is a simple GUI to manage any docker container (UI alternative to docker-compose). So with this addon you should be able to run any docker image including prana RC.
Can you help please with instructions for installing prana-rc from HassOS Portainer. I tried to install container from GUI and got the following error. Hardware- RasPi 4
I'm trying to run "docker run --rm prana-rc:latest -d --network=host --restart=unless-stopped" and I get an error. The same error when trying to only pull the image using "docker pull prana-rc" or "docker pull prana-rc:0.3.4" The error: "pull access denied for prana-rc, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"