# Connecting Tasmota Sonoff R2

**URL:** <https://community.hivemq.com/t/connecting-tasmota-sonoff-r2/1613>\
**Category:** HiveMQ Cloud\
**Created:** [November 19, 2022, 6:07pm UTC](https://community.hivemq.com/t/connecting-tasmota-sonoff-r2/1613 "2022-11-19T18:07:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avh1992](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@avh1992](https://community.hivemq.com/u/avh1992)\
**Post date:** [November 19, 2022, 6:07pm UTC](https://community.hivemq.com/t/connecting-tasmota-sonoff-r2/1613/1 "2022-11-19T18:07:33Z")

</div>

Hello,

I am a beginner still but have experience with Tasmota, though not with Hive as a broker.

I have a SOnoff and I have flashed it with tasmota. I have created a cluster on hive cloud. The cluster is running.

In the MQTT Host i have entered the cluster URL, I have changed the port, I have created MQTT Credentials and entered them in the MQTT section of tasmota. I connects successfully to wifi.

 ![imagen](https://canada1.discourse-cdn.com/flex035/uploads/hivemq1/original/1X/8c86b35e2aea723c2ad04f4aefee79ad3253bc93.png)

Yet i keep getting this in the console and i get no connection. The connection failed it says.  
_19:21:38.834 MQT: Connect failed to ed5d9bf6e50f421da799b3eefce576b2.s2.eu.hivemq.cloud:8883, rc -4. Retry in 120 sec_

When i test the MQTT credentials i added in the websocket it works.

Some people say in the MQTT host it has to be an IP¨address not a URL. Does anyone have any ideas?

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [November 22, 2022, 12:43pm UTC](https://community.hivemq.com/t/connecting-tasmota-sonoff-r2/1613/2 "2022-11-22T12:43:41Z")

</div>

Hi @avh1992 ,

To connect with HiveMQ Cloud broker, your device must support and use the TLS-SNI extension ([how to check for SNI](https://community.hivemq.com/t/client-is-not-authorized-to-connect/856/37)) and your device might need the server CA file (find the download link [here](https://community.hivemq.com/t/frequently-asked-questions/514)).

I hope this helps.

Best,  
Dasha from HiveMQ team
