07-15-2021, 11:20 AM
Boy I wish I could say getting MQTT working was fun but it simply has been a nightmare. I finally got CQC connecting to my broker, mosquitto, and then I fought with the config file to get what I "think" is the correct format. I figured I would start with my first goal which is reading the status of a Shelly 1 (or 1PM) relay. The config for that field is as follows:
The file is read, the field is created (although I don't understand why a field cannot be read-only since MQTT seems to require different paths for read and write) but I get an error when it queries the field stating:
Code:
<BoolSwitch Topic="shellies/shellylivingfan/relay/0" BaseName="FanLivingRm" Access="RW">
<PLFmt Type="Text"/>
<BoolTextMap FalseOut="off" TrueOut="on">
<BoolTextVal TarVal="False" MQTTVal="off"/>
<BoolTextVal TarVal="True" MQTTVal="on"/>
</BoolTextMap>
</BoolSwitch>
Quote:An encoded MQTT string buffer must be at least 3 bytesThe logs on the MQTT broker aren't telling anything useful. The CQC logs are not telling anything useful. I do know that in MQTT explorer that the value of that path = on.