MQTT, Not domoticz not sending

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
goblin
Posts: 31
Joined: Sunday 23 July 2017 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Haarlemmermeer
Contact:

MQTT, Not domoticz not sending

Post by goblin »

hello all,
I need some help with MQTT.
I have added a new ESP32 (espeasy ) with 4 inputs and 7 outputs to control light based on PIR's.
The inputs from the ESP are received in Domoticz but switching a lamp does not work,
I have tried to find it with MQTT Explorer but see only the working messages.
Changing pin on ESP will result in a change in Domoticz but pressing a button in Domoticz will not result in change on the ESP output.
I am using about 15 ESP8266/32 and 5 x sonoffs. and they all work but it seems i cannot add one (output)
I might have forgot a setting somewhere but can't find it.

version 2047.7

thanks
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: MQTT, Not domoticz not sending

Post by jvdz »

Are you sure you used MQTT for the ESP which is working toward domoticz? Could it be you are using HTTP JSON API calls instead?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
goblin
Posts: 31
Joined: Sunday 23 July 2017 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Haarlemmermeer
Contact:

Re: MQTT, Not domoticz not sending

Post by goblin »

most of the esp8266 are working with mqtt.
the strange thing is that it only works one way
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: MQTT, Not domoticz not sending

Post by jvdz »

So did you check the ESPeasy settings on the ESP with the issue, as it is you that needs to configure the domoticz host and protocol to use?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
wim57
Posts: 16
Joined: Monday 25 September 2017 12:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MQTT, Not domoticz not sending

Post by wim57 »

goblin wrote: Tuesday 26 November 2024 16:09 most of the esp8266 are working with mqtt.
the strange thing is that it only works one way
Did you use a device Domoticz MQTT Helper? That type of device can act on the MQTT messages on /domoticz/out.
I think this is the most easy way to implement this. As an alternative you can use Generic - MQTT import.
goblin
Posts: 31
Joined: Sunday 23 July 2017 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Haarlemmermeer
Contact:

Re: MQTT, Not domoticz not sending

Post by goblin »

yes Wim. i am using MQTT helper.
checked all settings multiple times and compared with working units.
What i don't understand is if the settings are incorrect then why does it work from esp to domotica but not from domoticz to esp.
it must be a Domoticz setting because i don't see the message in MQTT explorer if i send something fro domoticz to esp and see a message if i send something from esp to domoticz.
thanks
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: MQTT, Not domoticz not sending

Post by FireWizard »

Hello @goblin,

You wrote:
MQTT, Not domoticz not sending

Sorry, but this header is complete unclear, at least for me.

Can you answer a few questions?

From your ESP32/8266 devices you send the data with MQTT?
Can you see this data in MQTT Explorer?
Did you create virtual switches in Domoticz?
If so, can you control these switches by your MQTT command from the ESP?
If so, can you operate these switches in Domoticz and do you see a result in MQTT Explorer at the topic "domoticz/out"?
it must be a Domoticz setting because i don't see the message in MQTT explorer if i send something fro domoticz to esp and see a message if i send something from esp to domoticz.
Which message do you expect to see?
How do you send it? Operating the virtual switch? Or is it the MQTT input, that should do it?

If it is that last one, you might want to look at viewtopic.php?t=37052&hilit=mqtt+loop

Regards
goblin
Posts: 31
Joined: Sunday 23 July 2017 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Haarlemmermeer
Contact:

Re: MQTT, Not domoticz not sending

Post by goblin »

hello all
found the problem.
you need to select setup in "hardware" MQTT client gateway with lan interface"
then select the needed devices and save.
i cannot remember doing this in previous versions.
but never to old to learn.

thanks
goblin
Posts: 31
Joined: Sunday 23 July 2017 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Haarlemmermeer
Contact:

Re: MQTT, Not domoticz not sending

Post by goblin »

Firewizard,
i am using "mqtt explorer" to verify MQTT messages between devices and i can see other MQTT messages from other devices in "mqtt explorer".
i could see in "mqtt explorer" messages send by the ESP but not send from Domoticz.

your questions
yes
yes
yes
yes
no

all is working now due to the changes i have made in the "hardware, mqtt, setup"

regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest