MqttPublish doesn't seem to work with variables

Jim Peduto's Avatar Topic Author
User User
  • Posts: 79
  • Thanks: 0

Set up MyServer 6- Drivers not displaying

2 years 7 months ago
#188
Thank you. it eas the second one. resolved.

Please Log in or Create an account to join the conversation.

bowlingbeeg's Avatar
User User
  • Posts: 248
  • Thanks: 33

Re: MqttPublish doesn't seem to work with variables

2 years 6 months ago - 2 years 6 months ago
#1557
I'm finding that MqttPublish doesn't seem to work when you use a variable for the data.  Here is an example that looks like it works from the logs but nothing gets published to the topic in Mqtt:

Macro|
SetVariable|test_bjv~atv!
MqttPublish|theater/source~{{test_bjv}}!

But just calling MqttPublish like this does work:

Macro|
MqttPublish|theater/source~atv!

Here are the logs for the failure case:
12/03/2024 00:21:23.21 · DEBUG · Server.doCommand - {{server_selectedmacro}} from dashboard-fx-l367
12/03/2024 00:21:23.21 · DEBUG · Server.doCommand - macro.test
12/03/2024 00:21:23.21 · DEBUG · Server.doCommand - SetVariable|test_bjv~atv from dashboard-fx-l367
12/03/2024 00:21:23.21 · DEBUG · Server.doCommand - MqttPublish|theater/source~{{test_bjv}} from dashboard-fx-l367
12/03/2024 00:21:23.21 · DEBUG · Server.doCommand - MqttPublish|theater/source~atv
Last edit: 2 years 6 months ago by bowlingbeeg.

Please Log in or Create an account to join the conversation.

davep's Avatar
Admin Admin
  • Posts: 371
  • Thanks: 98

Re: MqttPublish doesn't seem to work with variables

2 years 6 months ago
#1561
Wow, great find! You are indeed correct! This issue is resolved in the next myServer update.
The following user(s) said Thank You: bowlingbeeg

Please Log in or Create an account to join the conversation.

Re: MqttPublish doesn't seem to work with variables

2 years 6 months ago
#1670
publishing works great with variables. I am having an issue with subscribing,  When I try to subscribe to anything  I get client session is unknown.

Please Log in or Create an account to join the conversation.

Time to create page: 0.276 seconds