Skip to content

Repository files navigation

Grafana & InfluxDB

Configuration for monitoring:

Setup

Update each Shelly PlusPlug

  1. Settings > Firmware > Check for updates > Install update

Configure each Shelly PlusPlug

After setting each setting below, select Save Settings:

  1. Home > Switches > Settings > Input/Output settings: Turn ON
  2. Home > Switches > Settings > Detach switch: Detached
  3. Settings > Device name: Set to plug[ID] (for example, plug1)
  4. Settings > Location and time > Timezones: Etc/UTC
  5. Settings > Location and time > SNTP server: uk.pool.ntp.org
  6. Settings > Access Point settings > Enable AP network: No
  7. Settings > Bluetooth settings > Enable Bluetooth: No
  8. Settings > Authentication > Password protected device: Yes
  9. Settings > Authentication > Password: [choose password for web interface]
  10. Settings > MQTT settings > Enable: Yes
  11. Settings > MQTT settings > Connection Type: No TLS
  12. Settings > MQTT settings > MQTT Prefix: plug/[ID]
  13. Settings > MQTT settings > Enable MQTT Control:: No
  14. Settings > MQTT settings > Enable RPC over MQTT: No
  15. Settings > MQTT settings > RPC status notifications over MQTT: Yes
  16. Settings > MQTT settings > Generic status update over MQTT: Yes
  17. Settings > MQTT settings > Server: [your-server.example.com:1883]
  18. Settings > MQTT settings > Client ID: plug[ID]
  19. Settings > MQTT settings > Username: power
  20. Settings > MQTT settings > Password: [choose password for mosquitto]
  21. Switches > Reset counters
  22. Reboot

Configure each Shelly Pro 3EM

After setting each setting below, select Save Settings:

  1. Settings > Device name: Set to distro[ID] (for example, distro1)
  2. Settings > Location and time > Timezones: Etc/UTC
  3. Settings > Location and time > SNTP server: uk.pool.ntp.org
  4. Settings > Access Point settings > Enable AP network: No
  5. Settings > Bluetooth settings > Enable Bluetooth: No
  6. Settings > Authentication > Password protected device: Yes
  7. Settings > Authentication > Password: [choose password for web interface]
  8. Settings > MQTT settings > Enable: Yes
  9. Settings > MQTT settings > Connection Type: No TLS
  10. Settings > MQTT settings > MQTT Prefix: distro/[ID]
  11. Settings > MQTT settings > Enable MQTT Control:: No
  12. Settings > MQTT settings > Enable RPC over MQTT: No
  13. Settings > MQTT settings > RPC status notifications over MQTT: Yes
  14. Settings > MQTT settings > Generic status update over MQTT: Yes
  15. Settings > MQTT settings > Server: [your-server.example.com:1883]
  16. Settings > MQTT settings > Client ID: distro[ID]
  17. Settings > MQTT settings > Username: power
  18. Settings > MQTT settings > Password: [choose password for mosquitto]
  19. Reboot

Create Discord channel webhook

  1. Select Edit channel
  2. Select Integrations
  3. Select Create Webhook
  4. Change Name to Grafana
  5. For the avatar, select and upload the Grafana logo
  6. Select Copy Webhook URL
  7. Select Save Changes

Set up project

  1. git clone git@github.com:zeropingheroes/grafana-influxdb.git
  2. cd grafana-influxdb
  3. cp .env.example .env
  4. nano .env
  5. docker compose up -d
  6. docker exec -it -u 1883 mosquitto sh
  7. mosquitto_passwd -c /mosquitto/config/passwd telegraf
  8. Enter password
  9. mosquitto_passwd /mosquitto/config/passwd power
  10. Enter password
  11. logout
  12. nano .env to add passwords
  13. docker compose restart mosquitto telegraf

References

About

Monitoring for LAN services

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages