Configuration for monitoring:
- Shelly PlusPlug UK
- Proxmox
- Settings > Firmware > Check for updates > Install update
After setting each setting below, select Save Settings:
- Home > Switches > Settings > Input/Output settings: Turn ON
- Home > Switches > Settings > Detach switch: Detached
- Settings > Device name: Set to plug[ID] (for example, plug1)
- Settings > Location and time > Timezones: Etc/UTC
- Settings > Location and time > SNTP server: uk.pool.ntp.org
- Settings > Access Point settings > Enable AP network: No
- Settings > Bluetooth settings > Enable Bluetooth: No
- Settings > Authentication > Password protected device: Yes
- Settings > Authentication > Password: [choose password for web interface]
- Settings > MQTT settings > Enable: Yes
- Settings > MQTT settings > Connection Type: No TLS
- Settings > MQTT settings > MQTT Prefix: plug/[ID]
- Settings > MQTT settings > Enable MQTT Control:: No
- Settings > MQTT settings > Enable RPC over MQTT: No
- Settings > MQTT settings > RPC status notifications over MQTT: Yes
- Settings > MQTT settings > Generic status update over MQTT: Yes
- Settings > MQTT settings > Server: [your-server.example.com:1883]
- Settings > MQTT settings > Client ID: plug[ID]
- Settings > MQTT settings > Username: power
- Settings > MQTT settings > Password: [choose password for mosquitto]
- Switches > Reset counters
- Reboot
After setting each setting below, select Save Settings:
- Settings > Device name: Set to distro[ID] (for example, distro1)
- Settings > Location and time > Timezones: Etc/UTC
- Settings > Location and time > SNTP server: uk.pool.ntp.org
- Settings > Access Point settings > Enable AP network: No
- Settings > Bluetooth settings > Enable Bluetooth: No
- Settings > Authentication > Password protected device: Yes
- Settings > Authentication > Password: [choose password for web interface]
- Settings > MQTT settings > Enable: Yes
- Settings > MQTT settings > Connection Type: No TLS
- Settings > MQTT settings > MQTT Prefix: distro/[ID]
- Settings > MQTT settings > Enable MQTT Control:: No
- Settings > MQTT settings > Enable RPC over MQTT: No
- Settings > MQTT settings > RPC status notifications over MQTT: Yes
- Settings > MQTT settings > Generic status update over MQTT: Yes
- Settings > MQTT settings > Server: [your-server.example.com:1883]
- Settings > MQTT settings > Client ID: distro[ID]
- Settings > MQTT settings > Username: power
- Settings > MQTT settings > Password: [choose password for mosquitto]
- Reboot
- Select Edit channel
- Select Integrations
- Select Create Webhook
- Change Name to Grafana
- For the avatar, select and upload the Grafana logo
- Select Copy Webhook URL
- Select Save Changes
git clone git@github.com:zeropingheroes/grafana-influxdb.gitcd grafana-influxdbcp .env.example .envnano .envdocker compose up -ddocker exec -it -u 1883 mosquitto shmosquitto_passwd -c /mosquitto/config/passwd telegraf- Enter password
mosquitto_passwd /mosquitto/config/passwd power- Enter password
logoutnano .envto add passwordsdocker compose restart mosquitto telegraf
- https://fullstackenergy.com/mqtt-into-influx/
- https://docs.influxdata.com/telegraf/v1/data_formats/input/json_v2/
- https://github.com/influxdata/telegraf/blob/master/plugins/inputs/mqtt_consumer/README.md
- https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md
- https://www.influxdata.com/blog/telegraf-best-practices/
- https://docs.influxdata.com/telegraf/v1/configuration/
- https://github.com/tidwall/gjson
- https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch/
- https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt/
- https://kb.shelly.cloud/knowledge-base/shelly-plus-plug-uk
- https://mosquitto.org/documentation/
- https://mosquitto.org/man/mosquitto-conf-5.html
- https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/
- https://docs.influxdata.com/influxdb/v2/query-data/get-started/query-influxdb/
- https://docs.influxdata.com/influxdb/v2/reference/key-concepts/data-elements/
- https://docs.influxdata.com/influxdb/v2/write-data/best-practices/schema-design/
- https://grafana.com/docs/grafana/latest/setup-grafana/installation/docker/
- https://grafana.com/docs/grafana/latest/alerting/fundamentals/templates/
- https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/examples/
- https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/language/