12-02-2020, 08:40 PM
So I am trying to get MQTT set up in CQC and I'm not having any luck.
I have the MQTT server set up and a couple of plugs that I flashed to Tasmota and they are connecting to the MQTT server. I can control those plugs via the console command line in Tasmota. I have also set up the CQC MQTT driver and it is connecting to the MQTT server correctly (the driver is connected). I can see MQTT PINGRESP commands being sent to the CQC driver in the MQTT console.
The issue that I am having is setting up the devices/fields in the CQC driver. I am trying to get one plug connected and I am failing miserably.
Here is the MQTT CQC config file.
This creates a field in the MQTT driver, but it is in error state and won't connect to the plug.
Here is the MQTT server console log when I try to reload the CQC MQTT Driver
Here is the MQTT server console logs when I try to reload the CQC MQTT driver:
New connection from 192.168.72.60 on port 1883.
New client connected from 192.168.72.60 as CQCMQTTS_MQTT (p2, c1, k60).
No will message specified.
Sending CONNACK to CQCMQTTS_MQTT (0, 0)
Received SUBSCRIBE from CQCMQTTS_MQTT
XMasTree (QoS 1)
CQCMQTTS_MQTT 1 XMasTree
Sending SUBACK to CQCMQTTS_MQTT
It's not clear why it is failing, but I'm assuming it is sending back a message that CQC doesn't expect/understand.
This MQTT command line will turn the switch on: cmnd/XMasTree/Power On
This MQTT command line will turn the switch off: cmnd/XMasTree/Power Off
Based on that, I assume the "Topic" in the CQC config file should be XMasTree, but I don't know why it won't work.
Any suggestions would be helpful.
Thanks,
I have the MQTT server set up and a couple of plugs that I flashed to Tasmota and they are connecting to the MQTT server. I can control those plugs via the console command line in Tasmota. I have also set up the CQC MQTT driver and it is connecting to the MQTT server correctly (the driver is connected). I can see MQTT PINGRESP commands being sent to the CQC driver in the MQTT console.
The issue that I am having is setting up the devices/fields in the CQC driver. I am trying to get one plug connected and I am failing miserably.
Here is the MQTT CQC config file.
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="192.168.72.60">
<Fields>
<LightSwitch Topic="XMasTree" BaseName="XMasTree" Access="RW">
<PLFmt Type="Text"/>
<BoolTextMap FalseOut="off" TrueOut="on">
<BoolTextVal TarVal="False" MQTTVal="OFF"/>
<BoolTextVal TarVal="True" MQTTVal="ON"/>
</BoolTextMap>
</LightSwitch>
</Fields>
</MQTTCfg>
This creates a field in the MQTT driver, but it is in error state and won't connect to the plug.
Here is the MQTT server console log when I try to reload the CQC MQTT Driver
Here is the MQTT server console logs when I try to reload the CQC MQTT driver:
New connection from 192.168.72.60 on port 1883.
New client connected from 192.168.72.60 as CQCMQTTS_MQTT (p2, c1, k60).
No will message specified.
Sending CONNACK to CQCMQTTS_MQTT (0, 0)
Received SUBSCRIBE from CQCMQTTS_MQTT
XMasTree (QoS 1)
CQCMQTTS_MQTT 1 XMasTree
Sending SUBACK to CQCMQTTS_MQTT
It's not clear why it is failing, but I'm assuming it is sending back a message that CQC doesn't expect/understand.
This MQTT command line will turn the switch on: cmnd/XMasTree/Power On
This MQTT command line will turn the switch off: cmnd/XMasTree/Power Off
Based on that, I assume the "Topic" in the CQC config file should be XMasTree, but I don't know why it won't work.
Any suggestions would be helpful.
Thanks,