No announcement yet.

Published messsages don't perform variable substitution

  • Filter
  • Time
  • Show
Clear All
new posts

    Published messsages don't perform variable substitution


    Just getting going with the plugin. I am aiming to use this with a bunch of Shelly RGBW2 LED strip controllers that will do local MQTT.

    The Shellys are working great, I can use MQTT.fx to send manual messages to them and they act as expected.

    I added the status topic to the plugin and that is working great as well. No matter how the status is changed, it shows up on the associated HS units shortly afterwards.

    My problem is control. They want a specific topic just for control, and a JSON message for what you are doing. In this case, the JSON needs to be {"turn":"off"} or {"turn":"on"} to activate or deactivate the strip.

    I set the publish topic, and in the Publish Payload Template I have {"turn":"$$STATUS"}. When I change the status of the device in HS, a message does get sent, but it is always {"turn":"STATUS"}. I thought maybe I needed value instead of status, but that just returns {"turn":"VALUE"}.

    I am sure I am doing something wrong that is very basic, but it is eluding me. Can you point me in the right direction?

    I am loving the feature set of the plugin so far, keep it up!

    I should add, if I remove the quotes around the variable it has no effect on the outcome.


      The substitution variables end in colon. e.g. $$STATUS:


        Ahhhh, so of course that was it. Thanks!

        I have a new issue, but I will start a new thread for it.