-
Notifications
You must be signed in to change notification settings - Fork 307
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 $localip gets truncated #309
Comments
try changing the file BootNormal.cpp on line 193: snprintf(localIpStr, MAX_IP_STRING_LENGTH - 1, "%d.%d.%d.%d", localIp[0], localIp[1], localIp[2], localIp[3]); to snprintf(localIpStr, MAX_IP_STRING_LENGTH + 1, "%d.%d.%d.%d", localIp[0], localIp[1], localIp[2], localIp[3]); If it works, you should also changed it BootConfig.cpp. But if this fix works, I would think the bug is that the IP gets truncated by 2 characters. |
Thank you for your reply and suggestion! One thing that changed too is the device id – is gets extended by 1 symbol (for some reason): |
The default device ID is actually the MAC address and hence is 12 characters long. It was a bug: see #296 |
Feel free to make a pull request 👍 |
Fixed with the above PR, thanks! |
Having an issue with Homie v2.0.0 MQTT $localip
it gets truncated in the last symbol when published in MQTT:
e.g. instead of "192.168.1.128" it gets "192.168.1.12", tested this on two nodes but with the same results.
The text was updated successfully, but these errors were encountered: