Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MQTT Help
#11
From memory, Tasmote uses two different topics for status and control - hence we need two fields. Not all devices will be like this if they publish status on the same topic as control.

I have not played with anything else yet other than Tasmota, hopefully a Hisense TV will come along where I can try out the MQTT control in it.
Mykel Koblenz
Illawarra Smart Home
Reply
#12
I've tried both emulations, but I think I need to use the Hue Bridge because my plugs have two relays each (110v power and a usb plug). I don't see anything related to Alexa in the tasmota logs when Alexa is searching for devices even when I turn all the logging up to"4".

I'm not sure where the issue is. I had the plugs connected prior to fishing tasmota using the smart things app.

I've tried a couple of things suggested on line, but nothing as worked yet. I'll keep plugging along at it.
Brian - a long time user that rarely messes with the system now
Other systems used:
SageTV w/ cablecard tuner & multiple extenders for viewing
BlueIris and IP cameras for CCTV
Incredible PBX for home phone
Reply
#13
Just a follow up to my last comment. I had a suspicion that my issue was network related, so I decided to focus my efforts there and I eventually found the issue. I use Ubiquity Wireless APs and in the Unifi Controller in the Wireless Network Settings, there is a setting called "Enable Multicast and Broadcast Filtering". This is on by default and it is the recommended setting, but turning it off allowed my devices to be discovered by Alexa.
Brian - a long time user that rarely messes with the system now
Other systems used:
SageTV w/ cablecard tuner & multiple extenders for viewing
BlueIris and IP cameras for CCTV
Incredible PBX for home phone
Reply
#14
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:
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>
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:
Quote:An encoded MQTT string buffer must be at least 3 bytes
The 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.
Reply
#15
So, here are the specific devices I need help getting set up.  I'm going to include the MQTT Explorer display to show exactly what I'm trying to accomplish:

[Image: attachment.php?aid=2536]
1) I want to store /shellylivingfan/relay/0 to a boolean field (on=True, off=False)
2) I want to pull several fields from /shellylivingfan/announce to fields
[Image: attachment.php?aid=2537]
3) I want to store /wled/kitchen1/v to a string field so I can pull out various fields.  I didn't see anything that hinted to being able to strip apart the fields but I can definitely do that myself with triggers to the variable driver.  If there is an XML parser, I would like examples to store a plain string and parsing the XML

Thanks,


Attached Files
.jpg   wled1.jpg (Size: 8.8 KB / Downloads: 21)
.jpg   shelly1.jpg (Size: 18.67 KB / Downloads: 24)
Reply
#16
I like to use MQTT.fx for my testing. I can see the exact payload and then use that to create structure of the CQC configuration.

Its also great for testing as you can publish as well.
Mykel Koblenz
Illawarra Smart Home
Reply
#17
(07-19-2021, 01:44 PM)znelbok Wrote: I like to use MQTT.fx for my testing.  I can see the exact payload and then use that to create structure of the CQC configuration.

Its also great for testing as you can publish as well.
So, Explorer allows that too.  That's how I got the structure I need to "read."  My problem is mapping different fields into CQC variables right now.  I have even published messages to "change" relays and the like.  The documentation just does not make work as I read it for a Boolean field and the error is so terse that I don't even know what it's doing/not doing.  I don't even see an example of reading a string in the documentation or an XML payload, so that's pure luck to figure that out in my mind.

The publish aspect is the easy part because I can use URLs to affect the changes I require also.  Until I get CQC to KNOW what the status is of things, that doesn't get me any further.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Additional MQTT Support znelbok 5 1,363 05-14-2020, 03:55 PM
Last Post: Dean Roddey
  New MQTT support Dean Roddey 65 16,229 02-02-2020, 02:00 PM
Last Post: simplextech

Forum Jump:


Users browsing this thread: 1 Guest(s)