-
Notifications
You must be signed in to change notification settings - Fork 7
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
upgrade to home assistant 0.100.1 sensor #2
Conversation
Current state: It loads in hassio 0.100.1 version, but unfortunately the bluetooth reading does not seem to work yet. I see the following error in
@pschumi @JonasR- @salleq @peltsippi @ykii if you know how to help fix this, please let me know. Giving up for tonight. Can it be some kind of bluetooth permission problem that needs to be fixed? |
Hello,
I am bit busy right now but when I have time I can see if I can get it
working or figure something out. Had some issues with my HA and currently
there is no data collection from ruuvitags but it would help me also to get
it working pretty soon.
Timo
…On Sat, 12 Oct 2019 at 23:06, PieterGit ***@***.***> wrote:
Current state: It loads in hassio 0.100.1 version, but unfortunately the
bluetooth reading does not seem to work yet. I see the following error in
/config/home-assistant.log
2019-10-12 22:02:15 ERROR (SyncWorker_0) [custom_components.ruuvi_hass.sensor] E
rror on polling sensors
Traceback (most recent call last):
File "/config/custom_components/ruuvi_hass/sensor.py", line 88, in poll
self.conditions = self.RuuviTagSensor.get_data_for_sensors(self.mac_addresse
s, self.timeout)
File "/usr/local/lib/python3.7/site-packages/ruuvitag_sensor/ruuvi.py", line 9
3, in get_data_for_sensors
for new_data in RuuviTagSensor._get_ruuvitag_datas(macs, search_duratio_sec,
bt_device=bt_device):
File "/usr/local/lib/python3.7/site-packages/ruuvitag_sensor/ruuvi.py", line 1
34, in _get_ruuvitag_datas
for ble_data in data_iter:
File "/usr/local/lib/python3.7/site-packages/ruuvitag_sensor/ble_communication
.py", line 110, in get_datas
procs = BleCommunicationNix.start(bt_device)
File "/usr/local/lib/python3.7/site-packages/ruuvitag_sensor/ble_communication
.py", line 76, in start
exit(1)
File "/usr/local/lib/python3.7/_sitebuiltins.py", line 26, in __call__
raise SystemExit(code)
SystemExit: 1
@JonasR- <https://github.com/JonasR-> @salleq <https://github.com/salleq>
@peltsippi <https://github.com/peltsippi> @ykii <https://github.com/ykii>
if you know how to help fix this, please let me know. Giving up for
tonight. Can it be some kind of bluetooth permission problem that needs to
be fixed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/JonasR-/ruuvi_hass/pull/2?email_source=notifications&email_token=AJBOVLZEJXJQAFW5UBLW5MDQOIU4RA5CNFSM4JAD6IA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCHKJQ#issuecomment-541357350>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJBOVL3WNQYRW7CKMV7WPZ3QOIU4RANCNFSM4JAD6IAQ>
.
|
Just got my homeassistant running and this branch seems to run perfectly. Something I dug from my original hass installation notes: And make hcitool runnable with non-root users using lib2cap-bin. Not sure if this is it because hcitool seems to be running with sudo in my homeassistant log. But worth trying out. https://unix.stackexchange.com/questions/96106/bluetooth-le-scan-as-non-root There is comment about LE scan requiring root privilege by default |
Hey guys, thanks for the work done and sorry for my absence. |
It seems that my config cannot handle Hass restarts. Or then it just stops working otherwise after a while. Probably something to do with hcitool. I'll try to figure out what goes south. |
My config works for 1-2 days, but then suddenly it stops receiving data from ruuvitag. I haven't had enough time to look into it yet. Cronjob for daily restart in the night time has resolved the issue easy enough. |
It seems that now I can't reproduce my issue anymore. Restarting Hass does not break the plugin at the moment. I jumped to new raspbian distro yesterday to get rid of hass openssl issue, otherwise everything is intact. |
Looks like i also get data. I will watch it for a few days as @ykii had some problems over time |
Here is something I dug from the logs: Syslog
Kern.log seems to be filled with And auth.log: So it seems to suggest hcidump and/or hw not working as supposed to. |
@PieterGit any updates on your bluetooth permission problem? |
This issue might be involved in homeassistant core / similar instead. I added automation to export all temperatures every 15 minutes to text file and reading ruuvitags froze 6-10 hours after fresh reboot. I disabled the automation and now everything seems to work perfectly again with reboot every 24 hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got this working with 5 ruuvitags pretty much reliably with rpi3+ by doing following modification in sensor.py (new value 60, was 10) :
MAX_POLL_INTERVAL = 60 # in seconds, was 10
So IMHO this should be ready to be approved with that modification. Further development idea: calculate MAX_POLL_INTERVAL based on amount of sensors total. Easiest formula for testing could be for example 10 secs per one sensor defined.
I was just too hasty, see updated readme and version that works for me at https://github.com/peltsippi/ruuvi-hass There already were variables available for all kinds of customizations, they just were not documented anywhere. |
Have been doing tests and no luck with longer poll intervals. Works 90% of the time just fine for 24+hrs but sometimes freezes after couple hours. Currently I am testing python version used in other pull request. |
Closed in favor of #3 |
Work in progress...
I'm trying to get this module into shape to run with latest home assistant.
If it works I would like to work on seeing if it can be integrated with the default components.
@JonasR- @salleq @peltsippi Are you interested to help with this effort?