Skip to content

SlashNephy/mackerel-plugin-switchbot

Repository files navigation

mackerel-plugin-switchbot

A Mackerel plugin to collect metrics from various SwitchBot devices.

A list of supported devices can be found here.

Example Metrics

$ mackerel-plugin-switchbot
switchbot.battery.XXXXX-battery         95        1699895326
switchbot.battery.YYYYY-battery         97        1699895326
switchbot.battery.ZZZZZ-battery         100       1699895326
switchbot.temperature.XXXXX-temperature 27.800000 1699895326
switchbot.humidity.XXXXX-humidity       42        1699895326

Usage

  1. Install via mkr / or download releases directly
$ mkr plugin install SlashNephy/mackerel-plugin-switchbot
  1. Append following configuration to mackerel-agent.conf
[plugin.metrics.switchbot]
command = "/opt/mackerel-agent/plugins/bin/mackerel-plugin-switchbot --open-token XXX --secret-key XXX"

mackerel-plugin-switchbot has some command-line options. Check the help for details.

$ /opt/mackerel-agent/plugins/bin/mackerel-plugin-switchbot --help