MQTT publishing a 'log'

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

MQTT publishing a 'log'

#1 Post by dynamicdave » 19 Dec 2020, 11:31

Just noticed that from ESP Easy release 221016 onwards MQTT (OpenHAB) seems to be publishing what looks like a log and the topic-name has not resolved the system variables.
My rule-set works fine with releases up to this date, but not after it.
I'm using ESP_Easy_mega_20201022_normal_ESP8266_4M1M on a Wemos D1 Mini, although ESP_Easy_mega_20201130_normal_ESP8266_4M1M shows this behaviour as well.
Attachments
Screen Shot 12-19-20 at 11.34 AM.JPG
Screen Shot 12-19-20 at 11.34 AM.JPG (37.95 KiB) Viewed 8325 times
Last edited by dynamicdave on 19 Dec 2020, 12:35, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MQTT publishing a 'log'

#2 Post by TD-er » 19 Dec 2020, 11:38

That probably has to do with the GPIO command being moved to be an internal command.
Previously the GPIO commands were part of a task and a task has a taskname and valname.
However as it is now a global command it no longer has a taskname and a valname and thus it cannot be substituded.

Can you give a bit more info on what is no longer working here?
It looks like you're receiving a GPIO command from the broker and the reply is now sent back to the source (this part is fixed in the latest code, not sure if it is present in a nightly build)
But sending a reply on a command should not break functionality, so I wonder what may be the cause of things no longer working in your setup.

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: MQTT publishing a 'log'

#3 Post by dynamicdave » 19 Dec 2020, 11:52

I'm sending a value 0 or 1 from Node-RED to this topic... homeDevice/command/gpio/12

The subscribe setting in ESP Easy for Home Assistant (openHab) is.... homeDevice/command/#

I can send an event command e.g. homeDevice/command/cmd to trigger one of rules - and that works fine.

So what's the new format for the global command to operate a gpio pin via MQTT ??

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: MQTT publishing a 'log'

#4 Post by dynamicdave » 19 Dec 2020, 12:48

I've tried with ESP_Easy_mega_20201130_normal_ESP8266_4M1M and can operate the GPIO pins by sending 0 or 1 to the topic.... homeDevice/command/gpio/12

In fact I can control the GPIO pins with... homeDevice/command/cmd/gpio/12 as well !!!

Which is the correct format?

It's the single string "Ok" that's messing up detecting the type of MQTT message received in Node-RED.
Top part is in json format, lower part is just a piece of text.
Screen Shot 12-19-20 at 11.43 AM.JPG
Screen Shot 12-19-20 at 11.43 AM.JPG (59.35 KiB) Viewed 8324 times
As a workaround I've found if I clear the Controller Publish entry it sorts out my issue (as I'm using a Rule to do the publishing).
Attachments
Screen Shot 12-19-20 at 11.52 AM.JPG
Screen Shot 12-19-20 at 11.52 AM.JPG (37.67 KiB) Viewed 8323 times
Last edited by dynamicdave on 19 Dec 2020, 13:05, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MQTT publishing a 'log'

#5 Post by TD-er » 19 Dec 2020, 13:02

Makes sense that there is apparently a check on the publish topic to see if it is empty.
This is one of the latest test builds I made for another pull request: https://www.dropbox.com/s/zczns6kcqa9og ... 7.zip?dl=0
Can you test to see if is still a problem with that build?

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: MQTT publishing a 'log'

#6 Post by dynamicdave » 19 Dec 2020, 13:22

This is the version I think is the latest in the link you sent me.
It doesn't work - it still sends a log.
Screen Shot 12-19-20 at 12.19 PM.JPG
Screen Shot 12-19-20 at 12.19 PM.JPG (118.18 KiB) Viewed 8315 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MQTT publishing a 'log'

#7 Post by TD-er » 19 Dec 2020, 13:23

Thanks, will have a look at it.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MQTT publishing a 'log'

#8 Post by TD-er » 19 Dec 2020, 13:26

Oh and please let me know if you find anything else not working, as I was planning to make a new build today.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 25 guests