Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15346

Last Will and Testament using PubSubClient.h and AWS IoT, ESP8266

$
0
0

I am using PubSubClient.h to connect with AWS IoT and it worked fine with shadow topics with the following line

while (!virtual_thing.connect(virtual_thing_name.c_str())){
}

when I tried to do the same for Last Will and Testament topic with the following line , it failed with -4 MQTT state

while (!virtual_thing.connect(virtual_thing_name.c_str(), NULL, NULL, "theEndTopic", 1, true, "offline")){
}

exactly, where is the issue lying ??

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 15346

Trending Articles