Skip to content

Instantly share code, notes, and snippets.

View andreasgruener's full-sized avatar

Andreas Gruener andreasgruener

View GitHub Profile
#!/bin/bash
#
# Remove Homie Device from MQTT
#
# Simple Script to remove all reatined messages for a homie device, effectively removing the device from MQTT.
# The script get all topics "below" a device e.g homie/a020a615f72c/$mac and
# send a NULL message with mosquitto_pub to the topic. This removes the retained
# message and the topic will not show up anymore.
#
# How?