I need some help.
I am trying the MqttMapper plugin since several days with little success. Certainly I miss something ...
I am using domoticz 2024.7 with MQTT. MQTT receives data from a Balboa spa / MQTT interface (using "
https://github.com/ccutrer/balboa_worldwide_app/wiki" applications). Note: the interface is working: I am able to control the Balboa interface through "Mqtt Explorer".
One the of Balboa devices (a LED switch) has the followig HomeAssistant definition :
{"name":"Hot Tub Lights",
"availability_topic":"homie/bwa/$state",
"payload_available":"ready",
"payload_not_available":"lost",
"qos":1,
"icon":"mdi:car-parking-lights",
"device":{
"manufacturer":"Balboa Water Group",
"sw_version":"2.1.7",
"model":"CN6013X",
"name":"BWA Link",
"identifiers":"bwa"},
"state_topic":"homie/bwa/spa/light1",
"command_topic":"homie/bwa/spa/light1/set",
"payload_off":"false",
"payload_on":"true",
"unique_id":"bwa_spa_light1"
}
So the important inputs are (in line with what I see in MQTT Explorer):
"state_topic":"homie/bwa/spa/light1",
"command_topic":"homie/bwa/spa/light1/set",
"payload_off":"false",
"payload_on":"true",
As a consequence, I wrote the MqttMapper config file:
{
"Spa LED test": {"topic": "homie/bwa/spa/light1",
"type": "244", "subtype": "73", "switchtype": "0",
"set": {"topic": "homie/bwa/spa/light1/set", "payload": "#"},
"mapping": {"item": "", "default": "false", "values": {"true": "100", "false": "0"}}
}
}
Note: after some search in this discussion, I found that "100" is the true state of a domoticz switch.
My issue:
The switch is well created in domoticz. But:
- the current switch status is not in line with MQTT explorer status
- the control seems to work (at least MQTT explorer shows in the history that a command is received).
In particular, when I use Mqtt Explorer to manually change the values in Mqtt (command_topic":"homie/bwa/spa/light1/set) and the attached balboa interface, the balboa interface is working, but .... nothing is happening on domoticz side.
The domoticz logs :
when activating the domoticz switch: it seems to work
2024-09-04 20:10:40.034 Status: User: admin (IP: xxxxxx) initiated a switch command (176/MM_brax_test - Spa LED test/On)
2024-09-04 20:10:40.076 MM_brax_test: 001/MM_brax_test - Spa LED test, homie/bwa/spa/light1: Command: 'On', Level: 0, Color:
2024-09-04 20:10:40.077 MM_brax_test: Setting homie/bwa/spa/light1 to >true<
putting "false" through MQTT explorer: putting false
2024-09-04 20:11:44.480 MM_brax_test: testValue="true" (<class 'str'>), readValue="0.0" (<class 'str'>)
2024-09-04 20:11:44.480 MM_brax_test: testValue="false" (<class 'str'>), readValue="0.0" (<class 'str'>)
2024-09-04 20:11:44.481 MM_brax_test: Setting MM_brax_test - Spa LED test to >false<
putting "true" through MQTT explorer: putting again false (and not true as expected)
2024-09-04 20:13:42.680 MM_brax_test: testValue="true" (<class 'str'>), readValue="1.0" (<class 'str'>)
2024-09-04 20:13:42.680 MM_brax_test: testValue="false" (<class 'str'>), readValue="1.0" (<class 'str'>)
2024-09-04 20:13:42.681 MM_brax_test: Setting MM_brax_test - Spa LED test to >false<
So, what is wrong in my config file ?
Thanks for your advice.