Ruuvi tag fisicalweb LE tags

Hi,

Anyone try this integrated in HA?

https://ruuvitag.com

Find this but i’m unable to put in work mode

I started working on this here https://github.com/slagerfin/home-assistant/tree/ruuvitag-sensor

1 Like

Great :smiley:

hi slagerfin,

im try to config the ruuvi and can you give me and example configuration.yaml entry please

I have try :

Ruuvi Sensor

  • platform: ruuvitag
    sensors: discover
    #name: “Quarto Ruuvi2”
    #mac: ‘FD:15:AA:B0:EB:81’
    but didn’t work

thanks

Just created quick plugin for RuuviTag that should work as well ass ruuvitag_sensor plugin works. Just install to .homeassistant/custom_components/sensor/, configure and enjoy…Could be prettier but works fine.

2 Likes

can you share the yaml example please?

Currently it’s on the python file comments but anyway looks like this:

sensor:

  • platform: ruuvitag
    beacons:
    living_room:
    mac: “AA:BB:CC:DD:EE:FF”

Thanks, I gone give a try.

Hi, i get this error

File “/config/custom_components/sensor/ruuvitag.py”, line 101
_LOGGER.error("Error in config parameter %s: Must be exactly %d
^
SyntaxError: EOL while scanning string literal

any idea?

Sounds like yaml tab/spacing or “dos2unix” problem?

Now, It is possible to flash Ruuvi to use it as Beacon with HA, but would be good to have a component that integrates main features and sensors out of the box without need to flash.

Do I need to connect Ruuvi tags to HA via Bluetooth? Can I do this by WIFI too?

Bluetooth of my HA machine could be too weak to reach Ruuvi tags.

RuuviTags do not have WiFi. I’m going to use an ESP32 to scan the tags with BLE and then send the data to Home Assistant over its WiFi when I receive that…Hopefully with esphome at some point - I want to have the same ESP scanning the tags and a Mi Flora. But…I’m waiting for my ESP32 to arrive.

In the meanwhile, I’ve been using my NUC’s BT to scan the tags and boy have I got issues with it. First TL:DR:Home Assistant’s Stream component is messing around with @pschumi 's RuuviTag integration.

Not enough long, did read:
I’ve been banging my head against the wall for around three weeks with this. I got my first RuuviTags and decided to get an ESP32 to do the scanning and providing HA with data, since there are Arduino sketches available for that (sending data to Influx DB which HA can then use).

First it seemed I had issues with BT on my NUC - maybe normal BT device tracker scanner and BTLE scanner colliding. Mostly it started working around after 10 minutes since HA restart - and at some point it stopped working.

I tried to scour the ttu’s .py files with the minimal Python knowledge I have, but nothing seemed to help. Funny thing was that running the ttu’s .py scanner inside the same dockerized HA shell worked while from HA itself I only got this:

2019-07-11 21:58:02 INFO (Thread-6) [ruuvitag_sensor.ble_communication] Start receiving broadcasts (device hci0)
2019-07-11 21:58:03 INFO (Thread-6) [ruuvitag_sensor.ble_communication] End Of File (EOF). Exception style platform.
2019-07-11 21:58:03 INFO (Thread-6) [ruuvitag_sensor.ble_communication] Stop receiving broadcasts

Okay, so my setup is a NUC with Ubuntu, having HA and other stuff in dockers - HA docker image doesn’t come with sudo or hcidump so those have to be installed each time the docker is recreated (sudo because it’s faster to install than omitting the sudo commands from the ruuvitag .py files which are used for hcitool and hcidump). Also I’ve had to manually install ruuvitag-sensor to the docker - it doesn’t autoinstall from just using pschumi’s integration) I think this is most of the custom stuff I’ve had to do.

So, incidentally, I noticed a pattern when the integration stopped working - whenever I opened the Hass GUI. I’ve had the new streaming component in use for a couple of cameras for a while - no problems there. Also I sometimes got it working again after doing a hciconfig reset or hci0 down/up, at least I thought that was why.

Today, I tested by disabling the stream: in configuration.yaml - Ruuvi integration works right from the start. Then I did a test by removing the “preload stream” option from the cameras - still worked right after restart. But whenever a RTSP stream starts in HA -> Ruuvi integration breaks. It’s possible that now that I don’t have preloading on, it could start working by itself at some point, but I haven’t tested this yet. I used to have camera_view: live and preload on - I don’t know WHY it worked even in the first place…EDIT: Yep, after the stream stops, it starts working again.

I think that the ruuvitag-sensor should not use hcitool and hcidump at all, but I’m not that good in coding so I don’t know if that’s even possible. Does the Mi Flora integration also use those or an alternative way of getting the data?

Hi,

Willl you add your component to HACS? https://custom-components.github.io/hacs/

An EOL ( End of Line ) error indicates that the Python interpreter expected a particular character or set of characters to have occurred in a specific line of code, but that those characters were not found before the end of the line . This results in Python stopping the program execution and throwing a syntax error .

The SyntaxError: EOL while scanning string literal error in python occurs when while scanning a string of a program the python hit the end of the line due to the following reasons:

  • Missing quotes
  • Strings spanning multiple lines