HTTPS requests #7657
Replies: 1 comment
-
Posted at 2017-05-18 by @allObjects ...it's all there... w/ Espruino-Wifi, for example, or any other Espruino plus a wifi breakout board... Posted at 2017-05-18 by AlessioBacin Hi, sorry maybe i wasn't that clear: Posted at 2017-05-18 by AlessioBacin By the way i'm using ESP12E microprocessor... Posted at 2017-05-18 by @allObjects ESP12E is just an ESP8266 and you may run out of memory because the ESP code and the Espruino w/ application fight for the same RAM... And that's not the only issue you will run into, because ESP code has priority and may mess up your app running in Espruino JS. One processor is just not good enough to handle all at the same time, especially since ESP code behaves like bit banger in communication respects. Running your app on a native Espruino board and using the ESP for wifi - as Espruino-Wifi does and any Espruino boartd with any ESP8266 board do - gives you enough power and independence for the app and the wifi communication/ I assume you consulted Espruino on ESP8266 and the related forum conversations that will get you started with Espruino on your current device. Posted at 2017-05-19 by Wilberforce @alessiobacin You could use a http to https proxy service as a helper. The ESP32 build has enough resources, so that https:// works. Posted at 2017-05-19 by @allObjects ...there you go, thanks @wilberforce... @alessiobacin, just get a Espruino board that has a real ARM3 or 4 on it and use your ESP12E as plain wifi stack device. Talk to it with serial as supported in any Espruino and this way you get your https connection and programming in JavaScript. 'Alternative' is using LUA on the ESP12E... but you could stick to Arduino then... Posted at 2017-05-19 by AlessioBacin Wow guys... thanks a lot. Now i got i very clearer idea on how all works. Posted at 2017-05-19 by AlessioBacin Sorry, a you can see i'm not an experianced technician... so i gotta ask: if i decide to stick for esp32 how do implement the code as there is no https library in espruino? Posted at 2017-05-19 by @allObjects There may be many things to be factored into your decision... price is one, anther one is what is how you power your devices, yet another one is your wifi infrastructure. esp32 - Espruino on ESP32 is a multi-core (duo core) processor and has also more memory resources. About how far the port of Espruino - that includes all the support incl HTTPS - has been achieved, you have to track down the conversations in the forum... I know that @wilberforce, @jumjum, @Kolban (and others) have worked on its guts, and I have nowhere read that SSL would not be supported. From conversation Writing an SSL HTTPS web server ... I read that connecting with https to a server in the net is there, but not running a https listening server on ESP32. Looking up some more info about SLL and ESP8266, I came across this nice youtube and follow-up presentation. It talks about the space issue creating functions involved in SSL communication. Going to a single, defined server gives some relieve, and may be an option to go with less resource... Posted at 2017-05-19 by Wilberforce https://github.com/espruino/Espruino/blob/master/targets/esp32/tests/get_web_page_https.js Posted at 2017-05-19 by Wilberforce Also http://forum.espruino.com/conversations/291259/#comment13227899 Which discusses http://httptohttps.xyz/ Posted at 2017-05-20 by MrTimcakes Does anyone actually use HttpToHttps.xyz? Just that the domain expires on Jun 12, 2017, wondering if I should renew it. @MaBecker Do you use it? Posted at 2017-05-20 by @MaBecker Hi @ducky not now, can we find your code on github? Posted at 2017-05-20 by AlessioBacin wow Ducky of course i'll use in these days... and i guess i'tll be usefull for many peaple doing this stuff. Posted at 2017-05-20 by AlessioBacin if you share the and don't want to give the service anymore i would like to contribute somehow... with one server for example... Posted at 2017-05-20 by MrTimcakes Alright, I've put the code on GitHub whether or not I decide to keep the domain. Posted at 2017-05-21 by Wilberforce Is the main espruino site php? Perhaps this could be put up as a sub-domain... Http2https.espruino.com ? Posted at 2017-05-21 by @MaBecker Cool - Thanks Ducky! Posted at 2017-05-21 by AlessioBacin yeah.. would be cool to put it as an espruino service or test service Posted at 2017-05-21 by user77204 @ducky I'm using it! Posted at 2017-05-22 by hungryforcodes +1 Yes that would be cool to have it as a service here. :) Another way -- though weird, but cheap, would be to compile Espruino for the 8266 to get TLS going, and then use a second one to communicate with it using the first one to do the HTTPS requests (either via WiFi or the UART). Considering their price it would still be under $5 ... though could suck up alot of your time - so be prepared :P . The Espruino WiFi that Gordon sells sounds like a nice solution that "just works", if you're doing one off production. Posted at 2017-05-22 by hungryforcodes @ducky -- Thanks! I always wondered what the code was -- it should be easy for any of us to throw this up on Heroku -- I think for a couple years now their free their account allows running a dyno for 24 hours....or AWS if you're more dedicated :P Posted at 2017-05-23 by @gfwilliams @ducky do you have any stats of server logs showing how much it has been used? I guess from the IP addresses you should get a pretty good idea how many people are looking at doing things with it.
Well yes, but what you're actually saying is: "I'm too cheap to actually pay you any money for an Espruino board that does exactly what I want, so will you work for free to make me a free service so that I can avoid buying your hardware and can instead use something else?" You can see how that's not desperately compelling :) Posted at 2017-05-23 by hungryforcodes
@gfwilliams - I guess it depends on your revenue model. You already have Patreon (from I presume non "Official Board" owners even), and there could be other services you provide that are not part of the open source distro that would be cheap, but doable ($1 a month), etc, a custom firmware builder for commercial use, whatever. Anyways, off topic, but somewhat relevant. @ducky +1 for renewing the domain btw, if that wasn't obvious. :P I didn't use it much, because I thought it would go "away", but if I know it will be around for a year or two I will for sure. Posted at 2017-05-23 by @gfwilliams It is true, yes - I do have Patreon support from non-Espruino board owners (although most supporters do appear to have Espruino boards). I really like the idea of http2https especially for testing, but I'd say it's a bit dodgy for anything remotely production-worthy. I'm looking seriously at the idea of creating a proper web service that could provide a secure connection to ESP8266 and other boards - for the IDE as well as data. If I can be sure of the HTTPS server being connected to I can restrict packet sizes and can reduce the memory needed for the TLS implementation a huge amount. However I'm still unsure if enough people would pay for it to make it worthwhile. I guess an obvious solution would be to come up with another KickStarter campaign and see if enough people were willing to commit to a year's worth of service. But I'm totally sidetracking this thread - so if there's interest we should discuss it elsewhere. Posted at 2017-05-24 by MrTimcakes @gfwilliams Alas, I don't. I run it from a server machine at home, I never really set-up logging, I just checked through the logs I do have but because of the way I have it setup I couldn't determine what was for the HttpToHttps service, I don't imagine it was a whole lot though. What I imagine I'll do is continue the service, but under a subdomain of my personal domain which I plan to keep for the foreseeable future as I don't want to renew the xyz domain, as my graphics card just died. Isn't student life fun xD. The new domain will be something like "HTH.MrTimcakes.com" or "HttpToHttps.MrTimcakes.com" once I get round to moving it. Posted at 2017-05-25 by @gfwilliams Yes, that sounds like a good plan - just as easy to use, and at least it's not costing you anything :) I guess you could stick something on HttpToHttps.com asking if anyone uses it, so you see what the level of interest is? Very cool that it's all being served off a local machine though - I never trusted my connection enough to do anything like that :) Posted at 2017-06-25 by MrTimcakes httptohttps is now live again at HttpToHttps.MrTimcakes.com Posted at 2017-06-26 by @gfwilliams Thanks! Posted at 2024-07-15 by LukVolvo I want to make a PUT HTTPS request with the Espruino WiFi module. How can I do this? Require("https") is not recognised. Can someone give me an example code? Posted at 2024-07-22 by @gfwilliams Sorry for the delay - you should be able to do it just by putting
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-05-18 by AlessioBacin
Hi all,
i got to connect to a https server to get some data to espruino...
Is there anyway to do this now or will it be implemented somehow?
THanks
Beta Was this translation helpful? Give feedback.
All reactions