[SOLVED] No response from Switch


I setup a switch in the dashboard. When I turn the switch on and off I am not getting a response on the serial monitor

IP address:
Attempting MQTT connection…connected
Subscribed to:

As you can see I have a MQTT connection

void setup() {
// put your setup code here, to run once:
client.setDebug(true); // Pass a true or false bool value to activate debug messages
client.wifiConnection(WIFINAME, WIFIPASS);
client.ubidotsSubscribe(“roof-switch”,“switch”); //Insert the dataSource and Variable’s Labels

void loop() {
// put your main code here, to run repeatedly:
client.ubidotsSubscribe(“roof=switch”,“switch”); //Insert the dataSource and Variable’s Labels


Greetings @flightman49 , I see an error inside your loop function, in this line:

client.ubidotsSubscribe("roof=switch","switch"); //Insert the dataSource and Variable's Labels

you have as device label “roof=switch”, you cannot use special characters, your device label should be something like “roof-switch”. Keep in mind that your device and variable to subscribe must have been created previously at Ubidots.



I have to be more careful. The switch works now

Thank You