Giter VIP home page Giter VIP logo

hass-ruuvitag's People

Contributors

akx avatar j-kallunki avatar stude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hass-ruuvitag's Issues

Home Assistant & integration & RuuviTags not properly working after FW upgrade

I upgraded the the FWs of my 6 RuuviTags from version 2.X to 3.31.1.

I'm using Home Assistant on Raspberry Pi 3 Model B Rev 1.2 with external BT dongle (see my previous thread ([https://f.ruuvi.com/t/ruuvitags-in-ha-more-and-more-unstable-with-time/3953]) with https://github.com/akx/hass-ruuvitag/. HA & RuuviTags worked fine until the FW upgrade.

However not the data is not collected after some time, usually after a day or so. Restarting HA isn't enough - I really have to reboot the RPi, i.e., hardware.

Have you any idea what might have caused this (in the FW upgrade) and what should I change to make it work again?

Readings are out of this planet

Thanks for creating the addon for us!
There seems to be some problem with the readings though, any idea why I get these kind of values out from my tags? Altough it is already september, but certainly it is not -104 degrees.
{"dataFormat":3,"rssi":-82,"humidity":7.5,"temperature":-104.61,"pressure":82195,"accelerationX":-8448,"accelerationY":1279,"accelerationZ":-4092,"battery":1199}

Using Hassos, and cloned the repository/installed as addon about 5 days ago.

Enhancement: Movement counter implementation

First big thanks for the add-on, I've been using it successfully with my 3 tags with Hassos.

Would it be possible to add enhanced movement detection capabilities? I am looking at implementation of "movementcounter" capability which I believe is transferred by default in RAW data format?

How add 2nd tag (invalid yaml)

Hi!

Sorry to bother but what is correct procedure to add second ruuvitag? What I have to write to configuration page?

At the moment configuration is:

interval: 30
debug: 0
tags:
  - id: c3c89c0e433b
    name: sauna
    enabled: true
    temperature: true
    pressure: true
    humidity: true
    battery: true
    acceleration: false
    accelerationX: false
    accelerationY: false
    accelerationZ: false

And log is telling me:

To have its status posted to Home Assistant, add the following to the tags configuration:
{"id":"cdc31baa8a4b","name":"some-name","enabled":true,"temperature":true,"pressure":true,"humidity":true,"battery":true,"acceleration":false,"accelerationX":false,"accelerationY":false,"accelerationZ":false}

I've tried this multiple ways but it gives me YAML error every time... Any help?

Cannot find module 'bluetooth-hci-socket' when starting ruuvitag

Hi,
I'm Using hassio Resin OS 2.3.0+rev1, Supervisor 220 and Home-assistant 109.3.
Host is a raspberry pi 3b with usb bluetooth dongle.

Is there any way to get it working? Any help would be appreciated.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
internal/modules/cjs/loader.js:796
throw err;
^
Error: Cannot find module 'bluetooth-hci-socket'
Require stack:

  • /app/node_modules/noble/lib/hci-socket/hci.js
  • /app/node_modules/noble/lib/hci-socket/bindings.js
  • /app/node_modules/noble/lib/resolve-bindings.js
  • /app/node_modules/noble/index.js
  • /app/node_modules/node-ruuvitag/ruuvi.js
  • /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/app/node_modules/noble/lib/hci-socket/hci.js:6:26)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/app/node_modules/noble/lib/hci-socket/hci.js',
    '/app/node_modules/noble/lib/hci-socket/bindings.js',
    '/app/node_modules/noble/lib/resolve-bindings.js',
    '/app/node_modules/noble/index.js',
    '/app/node_modules/node-ruuvitag/ruuvi.js',
    '/app/app.js'
    [cmd] node exited 1
    [cont-finish.d] executing container finish scripts...
    [cont-finish.d] done.
    [s6-finish] waiting for services.
    [s6-finish] sending all processes the TERM signal.

Stopped working

Addon worked just fine for about an hour, then stopped working. Reboot, reinstall, reset settings, no effect. Doesn't log any devices, seems dead.

Meanwhile, the ruuvitag shows up just fine on other devices.

HassOS 3.13

Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
This is hassio-ruuvitag 0.3.0, terrrrrrrve

500 internal server error with hass API with some separators

hass-ruuvitag fails to communicate with homeassistant api if tag name contains - or . or probably some other separators too

Following configuration

  - id: beeefeeeecee
    name: ruuvi.indoor
    enabled: true
    temperature: true
    pressure: true
    humidity: true
    battery: true
    acceleration: false
    accelerationX: false
    accelerationY: false
    accelerationZ: false

Will lead too
tag beeefeeeecee: failed 2 http://hassio/homeassistant/api/states/sensor.ruuvi.indoor_temperature: 500 Internal Server Error

ERR_OUT_OF_RANGE on version 0.3.0

I'm running the newest Hass.io on RPi3. I updated to the version of 0.3.0 couple of days ago and it works.. a while.. and after that it throws an exception ERR_OUT_OF_RANGE. Logs during the exception in the addon are here. I can start it again and it works again.. for a while.. until the same error. This problem wasn't in the previous version.

Add-on error:

internal/buffer.js:72
  throw new ERR_OUT_OF_RANGE(type || 'offset',
  ^
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 5. Received 6
    at boundsError (internal/buffer.js:72:9)
    at Buffer.readUInt16LE (internal/buffer.js:229:5)
    at Gap.onHciLeAdvertisingReport (/app/node_modules/@abandonware/noble/lib/hci-socket/gap.js:149:31)
    at Hci.emit (events.js:210:5)
    at Hci.processLeAdvertisingReport (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:651:10)
    at Hci.processLeMetaEvent (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:608:10)
    at Hci.onSocketData (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:479:12)
    at BluetoothHciSocket.emit (events.js:210:5) {
  code: 'ERR_OUT_OF_RANGE'
}

Tag stays unconfirmed

Tag stays unconfirmed and doesn't appear anywhere in hass.io.
Temperature and humid data is correct at the addon's log so it works allmost.

Home Assistant 0.101.3 / HassOS 2.12

This is hassio-ruuvitag 0.2.0, terrrrrrrve Found tag f3b91326c1b6 Found an unconfigured tag f3b91326c1b6. This will only be shown once per tag. To help you identify this tag, its current information follows. {"dataFormat":3,"rssi":-81,"humidity":34,"temperature":22.78,"pressure":102931,"accelerationX":-19,"accelerationY":46,"accelerationZ":1009,"battery":2953} To have its status posted to Home Assistant, add the following to the tags configuration: {"id":"f3b91326c1b6","name":"some-name","enabled":true,"temperature":true,"pressure":true,"humidity":true,"battery":true,"acceleration":false,"accelerationX":false,"accelerationY":false,"accelerationZ":false}

Problems with re-installing hass-ruuvitag

@akx Due to SD card failure I had to re-install HASS from backup. After that I have had some issues with hass-ruuvitag and now I try to completely remove it and upgrade from 0.2.0 to 0.3.0.

However, I'm stuck with with this after removing old directories from add-ons and git cloning the new:

21-06-05 06:41:42 ERROR (SyncWorker_5) [supervisor.docker.addon] Can't build local/aarch64-addon-ruuvitag:0.2.0: The command '/bin/ash -o pipefail -c apk add --no-cache python build-base yarn git' returned a non-zero code: 1
21-06-05 06:41:42 ERROR (SyncWorker_5) [supervisor.docker.addon] Build log: 
Step 1/22 : ARG BUILD_FROM
Step 2/22 : FROM $BUILD_FROM as build
 ---> b9ff7dc42dac
Step 3/22 : ENV LANG C.UTF-8
 ---> Using cache
 ---> e28112e8b740
Step 4/22 : RUN apk add --no-cache nodejs libusb-dev bluez-dev linux-headers eudev-dev
 ---> Using cache
 ---> 26a0b41d0ea8
Step 5/22 : RUN apk add --no-cache python build-base yarn git
 ---> Running in 6f88a6bf6ee2
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/APKINDEX.tar.gz
ERROR: unable to select packages:

  python (no such package):
    required by: world[python]
Removing intermediate container 6f88a6bf6ee2

21-06-05 06:41:55 ERROR (SyncWorker_1) [supervisor.docker] Image local/aarch64-addon-ruuvitag not exists for addon_local_ruuvitag
21-06-05 06:41:55 ERROR (MainThread) [supervisor.utils] Can't execute run while a task is in progress

Smarter acceleration sensing

For "door guard" etc. purposes, it would be nice if the acceleration sensing was smarter.

Namely:

  • It should be able to eliminate the gravity term from the acceleration.
    This can be done simply with a rolling average; basically, over the last 20 or whatever observations, figure out what the static acceleration of the tag is (like gravityX = (gravityX * 20 + accelX) / (20 + 1), or whatever smoothing term you want to use instead of 20), then subtract that from the actual observations.
  • It should be able to sum up these acceleration terms even during interval, and then post the summed-up "motion since we last spoke" value(s).

Naturally, all this should be configurable, because knobs and sliders ๐Ÿค“

Can't start in Hass.io

After cloning the package to Hass.IO it installs fine, but then fails to start, giving the following error:

internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/app/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Error while trying to install

Hi,

I copied files and to /addons -folder and Ruuvitag shows ok as Local Add-on. But when I'm trying to install, I get error:
ERROR (SyncWorker_4) [supervisor.docker.addon] Can't build local/armv7-addon-ruuvitag:0.3.0: The command '/bin/ash -o pipefail -c apk add --no-cache python build-base yarn git' returned a non-zero code: 1

I'm using Home Assistant 0.112.4 & HassOS 4.11 on Raspberry Pi4 B 4GB.

"Incorrect" unit of measurement in Home Assistant

Home Assistant wants to have unit_of_measurement as "ยฐC". hass-ruuvitag provides it as "C". It does work but Homekit integration doesn't show correct temperature with "C" as unit of measurement.

Supervisor assisted addon installation fails

Installation fails with following error when trying to isntall thru supervisor -> add-on store -> Ruuvitag -> Install

hassio-supervisor[14820]: 20-06-19 19:11:23 ERROR (SyncWorker_3) [supervisor.docker.addon] Can't build local/armv7-addon-hello_world:1: The command '/bin/ash -o pipefail -c apk add --no-cache python build-base yarn git' returned a non-zero code: 1

Not sure exactly what's wrong here as command looks ok and shouldn't return 1. However I lack knowledge to debug hassio to get more verbose output whats the issue here so.. Good ideas welcome

Running on raspi3

  • homeassistant/armv7-hassio-supervisor 227
  • homeassistant/raspberrypi3-homeassistant 0.111.4

Impossible battery readings

I some weird battery readings/peaks from 2 of my 3 Ruuvitags. E.g. there is a 47-volt peak and couple of ~6.5-volt peaks. Since this can't be happening is there something in the software causing this?

pressure not showing right.

After a while the pressure in history graph shows wrong. Drops the values below 0.
I checked the ruuvidriver, which seems to show values fine. Might be issue with this hass-ruuvitag or with the home-assistant itself. Seems like it converts values to decimals or something, because the actual values are close to 996hPa in ruuvi station app and they are shown as 9.96 in the graph. Really odd, because it worked just fine at start.

I think I did reset the ruuvitag in livingroom, which made the value drop. Others dropped earlier on their own. Or it maybe something to do with changing the raw format to url format and back-and-forth.

Using version 0.3.0.

Screenshot 2020-02-24 at 22 24 45
Screenshot 2020-02-24 at 22 25 20

Ruuvitag sensor do not have entity id?

Sorry... maybe this is not a right place to ask but have to start somewhere...

First, thx for this addo, because with this I was able to get my ruuvitags working wit Hassio. Now I have a problem because sensor do not have id. For example my sauna.temperature do not have entity id.

This is only my lucky guess but I believe this is a reason that I cannot populate influxdb with ruuvitags data from Hassio. Can you help or show me "correct path"?

Ruuvitags in HA have become more and more unstable

I have Hass.io running on RPi3 and I have always updated to newest releases. The addon is version 0.2.0.

With time, Ruuvitags have become more and more unstable - they lose connection once or twice a day (last reading at some time point and no new readings after that). Cure for this is usually restarting addon or rebooting hass.io. In addon log I have e.g.:

noble warning: unknown handle 1196 disconnected!
noble warning: unknown handle 1205 disconnected!
noble warning: unknown handle 1191 disconnected!

but have also got Bad gateway 502 notifications.

Also, the readings have started getting more and more spikes in them.

Do you have any idea why this is happening and what might help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.