MQTT Client - Homey Actions on MQTT message

I have got MQTT Broker up and running, I can use the MQTT Client to push data out to MQTT Broker ok

I am now trying to get Homey to detect a change in MQTT Broker

Screenshot 2023-01-28 at 17.18.28

In theory if I push anything into Homey/Control/Blinds/office then the Office Blind should open to 0%.

I have checked and I cannot find the Tag where it puts the content of the message - ideally I send 0% from Node Red to MQTT Broker, Homey MQTT Client sees a new message and then the Homey Flow pushes the 0% to the Blind controller.

At the moment I would settle for if the Homey MQTT Broker sees anything then act on it.

But so far the MQTT Client does not see the message at all.

I have copied and pasted the MQTT field from Node Red to Homey to ensure no typos…

Anyone any ideas - would be much appreciated.

Making some progress

So the MQTT Client is working - any change in the MQTT Broker is sent to me as a message.

Now I just need to work out how to get Homey to take the content of ‘Message received form topic’ and stick it in the ‘Set position to %’ field.

Unfortunately the ‘Message received form topic’ is not available to the Aqara card - so how do I expose this to Aqara?

Ok it looks like the number 0 (zero) is coming in a String Variable

So next question is in Homey how do you convert a String ‘number’ to a number ‘number’?

You could use Better Logic Library and the BLL Expression to Number(stringnumber) as a tag. Looks like you have advanced flows enabled.

Just looking at that now :slight_smile:

Thanks!!

Do you have an example? maybe with a screenshot?

I’m using BLL in a flow described here:

Tip: the Flow tags that are created by a “When” card becomes available as soon as you make the connection to your “Then” card. This is not obvious because apparently, that is not needed for speaking or notifying! These actions seem to be aware without the connection.
(when you know it, it is obvious, if you don’t know it, you will not find it, so hopefully this will help people).

So when you want to use the “Message received from Topic” tag, connect the Card with the MQTT “Trigger when a message is received” to your card.
To convert a String value (I believe all MQTT values are Strings to start with), us a Logic card to "Calculate from “message received from topic”.

You can use this numerical value (tag) to update a “Power by the Hour” virtual device for instance.
Note: this only seems to be an issue with Advanced Flows (and perhaps only in a browser on a PC editing a Flow - never the less…)