Thanks Pete, tried the display widget (within the app only)… nothing displays. Thankfully this is not the in use project but a second test set up, so no issues testing . I went back and installed the blynk 1.0 version of the code and virtual LEDs work properly, so its does not appear to be a hardware or wiring issue. The only difference from the original programming is the removal of the
as well as timer.run in the void loop
these caused errors during verification, so I removed them… plus I thought I read these were no longer needed in 2.0
So how do you think that the control_LEDs() function - which is the only part of the code that writes to the LED widget - is going to be triggered?
Of course it’s still necessary to trigger a function that contains code which needs to be executed, and a timer is the required way to do that in this case.
Arduino: 1.8.19 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
C:\Users\Donna\Documents\Arduino\Valve_Project__01.18.22__No_Timer-Edgent_ESP32\Valve_Project__01.18.22__No_Timer-Edgent_ESP32.ino: In function 'void setup()':
Valve_Project__01.18.22__No_Timer-Edgent_ESP32:68:3: error: 'timer' was not declared in this scope
timer.setInterval(100,control_LEDs);
^
C:\Users\Donna\Documents\Arduino\Valve_Project__01.18.22__No_Timer-Edgent_ESP32\Valve_Project__01.18.22__No_Timer-Edgent_ESP32.ino: In function 'void loop()':
Valve_Project__01.18.22__No_Timer-Edgent_ESP32:98:5: error: 'timer' was not declared in this scope
timer.run();
^
Multiple libraries were found for "BlynkSimpleEsp32_SSL.h"
Used: C:\Users\Donna\Documents\Arduino\libraries\blynk-library-master
Not used: C:\Users\Donna\Documents\Arduino\libraries\Blynk
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Donna\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
'timer' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Moving to Node-Red is quite a big step, as the best approach is to use MQTT to communicate between Node-Red and your devices, and run no Blynk code on your devices at all.
You could go for an intermediate solution, which simply uses Node-Red as the tool to provide Alexa integration by using commands from Alexa to change the state of Blynk virtual pins.
You could do this on a Windows machine as a trial, but longer term you’d be better running a Raspberry Pi to host Node-Red.
Adding Sinric or FauxmoESP to your sketch is an alternative approach, but isn’t something I’ve ever tried.
OK, I ended up trying Voiceflow instead and have it working in the online creator for Alexa, under my blink 1.0 project. Now I’m trying to make this work with Blynk Iot … but I get an “Invalid token.” message whether I ping directly or via the voiceflow interface . The token I’m using is from the ‘device info’ tab of blynk console under FIRMWARE CONFIGURATION … I assume this is the correct token … so maybe voiceflow wont work with blynk 2.0
Any suggestions ?
As usual … Thanks Pete !! Looks like I had the whole string wrong !
For anyone else looking for the correct strings for GET and Update value API if your using Voiceflow dot com (you get 2 free projects) to provide voice commands to your project via Amazon’s Alexa.
You may see these in your research, but, these are all the wrong strings for Blynk IoT (aka Blynk 2.0)
Where the region(in my case ny3) depends on the region that displays in the bottom right corner of your browser, when you’re on the ‘Blynk console’ web page for your projects.