# Can;t connect to Losant

**URL:** <https://forums.losant.com/t/can-t-connect-to-losant/1323>\
**Category:** Help\
**Created:** [December 16, 2018, 7:33pm UTC](https://forums.losant.com/t/can-t-connect-to-losant/1323 "2018-12-16T19:33:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslawo95](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mslawo95](https://forums.losant.com/u/mslawo95)\
**Post date:** [December 16, 2018, 7:33pm UTC](https://forums.losant.com/t/can-t-connect-to-losant/1323/1 "2018-12-16T19:33:50Z")

</div>

Hi, I am making a tutorial with Losant from there.

> **[Getting Started With the ESP8266 and DHT22 Sensor](https://www.losant.com/blog/getting-started-with-the-esp8266-and-dht22-sensor)**
>
> A tutorial on getting started with the ESP8266 NodeMCU and a DHT22 temperature and humidity sensor.

and all is all right but when my Controller wants toConnect to Losant, he can’t I have a MESSAGE FROM: Serial.println(device.mqttClient.state()); // HERE

Connecting to Losant…-1  
.-1  
.-1  
.-1  
.-1

I have mqqtClient STATE = -1 - What is this?

in Logs in dashboard in Losant Website I have only message:  
Device [RoomSensor1] authenticated with Losant  
Authentication succeeded  
ndz 16 gru 2018 20:32:08 GMT+01:00

Could you help me with that? Please

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [December 18, 2018, 7:27pm UTC](https://forums.losant.com/t/can-t-connect-to-losant/1323/2 "2018-12-18T19:27:07Z")

</div>

Sorry that we were not timely in responding to this post, but I responded to your new post here: [Can't connect to Losant MESSAGE: mqttClient.state -1](https://forums.losant.com/t/cant-connect-to-losant-message-mqttclient-state-1/1329/2)
