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

Add per device topics and json payload to MQTT #85

Open
crazyserver opened this issue Jul 7, 2023 · 2 comments
Open

Add per device topics and json payload to MQTT #85

crazyserver opened this issue Jul 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@crazyserver
Copy link
Contributor

Instead of just using one topic for send and one for receive, use a full topic tree based on protocol and device ID.

@cpainchaud cpainchaud added the enhancement New feature or request label Jul 10, 2023
@crazyserver
Copy link
Contributor Author

Hi @cpainchaud,

I'd like to know if it would be great to implement that. I have something to start with that. I creates a topic for each device when a signal is received.

Example:
Topic: rflink/msg/RTS/1234ab
Payload: {code: '0000',cmd: 'DOWN'}

Instead of:
Topic: rflink/msg
Payload: 20;7F;RTS;ID=1234ab;CODE=0000;CMD=DOWN;

This way it uses standard mqtt model of passing data. My current version emits both the "plain" and the json approach and it's only used for received signals.

Pros: When using HomeAssistant, or any other MQTT broker you can listen to topics by device and then read the json having all the params separately.

We can also include some RFLink code in the json.

Cheers,

Pau

@cpainchaud
Copy link
Owner

Hi @crazyserver,

I don't have the time to work on it but feel free to submit a patch and I will review&merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants