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

Connect to Domoticz over MQTT #443

Open
djpostka opened this issue May 15, 2021 · 11 comments
Open

Connect to Domoticz over MQTT #443

djpostka opened this issue May 15, 2021 · 11 comments

Comments

@djpostka
Copy link

Hello,

I would like to connect the esp to Domoticz via MQTT, however, Domoticz works with IDX (identifiers) but the configuration of the ESP does not allow me to enter an IDX.
Do you have a solution? Thank you.

@matjack1
Copy link
Collaborator

matjack1 commented Mar 9, 2022

hey @djpostka can you please give me a bit more info on what you would like to do? What should an IDX be? Do you need an extra field on the MQTT message?

@marktn
Copy link

marktn commented Mar 22, 2022

I think he wants to send the RIFD status to Domoticz. Something i also want.

I have a MQTT server and node red. I am not a mqtt expert, but it looks that the RIFD can not send mqtt commands?
Looks like the same question, #404

@djpostka
Copy link
Author

hey @djpostka can you please give me a bit more info on what you would like to do? What should an IDX be? Do you need an extra field on the MQTT message?

Hello,

Yeah, Domoticz user an extra fiels named "IDX" for the device identification on "Dummy device/virtual device". The domoticez docs explain this: https://www.domoticz.com/wiki/MQTT

@matjack1
Copy link
Collaborator

thank you @djpostka, I see now. Yes, we would need to add an IDX field for each relay (at least, maybe also for the leds, buttons?) so that you can configure them in esp-rfid and use them in the MQTT messages, right?

I think there needs to be a new page in the settings where you set all the IDXs for all the things that you want to expose and then if the Domoticz integration is enabled, pass the extra IDX in all the MQTT calls.

I'm not familiar with Domoticz and I'm not interested in developing it myself, but I can offer code reviews and suggestions if someone wants to implement it.

@marktn
Copy link

marktn commented Mar 24, 2022

thank you @djpostka, I see now. Yes, we would need to add an IDX field for each relay (at least, maybe also for the leds, buttons?) so that you can configure them in esp-rfid and use them in the MQTT messages, right?

I think there needs to be a new page in the settings where you set all the IDXs for all the things that you want to expose and then if the Domoticz integration is enabled, pass the extra IDX in all the MQTT calls.

I'm not familiar with Domoticz and I'm not interested in developing it myself, but I can offer code reviews and suggestions if someone wants to implement it.

Yes that would be nice! Maybe a idx for each user. The you can see in domoticz who is logging in, and use it for switching lights, warnings, alarm etc..
Idx for Status door sensor, and idx for opening a door.

Is it possible to let the mqtt send json to node red?

@matjack1
Copy link
Collaborator

Is it possible to let the mqtt send json to node red?

Sure! It's already sending MQTT messages on a lot of actions, it's Node Red that should read those messages and do something accordingly.

@marktn
Copy link

marktn commented Mar 31, 2022

Is it possible to let the mqtt send json to node red?

Sure! It's already sending MQTT messages on a lot of actions, it's Node Red that should read those messages and do something accordingly.

I didn't get it at work. MQTT is working with nodered and domoticz, so that works fine.

@matjack1
Copy link
Collaborator

Did you configure the MQTT broker correctly? Are you listening to the right MQTT topics?

You should find here: https://github.com/esprfid/esp-rfid/blob/dev/README-ADDON.md the documentation around the MQTT topics that are used, OK? Let me know how it goes!

@marktn
Copy link

marktn commented Apr 2, 2022

Hi,

I think it is correct, maybe i am missing something...
In the MQTT explorer and serial it all looks fine.

Update:, when i delete the topic in the MQTT explorer it gives an error.

MQTT-Explorer_2022-04-02_12-17-32

firefox_2022-04-02_12-18-48

firefox_2022-04-02_12-22-10

firefox_2022-04-02_17-54-51

@matjack1
Copy link
Collaborator

matjack1 commented Apr 5, 2022

Hey @marktn I think we are hijacking this issue to something else from the Domoticz integration? :)

Maybe you can open a separate issue where we continue discussing about the Nodered integration. While we are on the topic though, can you help me reproduce your setup so that I can try understanding better how this works? I'm not familiar with Nodered, sorry.

@marktn
Copy link

marktn commented Apr 7, 2022

Yes and no. When MQTT to Node-red works, it can send the information to Domoticz.
I will make a seperate issue! MQTT to node-red.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants