Page 1 of 1

MQTT publishing a 'log'

Posted: 19 Dec 2020, 11:31
by dynamicdave
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.

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 11:38
by TD-er
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.

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 11:52
by dynamicdave
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 ??

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 12:48
by dynamicdave
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 11170 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).

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 13:02
by TD-er
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?

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 13:22
by dynamicdave
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 11161 times

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 13:23
by TD-er
Thanks, will have a look at it.

Re: MQTT publishing a 'log'

Posted: 19 Dec 2020, 13:26
by TD-er
Oh and please let me know if you find anything else not working, as I was planning to make a new build today.