I've been trying to come up with a way to build a web interface to be able to activate the relay switch in the same was as the DoorOpenner app on iOS does.
I can hit the URL of the arduino controller and can see the state of the magnetic switches and that all works fine. I can see the "CyberXXXXXX" string that gets return as the challenge token also. Looking through code I believe that to get the relay to fire based on a URL I need to send a GET request to the web server on the arduino controller in the following format:
However a appears to need to be encrypted prior to being sent. I'm just not sure how I should encrypt the password so I'm looking for assistance anyone can offer. I don't need to code to do it, just the logic.
I'm guessing it:
- Calls the url and gets the token
- Encrypts with that token using AES256
However it looks as though the token I initially read is different by the time it gets passed in for decryption so my approach is never going to work.
Any suggestions or ideas?