-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use it in a docker? #1
Comments
Generally it should work from the docker but I didn't tried yet. It relies on D-Bus underneath so as long as you can share D-Bus of the host with container it should work. Anyway it is not ready yet. I started to work on this a few days ago and so far just implemented command line interface and the a few basic commands like set speed turn on\off heating etc. The plan is to complete implementation Prana API and then wrap everything into Home Assistant module. Home Assistant module will be in a separate repo here: https://github.com/corvis/homeassistant_prana (so far it's empty). You could subscribe to watch updates as I have pretty simmilar configuration to what you have - home assistant into docker, prana 150. |
I tried to install (pip) but there is always some syntax error. Traceback (most recent call last): |
Try newer version of python. The syntax in the line 67 is not
compatible with 3.5.
…On Wed, Jun 10, 2020 at 3:50 PM cyberfly79 ***@***.***> wrote:
I tried to install (pip) but there is always some syntax error.
Traceback (most recent call last):
File "/usr/local/bin/prana", line 11, in
load_entry_point('prana-rc==0.2.0', 'console_scripts', 'prana')()
File "/usr/lib/python3/dist-packages/pkg_resources/*init*.py", line 561,
in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/*init*.py", line 2631,
in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/*init*.py", line 2291,
in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/*init*.py", line 2297,
in resolve
module = *import*(self.module_name, fromlist=['*name*'], level=0)
File "/usr/lib/python3.5/prana_rc/*init*.py", line 27, in
from prana_rc import cli
File "/usr/lib/python3.5/prana_rc/cli.py", line 22, in
from prana_rc.cli_utils import CliExtension, register_global_arguments,
CLI, parse_bool_val, parse_speed_str
File "/usr/lib/python3.5/prana_rc/cli_utils.py", line 22, in
from prana_rc.entity import Speed
File "/usr/lib/python3.5/prana_rc/entity.py", line 67
address: str
^
SyntaxError: invalid syntax
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKVUD6H5244IX2WWSYIMK3RV56R7ANCNFSM4MG64TMA>
.
--
Yours sincerely,
Dmitry Berezovsky
|
Hi guys, hope you don't mind if I'm asking here: any updates on this? I'm in the same situation: Prana 150, an outside PM monitoring station and an indoor air quality sensor. I would love to integrate them all in HA and create some automations. Thanks |
Hey everyone, Unfortunately I still haven't build HA integration piece. At the same time the code in this repository seems to work fine, it gives you CLI interface so you should be able to implement very simplistic automation just by calling executable with corresponding parameters. As for the docker - I briefly tested this and it seems to work just fine IF you run container in |
Thanks Dmitri for your quick reply. Can't wait for HA integration :). Meanwhile I'll install a raspbian on my Pi and I'll try to understand how to run the python script. If you need any help in testing please let me know |
Guys, I know it might sound stupid but ... how can I run these scripts? With pip? |
Hey @ValiEne You don't need to download anything from github.
A couple notes:
|
Thanks Dmitri, sorry for being so dumb :)) _pi@raspberrypi:~ $ sudo python3 --version
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3L4xMT/prana-rc/_ |
The bluetooth looks to work fine: |
Could you please ensure you use pip from the python 3 installation, not python 2.most likely you have both. Try to remove package first sudo pip uninstall prana-rc And then install using pip3: sudo pip3 install prana-rc The error you posted means the python interpreter which is in use doesn't support modern syntax which makes me think this is an installation issue. |
Thanks Dmitri, |
Hmm, it looks like your prana device broadcasts it's name in a slightly different format... Could you please try the following:
if this works then
I'm very curious to see if it will work, please keep me posted. If both of the commands work it would be fantastic if you test the rest of the features and report results here so we know if protocol is still compatible... By the way when did you bought your device? |
Hi Dmitri, pi@raspberrypi:~ $ sudo prana -d 00:A0:50:00:00:03 set -s 1 |
I see... May I ask you to play a bit more with it to figure out what works, what doesn't work? We need to figure out:
Thank you for your help, |
Aside note. Reconnection attempts might be related to this issue in underlying libraries: hbldh/bleak#239 |
I've tried reseting both RaspPi and Prana, same results. pi@raspberrypi:~ $ sudo prana -v -d 00:A0:50:00:00:03 set -s off
|
I found a good home assistant component that has been working almost perfectly for 1 month now. You can find it here: https://github.com/alextud/ha-prana |
Thanks @cyberfly79 if it really works well then it might be a solution for most of the users, not for me unfortunately as it must run on the HomeAssistent server (it uses local bluetooth module) and in my case HASS and Prana are too far so I'm going to build HASS integration capable to use remote node to control prana. @ValiEne recently I published updated version 0.2.1 which might resolve failed connection issues. If you still could check I'll be greatfull. in order to upgrade run |
Yes, unfortunately the server is far away for me too. I put a raspberry pi near it that also has the home assistant on it. The server takes over from the slave: https://github.com/lukas-hetzenecker/home-assistant-remote |
Didn't know about remote home assistant! Anyway I prefer to avoid runing multiple HASSes. My idea is to a) extend the conde in this repo to expose Websocket interface b) implement HASS plugin which could use either local BLE module or connect via websocket to the remote device (I have a few orange PI zeros). As my remote hardware is not that performant I'd like to deploy somethign super-lightweight and stateless. |
@cyberfly79 I've tried the component you've pointed: it didn't worked for me: it works from time to time but it was totally unreliable - most of the times I was unable to set the speed etc |
@ValiEne I'll be grateful if you could confirm or refute if the latest version resolves reliability issues. Please see instructions in the message above. |
@corvis the latest version works perfect! All the commands are working as expected and only once I got a connection retry. |
I mean: I know that I can run a remote ssh command on Raspbian but how can I get the status of the fan? |
I'm in the same situation with you @corvis, I need to run the prana app on a remote machine as my main HA instance runs on my Synology NAS, so no bluetooth on HA |
Great to hear the new version works more stable. Not sure I've got the question... Assuming you'd like to invoke this from HASS you might want to try https://www.home-assistant.io/integrations/sensor.command_line and put ssh command here. If the question is how to parse the output of status command - you could try to pipe output from stderr/stdout to some tools like awk or sed. What I can do for you relatively quickly and easily is to extend the CLI tool to return status in JSON so you could pass it directly to HASS sensor like in this example: Again this is a temporary solution - the proper one I'm going to implement I described above... but can't promise it will be soon enough. |
It would be great if you could implement the json workaround until you have enough spare time to make it work directly in HA. Thanks for your time |
Implemented in version 0.2.2. Added global option Also, not it should output state into stdout and the rest e.g. error messages and status notifications into stderr which should make parsing more straightforward. Please note, I don't have access to prana device today so can't check it in real conditions but as the implementation is simple I hope it will work... pls let me know |
Nope, it doesn't work:
|
ugh :( try 0.2.3 please |
It looks good now:
|
Closing the issue as this thread became a bit unrelated to the topic. Anyway docker support is now implemented and described in the readme section |
I use the Home-Assistant in a docker. I have a prana 150 recuperator, and I would like to query it and use it from my system. Can you upload to the docker hub system?
Thanks
The text was updated successfully, but these errors were encountered: