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 user #368

Closed
xoseperez opened this issue Jan 5, 2018 · 12 comments
Closed

mqtt user #368

xoseperez opened this issue Jan 5, 2018 · 12 comments
Labels
enhancement New feature or request mqtt

Comments

@xoseperez
Copy link
Owner

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


How to set mqtt user same with clientid?

@xoseperez
Copy link
Owner Author

Client ID is set automatically by the firmware. Why do you want it to be the same as the user?

@xoseperez
Copy link
Owner Author

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


I changed AsyncMqttClient.cpp file

  //sprintf(_generatedClientId, "esp8266%06x", ESP.getChipId());
  sprintf(_generatedClientId, "%06x", ESP.getChipId());
  _clientId = _generatedClientId;

Node server uses a logic: client id and mqtt user must be the same for esp devices.

So i tried to make both the same, my last 12 hours passed with uploads but couldn't success.

@xoseperez
Copy link
Owner Author

I would not change the AsyncMqttClient library, you can use the setClientId method to set it from the ESPurna firmware code, look for the setServer call in mqtt.ino and try adding the following line just after it:

if ((strlen(_mqtt_user) > 0) _mqtt.setClientId(_mqtt_user);

@xoseperez
Copy link
Owner Author

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


ok thanks a lot.

@xoseperez
Copy link
Owner Author

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


Please can you confirm holding 10 secs to son off dual main button restores to factory settings because i can't...
v1.10.1

@xoseperez
Copy link
Owner Author

If you have a DUAL version 1 then no, it won't work since the button is managed by the secondary microcontroller. It will work for the Dual R2.

@xoseperez
Copy link
Owner Author

I have added an option in web UI to specify the client_id. It's now in the dev branch.

@xoseperez
Copy link
Owner Author

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


yes i have v1.

is there any alternative, how to restore factory settings dual v1?

@xoseperez
Copy link
Owner Author

You can telnet to it and write "factory.reset" to remove all settings.

@xoseperez
Copy link
Owner Author

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


Thanks a lot.

@xoseperez
Copy link
Owner Author

Released with 1.11.4

@xoseperez
Copy link
Owner Author

Removing milestone: 1.11.4 (automated comment)

@xoseperez xoseperez added trivial mqtt enhancement New feature or request labels Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mqtt
Projects
None yet
Development

No branches or pull requests

1 participant