Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT issues #3080

Closed
TungstenE2 opened this issue May 20, 2020 · 2 comments
Closed

MQTT issues #3080

TungstenE2 opened this issue May 20, 2020 · 2 comments
Labels
Category: Controller Related to interaction with other platforms Type: Discussion Open ended discussion (compared to specific question)

Comments

@TungstenE2
Copy link
Contributor

TungstenE2 commented May 20, 2020

Hi all,

why is setting up MQTT on ESPeasy so complicated compared to Tasmota?

In Tasmota I was done in 2 Min.
In ESPeasy there are several MQTT options in Protocol with several settings.

I choose HomeAssistant MQTT, but even after several attemts I am only able to retrieve data in FHEM as MQTT2_device, but having same Topic structure as in Tasmota or sending MQTT commands to ESPeasy is just not working for me, after several attempts.

Any advice how to solve this?

Tasmota:
/SmartHome/Steckdosen/%topic%/%prefix%/
in FHEM:
/SmartHome/Steckdosen/Sonoff-S20-01/tele/STATE:.* { json2nameValue($EVENT) }

ESPeasy:
/SmartHome/%tskname%/%valname%/
in FHEM:
ESP_Easy5:/SmartHome/Klimaanlage/settings/:.* { json2nameValue($EVENT) }

e.g.: Why does ESPeasy set the CID in front of the topic?
Why does ESPeays use different namings? I thought 'topic' is a standard convention in MQTT naming?

Never really paid attention, but now I find 'tskname' for the devices in the list of devices also confusing. 'Task' in List of Devices should be renamed to 'ID' and %tskname% should be %devicename%.

thx

@TD-er
Copy link
Member

TD-er commented May 21, 2020

Well I agree on the part that the "Devices" tab in the web UI is confusing.

Just a summary of the names used in ESPEasy:

  • Plugin: A piece of code in ESPEasy to interact with a specific piece of hardware.
  • Task: A selected instance of a specific plugin.
  • Controller: Interface to send sample values from a task to a specific target (e.g. Domoticz MQTT)

So a task has a plugin selected and 0 .. 3 controllers to which the output should be sent.

This means the name %tskname% is correct here.
For example if you have a BME280 sensor.
This is supported by the BME280 plugin.
So you make a task for it by selecting the BME280 plugin and for example name your task "bme". (or "garden" or whatever name you give it)
Then %tskname% will be "bme" for this one when it sends data to the controller.

So I don't agree the naming should be changed into "device" instead of "task", as you can have multiple tasks all using an instance of the same plugin.
"device" is then a bit too generic and not clear whether it reflects to what we now call "plugin" or "task".

About the host name shown in FHEM.
As far as I know, we don't put the hostname in the topic, but the hostname is used as a unique MQTT client ID. So maybe FHEM does put the MQTT client ID in front of the topic?

For MQTT we have a number of standard names to describe things and as far as I know , we only use the common names for it.
So a topic is also what we call a topic.
You subscribe to a topic to get messages published to it and you can publish yourself to a topic.

I don't know what Tasmota supports for MQTT.
In ESPEasy, a controller is to push data out (publish) and to get data in, we have the MQTT import plugin.
There is a small number of exceptions to this. For a few plugins (e.g. P001_switch) there is support is some controllers to also receive data from the MQTT controller.
But in general, a controller -as we now have implemented it- only outputs data.

@TD-er TD-er added Category: Controller Related to interaction with other platforms Type: Discussion Open ended discussion (compared to specific question) labels May 21, 2020
@TD-er
Copy link
Member

TD-er commented Apr 1, 2022

Not sure if this is still an issue, Please let me know if it still is.
For now, I'll close the issue

@TD-er TD-er closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Controller Related to interaction with other platforms Type: Discussion Open ended discussion (compared to specific question)
Projects
None yet
Development

No branches or pull requests

2 participants