jMQTT
jMQTT copied to clipboard
Feature request: add command topic parameter capability to use wildcard
Dear everyone,
Feature request:
Could you add capabilities in topic field of a command for a device to use kind of wildcard in JMQTT ?
I need to be able to define topic pattern hasp/plate06/state/# or hasp/plate06/state/p[0-9]+b[0-9]+ to catch all subtopics like:
hasp/plate06/state/p1b9
hasp/plate06/state/p2b18
hasp/plate06/state/p3b23
Context:
I'm using OpenHASP with Mosquitto and JMQTT in Jeedom to manage my custom remotes in my rooms.
Right now i have 2 jeedom scenarios with 1 virtual. First one send the json layout config to the remote. Second one catch mqtt messages from the remote.
Problem: OpenHasp generate one subtopic for each button on the remote. To catch the command i need to customise the remote command in JMQTT to write message in a virtual variable which will trigg the scenario to run the action.
Hello @acabrol,
Thank you the details regarding your use case.
This feature is already planned as you can see here. As it requires a lot of changes in the way messages flows through the plugin, the implementation will be part of a bigger refresh of the daemon code.
For now, you can simply create N cmd in jMQTT that subscribe individually to each topic and add an event
action on each of them to update a virtual cmd (plugin Virtual), instead of using a intermediary scenario/variable.
We can keep this issue open, I'll keep you informed when it will be available (in the next months).
Bad