I have the the ESP8266 development board shown.(tried to attache a photo but it would not attached, the Board is a Wemos D1 clone) I have created Adafruit and IFTTT accounts and set everything up as instructed. Instructions to Google Home are reflected in the Adafruit IO feeds but not happens with my physical connections. only one of the two blue LEDs is lit. I was using the code in the attached .ino file:
When I upload the sketch it connects to the wifi, gives me an IP address and MQTT connects! But then nothing on the board at all.
Do you get the same as the window in the instructions if you flip your switch in the dashboard? Have you linked your IFTT account as per instructions?
The serial monitor prints Got: ON or Got: OFF for each toggle if I ask Google and if I flip the switch in the dashboard, which proves that the IFTTT account is linked.
tasmod:
Just a thought, in your block settings for the toggle switch are your button labels as per example?
They should be 0 and 1 as these are the characters passed. They are passed as characters "0" and "1" which the 'atoi' converts to numbers 0 and 1
If you used ON/OFF instead they will evaluate to 0 as that isn't what is expected by the 'atoi' line.
I sussed that out earlier and did not have time to post a reply to you. When I realised what the atom was doing, I changed the data that google sends to 0 and 1.
Many thanks for taking the time to post, it is much appreciated on this steep learning curve.
You may be able to help further, if you don't mind? In the sketch the pins used are 6,5,2,and 1, Relay1 works on pin D12/MSIO/D6, Relay2 works on pin D13/SCK/D5, relay3 works on pin D14/SDA and Relay4 does not work on any of the pins. Any ideas on what other pins are controllable from the ESP8266? Photo of board attached.
It turns out Google does not like "four" said in a Scottish accent. It would appear that Pin D1 translates to Pin D15/SCL. Is there a list anywhere to tell you which pins map to which?