Web Based Interface for Arduino Controller

MyDoorOpener communications protocol questions and discussions.

Web Based Interface for Arduino Controller

Postby berwickgeek » Sat Mar 21, 2015 11:22 pm

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:

http://ipaddresshere/?password=a&relayPin=b

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?
berwickgeek
 
Posts: 5
Joined: Wed Dec 31, 2014 10:05 pm

Re: Web Based Interface for Arduino Controller

Postby support » Mon Mar 07, 2016 10:03 pm

That is correct. If you look at the Arduino code you will notice that we indeed use AES-256 de/encryption for the password. Indeed, the cypher key is that token that you receive and it changes on every single request. If you reverse the logic from the Arduino it should work. Someone already built a RaspberryPi port and it works, so it should for you too ...

Good luck with the project!
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm


Return to Communications Protocol



cron