RuuviBridge - Utility to bridge RuuviTag data between various sources and consumers

Related tags

Network RuuviBridge
Overview

RuuviBridge

RuuviBridge is designed to act as a "data bridge" between various sources and consumers of data. Original design goal is to work as a drop-in replacement for RuuviCollector for users who have a Ruuvi Gateway or use ruuvi-go-gateway.

Features

Supports following sources (sources of RuuviTag data):

  • MQTT (in Ruuvi Gateway format)
  • Ruuvi Gateway by polling the /history http-api endpoint
  • HTTP POST (in Ruuvi Gateway format, the custom http server setting)

Supports following sinks (things that use the data):

  • InfluxDB 1.8 and 2.x
  • Prometheus
  • MQTT (including Home Assistant MQTT discovery for automatic configuration)

Supports following RuuviTag Data Formats:

  • Data Format 3: "RAW v1" BLE Manufacturer specific data, all current sensor readings
  • Data Format 5: "RAW v2" BLE Manufacturer specific data, all current sensor readings + extra

Supports following data from the tag (depending on tag firmware):

  • Temperature (Celsius)
  • Relative humidity (0-100%)
  • Air pressure (Pascal)
  • Acceleration for X, Y and Z axes (g)
  • Battery voltage (Volts)
  • TX power (dBm)
  • RSSI (Signal strength at the receiver, dBm)
  • Movement counter (Running counter incremented each time a motion detection interrupt is received)
  • Measurement sequence number (Running counter incremented each time a new measurement is taken on the tag)

Ability to calculate following values in addition to the raw data (the accuracy of these values are approximations):

  • Total acceleration (g)
  • Absolute humidity (g/m³)
  • Dew point (Celsius)
  • Equilibrium vapor pressure (Pascal)
  • Air density (Accounts for humidity in the air, kg/m³)
  • Acceleration angle from X, Y and Z axes (Degrees)

Configuration

Check config.sample.yml for a sample config. By default the bridge assumes to find a file called config.yml in the current working directory, but that can be overridden with -config /path/to/config.yml command line flag.

By default RuuviBridge parses the config in a flexible way, ignoring all unknown fields. This can be changed with -strict-config command line flag, which will make RuuviBridge throw errors if there are unknown entries in the config. Do note that this only validates whether the config has a valid structure with right keys (ie. no typos in the keys), it does not validate whether the config makes sense as such.

Installation

Recommended method is using Docker with the prebuilt dockerimage: ghcr.io/scrin/ruuvibridge for which you can use the provided composefile

Without docker you can download prebuilt binaries from the releases page. For production use it's recommended to set up as a service.

Home Assistant MQTT discovery

Home Assistant allows automatic configuration of MQTT entities using MQTT Discovery. To enable RuuviBridge to automatically configure all of your RuuviTags to Home Assistant for you, all you need to do (assuming default configuration) is to set homeassistant_discovery_prefix in the config under mqtt_publisher. In default Home Assistant configuration this should be simply homeassistant.

After setting this configuration, it should be a matter of seconds before your RuuviTags should appear as devices in Home Assistant for reporting all available measurements, with properly set names, units, icons and other attributes.

Issues
  • Update mqtt_homeassistant.go

    Update mqtt_homeassistant.go

    Temperature related UnitOfMeasurement i.e. degree character seems to be coded as (U+00BA). I think correct one is (U+00B0). Using (U+00BA) as s degree character looked weird in Home Assistant:

    image

    ..and it was not possible to move the sensor to Homekit without customizing the entity.

    opened by villevirtanen 2
  • Movement Counter to Home Assistant?

    Movement Counter to Home Assistant?

    Great bridge to transfer data to Home Assistant. Thanks! However, one question. RuuviBridge decodes data from my RuuviTag like this:

    {
        "name": "Postilaatikko",
        "mac": "xx:x...",
        "timestamp": 1650901857,
        "data_format": 5,
        "temperature": 6.875,
        "humidity": 42.0975,
        "pressure": 100399,
        "accelerationX": -0.192,
        "accelerationY": -1.076,
        "accelerationZ": -0.076,
        "batteryVoltage": 3.016,
        "txPower": 4,
        "rssi": -84,
        "movementCounter": 114,
        "measurementSequenceNumber": 6553
    }
    

    But I can not find ruuvitag_MAC_movementCounter MQTT topic under homeassistant/sensor and probably for that reason I can find only these sensors in my Home Assistant:

    image

    I'd like to see the Movement counter data in Home Assistant. Is this a missing feature or something else maybe?

    opened by villevirtanen 1
  • Configure additional tags per series in influxdb

    Configure additional tags per series in influxdb

    This allows to add arbitrary tags per series. I use that to add more information about the data, like the location the ruuvi tags are located which this instance of the ruuvibridge processes.

    opened by tobru 1
  • Distinguish between multiple Gateways

    Distinguish between multiple Gateways

    Currently, there is no way to distinguish between multiple gateways, rather than running multiple instances of RuuviBridge (what I currently do and works). I'd like to suggest teaching RuuviBridge to distinguish between multiple Gateways.

    An example could be:

    influxdb_publisher:
      [...]
      additional_tags:
        location: $gateway_name
    
    gateway_names:
      XXXXXXXXXXX: LocationA
      YYYYYYYYYYY: LocationB
    

    (That's just a partial config to show the idea)

    This approach would make it mandatory to configure the Gateways to publish to a predefined format:

    mytopic/$GW_MAC/$TAG_MAC
    

    We could also find a way to make the topic format configurable, if desired.

    What do you think about this idea? I'm open to refine it if needed.

    opened by tobru 8
Releases(v0.1.14)
Owner
Scrin
I code stuff.
Scrin
Bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)

Wim 5k Jun 28, 2022
A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and the registry.

dn42regsrv A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and registry data. A public instance

Simon Marsh 0 Apr 21, 2022
Grpc bridge to various mediabank related systems

Mediabank bridge This internal tool enables authenticated gRPC based endpoint for securely communicating with systems like: Telestream Vantage Workflo

BCC Code 0 Jan 7, 2022
Bridge REMOV will allow you to safely transfer NFT from RMRK to MOVR and backwards

remov Inspiration Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain. The

null 1 Dec 5, 2021
A Matrix-iMessage puppeting bridge

A Matrix-iMessage puppeting bridge. The bridge runs on a Mac or jailbroken iPhone (soon™). A websocket proxy is required to receive appservice events from the homeserver.

Tulir Asokan 130 Jun 29, 2022
vks is a Vulkan bridge for Go.

vks vks is a Vulkan bridge for Go. The header generator folder contains the code that is used to generate the vulkan bindings. It woks similar to c-fo

Jason Watson 6 Apr 21, 2022
Bridge facebook messenger with any service supported by matterbridge

fbridge fbridge bridges facebook messenger with any service supported by matterbridge trough the API interface. fbridge is using fbchat to connect to

null 25 Mar 17, 2022
Facebook bridge used with matterbridge

fbridge-asyncio This repo is a fork of fbridge. If you log in to your facebook account from a browser, after you do, it's a good idea to restart fbrid

null 9 Jun 12, 2022
An inline buildpack for deploying a mattermost-irc bridge

Matterbridge-Heroku An inline buildpack for hosting Matterbridge on Heroku. Heroku is a platform for easily deploying applications. A buildpack provid

Christopher DeCairos 11 May 17, 2022
Celestia -> EVM bridge

Peggo Peggo is a Go implementation of the Peggy (Gravity Bridge) Orchestrator originally implemented by Injective Labs. Peggo itself is a fork of the

Celestia 46 Jun 27, 2022
The official repository of the Gravity Bridge Blockchain

Gravity bridge is Cosmos <-> Ethereum bridge designed to run on the Cosmos SDK blockchains like the Cosmos Hub focused on maximum design simplicity an

Gravity Bridge Foundation 80 Jun 30, 2022
A bridge from the Stellar network to other blockchains

Creating equitable access to the global financial system Starbridge Starbridge is software that facilitates bridge builders who are connecting the Ste

Stellar 28 Jun 23, 2022
🧙 High-performance PHP-to-Golang IPC/RPC bridge

High-performance PHP-to-Golang IPC bridge Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/r

RoadRunner 1.1k Jun 24, 2022
Sonarcon - Uses the SonarQube API to interact and extract sources from public instances

Sonarcon Uses the SonarQube API to interact and extract sources from public inst

null 0 Feb 17, 2022
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

ProjectDiscovery 5.8k Jul 1, 2022
Capdns is a network capture utility designed specifically for DNS traffic. This utility is based on tcpdump.

Capdns is a network capture utility designed specifically for DNS traffic. This utility is based on tcpdump. Some of its features include: Unde

Infvie Envoy 10 Feb 26, 2022
Simple Relay between a Unix socket and a TCP socket, and vice versa.

Simple TCP <-> Unix Relay simpletcpunixrelay is a program which exposes a TCP endpoint as a Unix socket and vice versa. Usecase Let's say you are runn

Antoine Catton 0 Dec 4, 2021
Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain.

remov Inspiration Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain. The

RMRK Team 4 Jan 10, 2022
Web app utility to get server list data from Minecraft servers.

Ping Web app utility to get server list data from Minecraft servers. Avalible at https://ping.turtley12.dev/app, Running yourself Before compiling and

null 0 Dec 21, 2021