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 Split topic data into 2 single topics #260

Closed
xoseperez opened this issue Oct 29, 2017 · 4 comments
Closed

MQTT Split topic data into 2 single topics #260

xoseperez opened this issue Oct 29, 2017 · 4 comments
Labels
enhancement New feature or request minor mqtt

Comments

@xoseperez
Copy link
Owner

Originally reported by: scrand (Bitbucket: scrand, GitHub: scrand)


Hello,
there is actually one topic called data.

But this "data" topic contains two "messages":

#!text

Susicka POW/data	{"app":"ESPURNA","version":"1.9.7","host":"Susicka POW","ip":"192.168.1.56","mac":"5C:CF:7F:B4:9B:A4","rssi":"-67","uptime":"4200","freeheap":"18680","relay/0":"1","vcc":"3434","time":"2017/10/29 17:49:00"}
#!text

Susicka POW/data	{"current":"0.05","apparent":"11","energy_delta":"336.000","energy_total":"14734.000","power":"5","reactive":"9","voltage":"219","factor":"45.45","time":"2017/10/29 17:50:00","host":"Susicka POW","ip":"192.168.1.56"}

Could you split it into two single topics?

It makes me a trouble in Home Assistant. Because, If I want to capture power value and there was actually received message without this value it shows nothing.

@xoseperez
Copy link
Owner Author

Same as before. "Use JSON payload" groups messages into the "data" topic. Messages are grouped together depending on when they are sent.

@xoseperez
Copy link
Owner Author

Did it work?

@xoseperez
Copy link
Owner Author

Original comment by scrand (Bitbucket: scrand, GitHub: scrand):


Hi, I am actually not able to test it. My Sonoff device is broken. But thank you for your advice.

@xoseperez
Copy link
Owner Author

Original comment by scrand (Bitbucket: scrand, GitHub: scrand):


@xoseperez Thanks, I tried it today and it works! :)

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

No branches or pull requests

1 participant