node-red-contrib-ruuvi-gateway 0.0.2
Poll a Ruuvi gateway
Ruuvi gateway node
The node uses the poll mode to retrieve the values from the Ruuvi Gateway and gets triggered when receiving input.
Inputs
payload (string|number|json)
: the trigger to poll the Ruuvi gateway
The msg.topic
is filled with the MAC address of the queried gateway.
Outputs
payload (json)
: the answer from the Ruuvi gateway
A typical answer contains a few top level fields:
timestamp
: the timestamp of the retrievaltags
: an object, containing all of the tags that are within reach of the gatewaygw_mac
: the MAC address of the queried gateway
The tags
contain an object for each found Ruuvi sensor, identified by its id. Typical fields that reside within this object are:
rssi
: the signal strenghttimestamp
: timestamp of the last received sensor readingdata
: raw field containing the data of the sensordataFormat
: identifier for the data formattemperature
: the temperature in degrees Celsiushumidity
: the humidity in percentagepressure
: if available, the pressure. Seems to returnnull
axelX
,axelY
andaxelZ
- movement informationmovementCounter
- how often the sensor was movedvoltage
- the battery voltagetxPower
- the transmit txPowermeasurementSequenceNumber
- a sequence numberid
- the identification id for the sensor
Configuration
name (string)
: the name for the nodegateway (ruuvi config)
: the configured Ruuvi gatewaystore in global context (boolean)
: whether or not to store the answer in the global contextverbose (boolean)
: show the used curl command in the debug tab
Configure the gateway to enable poll mode. Then copy and paste the token into the configuration of a new Ruuvi gateway.
Also fill out the hostname or ip address for the Ruuvi gateway. The easiest way is to
enter ruuvigatewayXXXX.local
, where the XXXX
match the code, which is printed on the
backside of the Ruuvi gateway.