-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Add the ability for HA-Dockermon to use MQTT discovery to send updates and states about running containers on the host system.
Example Configuration
debug: false
http:
enabled: true
port: 8126
mqtt:
enabled: true
base_topic: "ha-dockermon"
hostname: "Unique name for server" #could potentially use hostname if available?
discovery:
enabled: true
base_topic: "homeassistant"
home_assistant_availability_topic: "hass/status"
Device ID's
The device unique ID will be comprised of the host name and container name. This will ensure that when a container gets re-created with the same name of a previous container, Home Assistant sees it as an existing device.
Controlling Containers
HA-Dockermon will allow the same endpoints as exposed from HTTP. The following are some sample MQTT topics
ha-dockermon/hostname/home-assistant/state
Could be sent start
and stop
to control the container. Possible other options could be pause
and unpause
.
ha-dockermon/hostname/home-assistant/pull
Any calls to this topic would start pulling the latest image. If the payload contains a URL, it could be used as a webhook (Requires #37)
Container Information
Additional information for each container will be exposed via attributes to the switch. These include:
- Container image/tag ie
philhawthorne/ha-dockermon
- Container status ie
Up 16 hours
There could also be the potential for addiitonal sensors to be added, such as memory/CPU usage. Ie sensor.hadockermon_memory
could exist in Home Assistant.
Additional Configuration Options
Once the basics are implemented there could be some additional configuration options made available, including:
- Exclude/include filters to specify containers that should be added to Home Assistant
- Names, icons etc for display in Home Assistant