Module for MagicMirror: Ruuvi api sensors lite
The MMM-ruuvi-api-sensors-lite
module fetches Ruuvi sensors data from User API (https://docs.ruuvi.com/communication/cloud/user-api) and show sensor name and temperature value.
- Clone this repository under
MagicMirror/modules
folder - Run
npm install
inMagicMirror/modules/MMM-ruuvi-api-sensors-lite
folder - Add to the modules array in the
MagicMirror/config/config.js
file:
modules: [{
module: "MMM-ruuvi-api-sensors-lite",
position: "top_right",
header: "Ruuvi measurements",
config: {
temperatureIcon: 'temperature-half',
batteryEmptyIcon: 'battery-half',
updateInterval: 5 * 1000 * 60, // every 5 minutes
apiUrl: 'https://network.ruuvi.com',
token: '<TOKEN>',
negativeColor: '#4800FF',
highlightNegative: true
}
}]
The following properties can be configured:
Option | Default value | Description |
---|---|---|
temperatureIcon |
temperature-half |
Temperature icon. See others: https://fontawesome.com/icons?d=gallery |
batteryEmptyIcon |
battery-half |
Battery empty icon. See others: https://fontawesome.com/icons?d=gallery |
updateInterval |
30000 |
Update interval in milliseconds. Limited minumum value for 1 minute because API blocks faster updates. |
apiUrl |
https://network.ruuvi.com |
Api url |
token |
Necessary own token, get it: - Register user or reset token: Send POST message with following body {"email": "your@email.com"} to https://network.ruuvi.com/register - Verify account: Send GET message with token parameter to https://network.ruuvi.com/verify?token=<TOKEN IN YOUR EMAIL> - When verified account you get response JSON where your acces token is read more: https://docs.ruuvi.com/communication/cloud/user-api |
|
negativeColor |
#4800FF |
Highlight negative value this color |
highlightNegative |
true |
Higlight negative measurements true/false |