This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wifi signalK display
#10
(2018-12-09, 01:58 AM)cepicscepics Wrote: the esp connect to my home wifi but the serial monitor say:

Connecting to MyHomeWiFi
............
WiFi connected
IP address:
***.***.*.**
Attempting MQTT connection...Client ID: WIFI-Display-0029DCD7
failed, rc=5 try again in 5 seconds

Did you check what state 5 means? https://pubsubclient.knolleary.net/api.html#state

It is 
Code:
MQTT_CONNECT_UNAUTHORIZED
 - the client was not authorized to connect

First I would try to make sure you can connect to the broker from your computer with for example mosquitto_sub.

I suspect you have OpenPlotter's own Mqtt server configured with a username/password and your client is trying to connect to that.

Try changing the SK mqtt gateway's port something else, like 11883 and adjust your esp code accordingly. There should be also error messages in your RPi's syslog complaining about the gateway's mqtt broker (Mosca) not starting, if there is already the OpenPlotter-managed mqtt broker occupying the port 1883.
Reply


Messages In This Thread
wifi signalK display - by cepicscepics - 2018-11-26, 11:43 AM
RE: wifi signalK display - by PaddyB - 2018-11-26, 01:56 PM
RE: wifi signalK display - by cepicscepics - 2018-11-26, 02:03 PM
wifi signalK display - by tkurki - 2018-11-27, 08:47 AM
RE: wifi signalK display - by cepicscepics - 2018-12-02, 01:53 AM
RE: wifi signalK display - by tkurki - 2018-12-02, 05:56 PM
RE: wifi signalK display - by cepicscepics - 2018-12-02, 07:04 PM
RE: wifi signalK display - by JeroenAdam - 2018-12-08, 09:23 PM
RE: wifi signalK display - by cepicscepics - 2018-12-09, 01:58 AM
RE: wifi signalK display - by tkurki - 2018-12-09, 08:46 AM
RE: wifi signalK display - by cepicscepics - 2018-12-09, 12:04 PM
RE: wifi signalK display - by cepicscepics - 2018-12-09, 06:19 PM
RE: wifi signalK display - by cepicscepics - 2018-12-10, 09:41 AM
RE: wifi signalK display - by cepicscepics - 2018-12-11, 10:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)