I got stuck with the example code (Control LEDs over the 'net).
I have tried many things over the last 24 hours but still no results.
Here’s a overview of the problems I have encountered:
1. HTML file doesn’t load the form but shows just the plain text.
Yes, I did add my own ID and Token taken from the Build section
Many times indeed. Also after reset Token, And restart to factory settings.
2. When copying the API into the browser I get the following error:
{ “ok”: false, “error”: “Variable not found” }
Any help, tips or tricks would be much appropriated.
Thanks
If so, then yes, that doesn't work. To trigger functions you'd need to make a POST request, whereas your browser normally only makes GET requests. That's why it's reporting it didn't find a variable, since those use the GET requests with the same syntax.
Hi Moors,
Thanks for your reply.
And that from another Limburger!!
Tried it again, same (no) result.
I’ve copied the API address from within this piece of code (after ,form action=") into the browser.
With my personal ID and token. Again same (no) results.
Any other suggestions I should look at?
Im sure at one point you will ask me about my copy paste skills with regards to my ID and Token but Im sure I got that part sorted!
When you say "no result", what exactly do you mean? Is the website displaying something incorrectly, or do are you not able to toggle the LED?
Do you see this at least?
The same reason as above; you're doing a GET request whereas you should be making a POST request instead.
You can't POST in a browser by just typing in a URL--it doesn't work that way.
You can POST from curl using the right syntax or you can POST from a web page form with a form action or by using AJAX, but not by typing or cutting and pasting into the URL box.
The browser simple slows the code itself (like in a text editor) and doesn’t load the form as you showed me above.
Which of course results into not being able to toggle the LED.
I guess we’re going into the copy paste aspect of my skills…
Thanks,
ps: Can I see your singing Tesla Coil anywhere online? Sounds amazing!
Hi @bko
Thanks for your reply but as I got rather desperate last night and start trying everything
Im aware that this isn’t the way forward. The issue is within the html code as it doesnt load proper in the browser.
thanks, j
Sounds like it. Could you use the code I posted above, put that into a text file, swap the credentials, and then make sure to save it as a .html file?
There's no reason why it shouldn't work, other than human error or a crappy browser.
In regards to the Tesla coil, yup you can over here.