Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arduino-esp8266-alexa-multiple-wemo-switch #49

Open
Ade9000 opened this issue Apr 25, 2018 · 7 comments
Open

arduino-esp8266-alexa-multiple-wemo-switch #49

Ade9000 opened this issue Apr 25, 2018 · 7 comments

Comments

@Ade9000
Copy link

Ade9000 commented Apr 25, 2018

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
Copy link

Ynot1 commented Apr 25, 2018

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

@Ade9000
Copy link
Author

Ade9000 commented Apr 26, 2018 via email

@Ynot1
Copy link

Ynot1 commented Apr 26, 2018

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.

@Ade9000
Copy link
Author

Ade9000 commented Apr 26, 2018 via email

@Ade9000
Copy link
Author

Ade9000 commented Apr 26, 2018 via email

@Ynot1
Copy link

Ynot1 commented Apr 27, 2018

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.

@Ade9000
Copy link
Author

Ade9000 commented Apr 27, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants