Closed PatPux closed 3 years ago
Oh, in the given example this is missing:
#include <SinricPro.h>
#include <SinricProSwitch.h>
Thanks for pointing that out. This will be fixed in next release.
Which typo error do you mean, and what about "rationalised vector..." ?
Edit: Ok, found the folder name typo
Edit2: The rationalization was about commenting out a few lines. It can be easily done this way:
std::vector<RelayInfo> relays = {
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 1", D1},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 2", D2} /*,
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 3", D3},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 4", D4},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 5", D5},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 6", D6},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 7", D7},
{"5fxxxxxxxxxxxxxxxxxxxxxx", "Relay 8", D8} */};
The vector above contains only Relay1 and Relay2 (the rest is commented out)
Thanks. Im not a programmer and I do my projects based on the work cleverer people like you do and I just tinker with the code. Right- your commenting out is neater. I was getting a compile error because simply uncommenting the lines I wanted meant I missed the final };
Issue fixed in release 2.9.0
I had to do a couple things to make this sketch compile and run. Also noted a typo in Folder name Declared "SinricPro.h" and "SinricProSwitch.h" Rationalised Vector array to ease uncommenting process. Added relavent note.
Only tried it a single relay at present, ran out of free Devices!
Patrick MultiRelay_advance Issue 1.docx