Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MQTT Help
#20
OK, well I'm starting to make some positive progress so hopefully I'll be able to help.  I now have the basic status of On or Off showing in a Boolean field and can turn the connected light on/off.  The next big hurdle is going to be parsing the larger status elements in the JSON text fields and getting to the desired value or values...  Thankful for what you, Znelbok and sic0048 have shared as examples or I would be completely lost.

Although I may need to tweak a bit further. Here is what is working for my Shelly RGBW2 in color mode:
First set is for the reading/storing of the on/off.  Second set is the actual sending of the command.


Code:
<?xml version="1.0" encoding="US-ASCII"?>
        <!DOCTYPE MQTTCfg PUBLIC "urn:charmedquark.com:CQC-MQTTCfg.DTD" "CQCMQTTCfg.DTD">
        <MQTTCfg Version="1" MQTTPort="1883" MQTTAddr="<server address here>" UserName="****" Password="****">

            <Fields>
                 <Generic Topic="shellies/KitchenUnderCabinet/color/0" BaseName="KitchenUnderCabinetStatus" Access="R" FldType="Boolean">
                    <PLFmt Type="BinText"/> 
                    <BoolTextMap FalseOut="off" TrueOut="on">
                        <BoolTextVal TarVal="False" MQTTVal="off"/>
                        <BoolTextVal TarVal="True" MQTTVal="on"/>
                    </BoolTextMap>
                </Generic>
        <Generic Topic="shellies/KitchenUnderCabinet/color/0/command" BaseName="KitchenUnderCabinetCMD" FldType="String" Retain="No" Access="W">
            <PLFmt Type="BinText"/>
                <EnumMap>
                <EnumVal FldVal="off" MQTTVal="off"/>
                <EnumVal FldVal="on" MQTTVal="on"/>
                </EnumMap>
        </Generic>
            </Fields>
        </MQTTCfg>

Also attaching a screenshot of MQTT Explorer for reference.


Attached Files
.png   ShellyRGBW2.png (Size: 52.28 KB / Downloads: 0)
-Mike G
Reply


Messages In This Thread
MQTT Help - by sic0048 - 12-02-2020, 08:40 PM
RE: MQTT Help - by sic0048 - 12-03-2020, 04:28 AM
RE: MQTT Help - by Dean Roddey - 12-04-2020, 04:51 PM
RE: MQTT Help - by znelbok - 12-04-2020, 08:45 PM
RE: MQTT Help - by sic0048 - 12-05-2020, 08:15 AM
RE: MQTT Help - by znelbok - 12-06-2020, 03:27 AM
RE: MQTT Help - by Dean Roddey - 12-05-2020, 09:08 AM
RE: MQTT Help - by sic0048 - 12-05-2020, 09:40 AM
RE: MQTT Help - by sic0048 - 12-05-2020, 11:19 AM
RE: MQTT Help - by Dean Roddey - 12-05-2020, 11:55 AM
RE: MQTT Help - by znelbok - 12-06-2020, 03:36 AM
RE: MQTT Help - by sic0048 - 12-06-2020, 01:07 PM
RE: MQTT Help - by sic0048 - 12-22-2020, 08:23 AM
RE: MQTT Help - by zaccari - 07-15-2021, 11:20 AM
RE: MQTT Help - by zaccari - 07-19-2021, 10:38 AM
RE: MQTT Help - by znelbok - 07-19-2021, 01:44 PM
RE: MQTT Help - by zaccari - 07-19-2021, 02:47 PM
RE: MQTT Help - by Shaky - 10-24-2021, 07:03 PM
RE: MQTT Help - by zaccari - 10-25-2021, 04:40 AM
RE: MQTT Help - by Shaky - 10-25-2021, 07:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  MQTT Verify Configuration not working znelbok 4 367 03-17-2022, 01:07 PM
Last Post: Dean Roddey
  Additional MQTT Support znelbok 5 1,960 05-14-2020, 03:55 PM
Last Post: Dean Roddey
  New MQTT support Dean Roddey 65 20,454 02-02-2020, 02:00 PM
Last Post: simplextech

Forum Jump:


Users browsing this thread: 1 Guest(s)