Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding wildcards and LWT to mqtt.pm #809

Merged
merged 1 commit into from
Dec 29, 2020
Merged

adding wildcards and LWT to mqtt.pm #809

merged 1 commit into from
Dec 29, 2020

Conversation

ggodart
Copy link
Contributor

@ggodart ggodart commented Dec 29, 2020

This pull adds;

MQTT wildcards.

You can define MH devices like;
MQTT_DEVICE, MQTT_test_wildcard, , mqtt_1, tele/+/LWT
then this device will receive all messages from topics that match the wildcard, $MQTT_test_wildcard->{set_by_topic} is set to the name of the topic that sent the original message and $MQTT_test_wildcard->{state} is set to the payload of the message. It supports both single wildcards like stat/# and multilevel like +/mydevice/+.

LWT

When MH connects to the MQTT broker it adds the LWT topic and message from mh.ini settings

mqtt_LWT_topic=tele/Misterhouse/LWT
mqtt_LWT_payload=offine

If it subsequently goes down the broker publishes this message. You should also publish an online message to tele/Misterhouse/LWT when MH starts.

@hplato hplato merged commit 18dafce into hollie:master Dec 29, 2020
@hplato hplato mentioned this pull request Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants