Hi, I am completely new to Open Hub but have some experience with domoticz
so here is my question, Espeasy can have more than one input or output but it can only
subscribe to 1 MQTT Topic, with domoticz we had the IDX / VAR for each I/O
to identify the I/O and be able to work with only one topic.
I am sure that as a beginner I must be missing something, but I am able
to bind 1 switch and work well, but when I add another they go off and on at the same time.
When using MQTT you create Generic MQTT Things. A Generic MQTT Thing has zero or more Channels. You create each Channel. When you create the Channel you define the stateTopic (i.e. subscription) and the commandTopic (i.e. publish). Configure the commandTopic to the 1 MQTT topic.
If you have multiple ESPEasy devices, you need to configure them to each subscribe to a different topic.
You’ve provided absolutely zero details about what you’ve done to try to configure this so We are all just making wild ass guesses as to how to help.
as i already said i totally new to this , i have no problem with multiple devices ,
as every device can subscribe to a different Topic , my problem is with a single device that has more than 1 output connected to it but can subscribe to 1 topic only .
1 Channel subscribes to sensor 1’s topic and leave the commandTopic blank
2 Channel subscribes to sensor 2’s topic and leave the commandTopic blank
3 Channel subscribes to the status topic for the actuator and publishes to the command topic
If you have multiple actuators that subscribe to only one topic, well than the answer to your question will probably be on the ESPEasy forum and not here. You will need to figure out what the message needs to look like that openHAB publishes to that the command goes to the right actuator. But that’s outside of OH, that’s an ESPEasy thing.
I don’t know ESP Easy Mega but it looks like it subscribes to all topics that match “%sysname%” which I’m sure that %sysname%" is configured somewhere else. So where do you map the actual topic to an actuator? The answer to that will I’m sure be in the ESP Easy Mega docs.
I thought it was just : testing1/# in reality the # symbol represents the
switch Name & switch Value which be customized for every I/O and
sensor on EspEasy.
That makes a different topic for every device connected to Esp .
So that was it Hope this thread helps someone with the same problem