This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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? |