Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Bridge to AWS IoT and retain flag

Thomas Meier <tfmeier@xxxxxxxxx> writes:

> I hear you and retain might as well be a critical feature for some
> applications. In my case it's a home automation environment in its early
> stages and maybe I come to a point where this becomes a non-negotiable
> requirement.

Not really on-topic for mosquitto, but consider what Dustin said about
semantics.

If you have a temperature sensor that publishes a new temp every minute,
it's best IMHO to not set the retain flag.

If you have a switch, that publishes its state, and watches a command
topic (the HA way), then you proabably do want retain, so when HA starts
it can know the state of the switch from hours ago.

If you don't have retain, then HA will mark the switch unavailable,
leading you to want to implement a "status request" topic as a kludge to
get the switch to republish.

I think you are wanting to use retain to do things right, and to bridge
to a non-compliant broker for other puposes, but you didn't explain.

You also said 'messages from HA have the retain flag', but I really
wonder if you mean that.  Or just that messages from your tasmota
devices as relayed by mosquitto running on your HA system.

Attachment: signature.asc
Description: PGP signature


Back to the top