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

Sending config msg works only with default topic #306

Closed
littleyoda opened this issue Aug 24, 2018 · 3 comments
Closed

Sending config msg works only with default topic #306

littleyoda opened this issue Aug 24, 2018 · 3 comments
Labels
problem Something isn't working

Comments

@littleyoda
Copy link

littleyoda commented Aug 24, 2018

mqtt:
  base_topic: IO/Device/Controll/zigbee2mqtt
  server: 'mqtt://localhost'

e.g. I want to change the debug level. I receive the following error in the log file:

zigbee2mqtt:debug 2018-8-24 20:38:14 Recieved mqtt message on topic 'IO/Device/Controll/zigbee2mqtt/bridge/config/log_level' with data 'debug'
zigbee2mqtt:warn 2018-8-24 20:38:14 Cannot handle MQTT config option 'zigbee2mqtt' with message 'debug'

I assume the following line in controller.js is the problem:

    handleMQTTMessageConfig(topic, message) {
        const option = topic.split('/')[3];

Instead of the fourth element, the last element would have to be used.

@littleyoda
Copy link
Author

littleyoda commented Aug 24, 2018

The following line in controller.js is also wrong:

   handleMQTTMessageDevice(topic, message, withPrefix) {
        const friendlyName = topic.split('/')[1];

@Koenkk
Copy link
Owner

Koenkk commented Aug 24, 2018

You are right! Would you mind making a PR for this?

@Koenkk Koenkk added the problem Something isn't working label Aug 24, 2018
sebastianheierhoff added a commit to sebastianheierhoff/zigbee2mqtt that referenced this issue Aug 31, 2018
Koenkk added a commit that referenced this issue Sep 3, 2018
Fix issue #306: Sending config msg works only with default topic
@littleyoda
Copy link
Author

thanks

wilmardo pushed a commit to wilmardo/zigbee2mqtt that referenced this issue Sep 26, 2019
wilmardo pushed a commit to wilmardo/zigbee2mqtt that referenced this issue Sep 26, 2019
Fix issue Koenkk#306: Sending config msg works only with default topic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants