kakopappa/arduino-esp8266-alexa-multiple-wemo-switch

arduino-esp8266-alexa-multiple-wemo-switch

Ade9000 opened this issue · 7 comments

hi, i am trying to either add a new switch or rename an existing switch, however whatever i try, the code refuses to compile, and jut returns an undefined reference to the item i m trying to add/alter!

i dont have issues with switching the devices already added, i just want to customise it to my requirements.

please any help would be greatly received, and stop me from actually going insane!!

thank you in advance

Ynot1 commented

Have you tried editing and recompiling something simple, like blink?

Ynot1 commented

Let's leave Adding a new device till later...

Starting with the code you pull from git, and USING THE FIND REPLACE FUCTION, (not your eye) swap "light" to "plug" or something else. Save, recompile.

Rinse and respeat making small changes each time along the way.

Ynot1 commented

Assuming the original code you would search for "kitchen" and every time you find it, copy the whole line you found it on to the line immediately below and change your copied line to whatever you want the new device you want to be called.
As you have swapped kitchen to something else already , you will probably be searching for whatever you changed kitchen light to.
This will add about 6 lines of code to the top part of the code. The other change you should make is to tweak the local port number for your new device to 83 in your copy of line 45.

Copy the whole chunk of each of the two 4 line functions around the middle of the code ( lines 77-89 in the original) that mention kitchen several times, and again, change kitchen to whatever every time you find it in your copy. Also change switch 2 to 3 in your copied functions.

The code as released isn't going to actually close any relays of course, it's up to you to define which processor pins you want to use for that, make them outputs, and then put digital write commands into those on and off functions.

Good luck.