Ahhh I see!
So basic does not handle on/off by url as a standard its not hard coded in so to speak you actually must first run the program which will allow for it ...
So with the example code.
Code: Select all msgbranch [mybranch]
print "You can send msgs to the esp and do things based on accessing a URL"
wait
[mybranch]
MyReturnMsg = "Not a valid msg received"
msgget "pin" pinNo
msgget "stat" pinStatus
msgget "action" pinAction
if pinAction == "po" then gosub [po.pin]
if pinAction == "pi" then gosub [pi.pin]
if pinAction == "pwo" then gosub [pwo.pin]
if pinAction == "pwi" then gosub [pwi.pin]
if pinAction == "ai" then gosub [ai.pin]
print "DOne with retrn code"
msgreturn MyReturnMsg
wait
[po.pin]
po pinNo pinStatus
MyReturnMsg = "good"
return
[pi.pin]
pi pinNo MyReturnMsg
return
[pwo.pin]
pwo pinNo pinStatus
MyReturnMsg = "good"
return
[pi.pin]
pwi pinNo MyReturnMsg
return
[ai.pin]
ai MyReturnMsg
return
I could modify like so...
Code: Select all if pinAction == "po-password" then gosub [po.pin]
if pinAction == "pi-password" then gosub [pi.pin]
if pinAction == "pwo-password" then gosub [pwo.pin]
if pinAction == "pwi-password" then gosub [pwi.pin]
if pinAction == "ai-password" then gosub [ai.pin]
This way in order to preform any pin action the action would have to contain the action po-password.
What I don't understand is exactly where the code is doing any reading of any sort ...
Is there a buffer setup somewhere that automatically reads all requests that I am just not seeing.
I am curious how this buffer is handling data coming into it. Is there prevention for say overflow or execution of data ?
How does it take a URL request and know that the URL code pertains to it without some of the functions being hard coded in ?
I am not seeing anywhere within the code how the data is being scanned.
Sorry if I am not making since to you but I am a bit concerned that people will indeed like to find node setups and tinker with them as it is human nature while it is not my goal to provide smartcard strength security (which I know is still somehow breakable) it is my goal to deter the average tech savvy individual from doing so or at least doing enough to where your interest would have to lie explicitly in pen testing in order to fool and turn my lights on or off so to speak.
Short term goal:
Use esp8266 basic to control a single device via a web page with simple on/off and possibly allow for weekly timers possibly 5 per day for every 7 days.
Long term goal:
Have several esp8266 devices controllable by a single web page that also allows for weekly timers viola home automation.
Back burner goal: Possibly make a wireless button or group of buttons that would work as keystrokes for any device connected to it essentially preform keyboard enumeration and set whatever keys you wish the gpio to serve as or possibly a string of keys like entering a password with the push of a button so you'll never forget it. I could think of many applications for this.
Other goals at this point are unknown although I will likely think of more applications I have seen some pretty neat lighting effects who knows maybe an XMAS lights display etc IDK I suppose the clock on kickstarter was a neat concept simple yet new and effective.
Warning TL:DR coming up lol!
Personal Motivation Behind My goals no need to read:
Turning switches on and off if you spent just 2 minutes walking around turning switches on and off since you were born on average this would equate to 40 days of your life!!!
I know a lot of people may think that it is lazy etc... But once life winds down and you get to the golden years if you observe people would give anything to live another 40 days and if I were to guess a good portion of those days would be when the quality of living is good or good enough at least 38 of them. Another good portion of them would be when you have motivation, youth, etc... likely 25-28 of those days depending on the individual.
Home automation could essentially provide you with a priceless commodity which is more time to live less time to preform menial tasks more or less I really see the reason for smart homes and the want once I started crunching numbers. Automation in a factory has been done for ages it is time that the working class had affordable automation of their own I feel so that they can leverage automation to buy them more time through out the course of a day as well as it seems the plate just keeps getting fuller for families and they have less and less time to function as a family because more and more of their time is focused on money as a means to an end. Estimated to be in the 70% + of energy expenditure of a persons life during their waking hours is money... So that leaves you 30% of your energy to preform menial tasks and function as a family. If technology can eliminate menial tasks at home at a fairly low cost we could give people some of the leverage back that was craftily taken away over the last 45-60 years...