Beiträge von Jan M

VPN/Proxy erkannt

Es scheint, dass Sie einen VPN- oder Proxy-Dienst verwenden. Bitte beachten Sie, dass die Nutzung eines solchen Dienstes die Funktionalität dieser Webseite einschränken kann.

    Hi there,

    since a few days I own a new shelly plus 1pm and also want to use the MQTT feature. Now, I'm facing the problem that the messages don't have the retain flag.

    The messages as received by mosquitto are:

    Code
    $ mosquitto_sub -t "shellies/wohnzimmer/sofa/events/rpc" -v -F %J
    {"tst":1643318818,"topic":"shellies/wohnzimmer/sofa/events/rpc","qos":0,"retain":0,"payloadlen":180,"payload":{"src":"shellyplus1pm-4417939429c0","dst":"shellies/wohnzimmer/sofa/events","method":"NotifyStatus","params":{"ts":1643318819.25,"switch:0":{"id":0,"output":true,"source":"MQTT"}}}}
    {"tst":1643318820,"topic":"shellies/wohnzimmer/sofa/events/rpc","qos":0,"retain":0,"payloadlen":164,"payload":{"src":"shellyplus1pm-4417939429c0","dst":"shellies/wohnzimmer/sofa/events","method":"NotifyStatus","params":{"ts":1643318821.18,"switch:0":{"id":0,"apower":25.0}}}}
    
    $ mosquitto_sub -t "shellies/wohnzimmer/sofa/status/switch:0" -v -F %J
    {"tst":1643319092,"topic":"shellies/wohnzimmer/sofa/status/switch:0","qos":0,"retain":0,"payloadlen":216,"payload":{"id":0, "source":"MQTT", "output":true, "apower":0.0, "voltage":225.2, "current":0.123, "aenergy":{"total":434.227,"by_minute":[196.659,422.381,421.937],"minute_ts":1643319091},"temperature":{"tC":53.9, "tF":129.0}}}
    {"tst":1643319094,"topic":"shellies/wohnzimmer/sofa/status/switch:0","qos":0,"retain":0,"payloadlen":216,"payload":{"id":0, "source":"MQTT", "output":true, "apower":9.8, "voltage":225.2, "current":0.060, "aenergy":{"total":434.233,"by_minute":[202.117,422.381,421.937],"minute_ts":1643319093},"temperature":{"tC":53.7, "tF":128.6}}}
    {"tst":1643319094,"topic":"shellies/wohnzimmer/sofa/status/switch:0","qos":0,"retain":0,"payloadlen":216,"payload":{"id":0, "source":"MQTT", "output":true, "apower":9.8, "voltage":225.2, "current":0.060, "aenergy":{"total":434.233,"by_minute":[202.117,422.381,421.937],"minute_ts":1643319093},"temperature":{"tC":53.7, "tF":128.6}}}

    Obviously, "retain":0 is the retain flag set to false.

    How can I change the mqtt settings, to publish the mqtt status messages with the retain flag set to true.

    Thanks!