magcode / daikin-mqtt

MQTT interface for Daikin AC Wifi Adapter
GNU General Public License v3.0
10 stars 2 forks source link

Retanied messages are needed? Side effect. #6

Closed FulvioSpelta closed 4 years ago

FulvioSpelta commented 4 years ago

I've seen that the messages are published as "retained". IMHO this is not necessary because the "subscriber" will receive:

Side effect Every test/device remain in the broker db and is delivered at every connection at every subscriber; in this example i've done a test using ac-room1 deviceid and now every subscribers (different mqtt clientid) receive a full set of data at every connection: image image

magcode commented 4 years ago

I understood the convention that "retained" is the default https://homieiot.github.io/specification/#qos-and-retained-messages

I'm aware of this effect that test devices stay in the broker. Not sure how to solve it.

FulvioSpelta commented 4 years ago

As the standard is asking for this implementation I suggest to leave it untouched, I'll clean the broker db.

The only concern is about the overall behavior of the gateway: because the "state" miss the LWT message, when a messages consumer connect to the broker it recevive a full set of measure and a "ready" state that will make it consider the gateway to be up&running even if it is completely off or disconnected.

magcode commented 4 years ago

I made retained=false and qos=0 as the default now. You can set it back to retained and qos=1 in the properties file (see readme)