Hello
I am trying to build a new device based on ESP8266 and an example from https://www.losant.com/blog/getting-started-with-the-esp8266-and-dht22-sensor.
- My device does not succeed to connect to Losant (I have made plenty of devices in the past that did, I generated and used the ID, access key & secret - twice.)
- The ArduinoJson library has updated since someone wrote this example and lots of stuff did not compile - I had to modify quite a bit just for that.
tried solutions in:
Unable to connect Losant Plattform using ESP8266 module
no change.
Can anyone help please?
Thanks
Uri
Hi @Uri_Bear,
A similar question was asked on another forum post, you can find the response here. Please let me know if you have any further questions
Thanks!
Julia
Thanks, I already did this…
but for the second part: my ESP is trying to connect to the Losant cloud and failing… any thoughts there?
Uri
Hi @Uri_Bear,
Great, glad to hear you’ve tried the suggested resolution steps! One of our engineers is currently testing this on similar hardware and was able to replicate a similar issue, I will reach out with any results as soon as possible. In the meantime, don’t hesitate to reach out if you run into any further questions.
Thanks,
Julia
Thanks. I am glad its not just me! waiting for your input!
Uri
Hi @Uri_Bear,
A quick update that we are attempting to isolate the issue at the moment, I will follow up as soon as I learn more.
Thanks!
Julia
Hi @Uri_Bear,
I just got an update on this, and it seems a bit of trial and error may be involved; these devices can be a bit pesky at times! One of our engineers was operating on a similar device and the following details replicate his process to connecting this device.
Stable library versions for the device:
- ArduinoJson - 5.13.5, updating to 6 requires changes to the Losant library, which are currently in progress
- ESP8266Wifi - 2.4.2, after this version you cannot connect securely,
connectSecure()
- PubSubClient - 2.6 is fine, 2.7 is an improvement but you will need to set MQTT_MAX_PACKET_SIZE to 256 in the header file
With the correct versions of these libraries, you would then need to reset the device and the Arduino IDE. To do this, you’ll first unplug the device. Next, quit and restart the Arduino IDE. Once the IDE has restarted, plug in your device again to power it on. The test device was able to successfully connect after following these steps, but I am very interested to hear your results.
Keep in mind, the engineering team is working at the moment to fix our libraries and make this more seamless, so I will follow up when those updates are released. In the meantime, we want to get you successfully connected and are eagerly looking forward to your results.
Please let me know if you have any further questions.
Thanks so much!
Julia
Many thanks Julia and the Losant team!
I am currently out of the office and do not have access to my device.
I will update you soon.
Thanks again
Uri
Hi
I cannot find how to change the version of ESP8266Wifi. all others are per your recommendation.
Uri
Hi @Uri_Bear,
I might recommend holding off on this for the moment. There is currently a pull request open to update the Losant library, you can find it here in Github, which will comparatively require little configuration.
I will update you when this has been merged.
Thanks!
Julia
Thanks.
What versions of the other libraries work with this one? latest?
Uri
Hi
Any update on this subject?
Thanks
Uri
Hi @Uri_Bear,
The engineer team has successfully merged and updated the Losant library to support ArduinoJson 6. You can also find an updated ESP8266 example here. Thank you so much for your patience, and please let me know if you run into any issues or if I can answer any further questions!
Have a great day,
Julia
Thank you Julia & Team.
Which MQTT.h / library should I use? Currently failing on this.
Can you please list ALL needed installs/libs?
Thanks
Uri
Hi @Uri_Bear,
A list of dependencies can be found within the ReadMe for the Losant MQTT Client library, found here. Please let me know if you have further questions!
Thanks,
Julia
It’s working again, Thanks a million!
Uri
Hi Julia!
Thanks a lot to you and your team for helping me out on the ESP8266! Hurray to all!
I have now started dabbing into LoRa and the ESP32, specifically the TTGO LORA ESP32 with display board
https://www.tindie.com/products/ttgo/lilygor-ttgo-lora-v13/
https://github.com/LilyGO/TTGO-LORA32/tree/LilyGO-V1.3-868
I followed the ESP32 coding, some (A little old) from Losant at:
https://www.losant.com/blog/connecting-the-esp32-to-the-internet-with-arduino-and-losant
https://www.losant.com/blog/getting-started-with-esp32-and-platformio
I tried compiling the latest example you sent me, and am failing compilation on
BearSSL::WiFiClientSecure wifiClient;
What is Bear SSL and this double column notation? Can your engineers help me connect to Losant once again?
Many thanks
Uri