Espert Espresso Lite V2.0 MQTT Issues - Need Help

Discussion on how to get started with various type of IoT projects

Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby Stuart » Wed Dec 06, 2017 10:35 pm

Hi Guru,

I purchased starter kids espresso lite v2. I am unable to display Temperature and Humidity reading from Message box as shown on the tutorial given. I tried most of the tutorials and it works fine but MQTT failed. My OLED displayed Espert-1271940 and I used this ID as my Board ID Espert/1271940/# over tutorial given in http://learn.espressolite.com/example-sketches

I had tried the following tutorial:
0110 ButtonToPushMessage - success / Ok

0130 MQTT-Button - Failed / not Ok

0140 MQTT-DHT - Failed / not Ok

0150 MQTT-LED - Failed / not Ok

I really wish anyone who could help me to solve rectify what is going wrong? I am numb now....

Thanks a lot...
Stuart
Freshie
 
Posts: 7
Joined: Wed Dec 06, 2017 9:02 pm

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby bengchet » Thu Dec 07, 2017 10:25 am

Hi,

A few pictures will be help in troubleshooting (screenshot on MQTT websocket panel, OLED led, arduino serial monitor).

Just to make sure your topic is in correct spelling, should be ESPert/1271940/#, not Espert/1271940/#.

To double confirm, you can verify it with Arduino sketch.

For example _0130_MQTT_Button sketch, look for the line:

Code: Select all
String outTopic = "ESPert/" + String(espert.info.getChipId()) + "/Button";


espert.info.getChipId() is your board ID , in your case it is 1271940. In MQTT websocket panel, if you subscribe ESPert/1271940/#, you get the message related to any topics which starts with ESPert/1271940/.

Hope it helps!
bengchet
Moderator
 
Posts: 221
Joined: Tue Aug 25, 2015 8:29 am

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby Stuart » Thu Dec 07, 2017 8:04 pm

Hello BengChet,

Thank you so much for your helpful heart. Very very happy seeing someone replied.

Here are the screenshot on MQTT websocket panel, OLED led, arduino serial monitor attached.

I tried many times but still cannot. Really dont know what went wrong. I tested the temperature and humidity on other examples tutorial no problem and ok. I tried in my home and office also cannot and I did not block any services from both of my home and office routers.

:( :?
Attachments
MQTT issue1.jpg
MQTT issue 2.jpg
Stuart
Freshie
 
Posts: 7
Joined: Wed Dec 06, 2017 9:02 pm

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby bengchet » Fri Dec 08, 2017 7:03 am

Hi,

From the Arduino serial monitor, seems like your espresso lite cannot connect to MQTT server, this explains whole thing can't work.

To verify this, you can change another SSID and password for your espresso lite (example your phone wifi hotspot) and test how it goes. If espresso lite is successfully connected to MQTT server, the serial monitor should shows something like "MQTT: connected" or "OutTopic:...", else it means fail to connect to MQTT server.

You can change SSID and password using smartconfig or AP mode, follow the guide here. Before you do so, make sure you have added this line to your sketch.

Code: Select all
void loop() {
  espert.loop(); <-- make sure you add this line

  if (espert.mqtt.connect()) {
    espert.println("MQTT: Connected");
    espert.println("MQTT: Out Topic " + outTopic);
  }

...


This allows you to press USER button (GPIO13) long time to switch to smartconfig mode or AP mode.
bengchet
Moderator
 
Posts: 221
Joined: Tue Aug 25, 2015 8:29 am

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby Stuart » Sun Dec 10, 2017 11:58 am

Hi,

I am still not able to connect to MQTT Server after all possible modification here and there. But I tested over Thingspeak, it works fine. I cant get it to work on mqtt.espert.io and don't really know what happen.

Thanks and best regards,

Stuart
Attachments
problem.jpg
Stuart
Freshie
 
Posts: 7
Joined: Wed Dec 06, 2017 9:02 pm

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby bengchet » Mon Dec 11, 2017 10:22 am

Hi,

I have tested with mqtt.espert.io and I can't connect too. You can try another mqtt server like broker.hivemq.com or other mqtt server. You only need to make some modifications.

In example sketch, modify this line.
Code: Select all
const char* mqtt_server = "broker.hivemq.com";


In mqtt websocket panel, just change Host to broker.hivemq.com then connect.

Hope it helps.
bengchet
Moderator
 
Posts: 221
Joined: Tue Aug 25, 2015 8:29 am

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby Stuart » Sun Dec 17, 2017 8:21 pm

Hi,

Thanks a lot for your advise and help. I finally got it to work.

I tried to enable authentication username and password from the MQTT local server but I failed to login because I didnt manage to find any coding login thru my wireless device. Any clue....? :roll:


Thanks and best regards,

stuart
Stuart
Freshie
 
Posts: 7
Joined: Wed Dec 06, 2017 9:02 pm

Re: Espert Espresso Lite V2.0 MQTT Issues - Need Help

Postby bengchet » Mon Dec 18, 2017 2:21 pm

Hi,

If you are using open source MQTT servers like broker.hivemq.com, authentication is not provided.

If you wish for MQTT services which is more secure, you will need to find third party service which provides MQTT with authentication. Usually you will need to create an account (may be there is some billing plan), the information of MQTT such as host, port, username and password will be provided.
bengchet
Moderator
 
Posts: 221
Joined: Tue Aug 25, 2015 8:29 am


Return to Getting Started - IoT

Who is online

Users browsing this forum: No registered users and 1 guest