Will Photon support outbound HTTPS?


#1

Been using Cores for a year - love 'em in my projects. Waiting for my Photons to ship (hope that’s soon!). In the Core, you couldn’t do outbound HTTPS calls because of RAM limitations (HTTPS is only available to/from the Spark Cloud). Given the larger RAM in the Photon (128KB), does this mean the Firmware will now support outbound HTTPS to other sites?

I am aware of the recent (awesome) new feature around Webhooks. Even so… I do not think this replaces the desire to just directly make HTTPS calls from the device. Any input/info on this? Or maybe you think Webhooks are the one true way to handle this, even on the Photon? Didn’t see this Q asked elsewhere on the Community, so apologies if it was buried somewhere else.

Related, I am pushing data from my Core/Photon to a local Raspberry Pi node.js server on my LAN, but I want to secure that communication. I am aware of this proposed solution (http://community.spark.io/t/aes-encryption-demo-and-secure-tcpclient-usage/6092/7), but I’d rather just make an HTTPS call to my Raspberry Pi server and save myself the hackery on encrypting the TCP socket.

Thanks!
Joe


HTTPS POST to mySQL on localhost
#2

Hi @jdr,

Good question! As far as I know, HTTPS requests should be possible on the Photon, but it’s not something I’ve tried personally yet!

Thanks,
David


#3

Any update here? I should be receiving my pre-ordered Photons in the next few weeks and I’m trying to plan out a whole chunk of additional work around my IoT projects. It’s basically a choice between waiting for a Photon that can just do real HTTPS calls to a server on my LAN (handling all the TLS/cert stuff in RAM), or, if that’s not gonna be possible, I need to write my own TCP client/server that does a light version of key exchange/signing.

I assume when customers have Photons, Spark will need to “fork” or label its documentation so that it’s clear what firmware capabilities apply to original Cores (I have 2 of these) and what new functionality is available only on Photons (I am receiving 2 of these soon). Updating your TCP Client documentation would be included in this, I’d assume.

Joe


#4

Bump to this question! HTTPS would be so cool!


#5

I am trying HTTPS on the Photon I snagged at the MF but it does not work. It could be that I am doing something wrong in building the request.
So, for the request to http://www.google.com, I use the TCPClient object and
client.connect(server, 80) and everything works fine.

But when I replace port 80 with 443 it does not work.
Curl to https://www.google.com works fine from a shell on my Mac.

Help!

AJ


#6

HI @aj8uppal!

Just in case you’re not aware, HTTPS is a lot more than just a change of port - it must run over secure sockets (SSL/TLS) at the transport layer. At present secure sockets is not available on the photon although we would very much like it to be supported in a future release.

When support is available, it’s not something that will happen automatically, but must be specifically requested by your code, such as by changing TCPClient to SSLClient or similar.

I hope that helps!
mat.


#7

+1 on HTTPS Support!


#8

Thanks Mat. I figured I was doing something wrong.

Native HTTPS support would be great. I am using tempoiq and it does not allow HTTP posts, so I need to insert an intermediary (am using a Raspberry Pi), but it would be great if I can eliminate the extra device. I guess I should look into Webhook in the interim but it looks like there are posting limitations.

AJ


#9

Sorry to nag. But any update on this?

If not, I understand that there is a secure socket connection made from the Photon to the Particle Cloud. Any way to modify that to connect to another server?

I’m in a similar boat to AJ. I can send HTTP posts all day long, but my servers require HTTPS. And being able to send directly to them without the intermediary would be bloody spectacular. Especially since it rather sounds like something the hardware can handle?

Thanks!

–anthony


#10

+1 again for https support.

At the SolidCon event in SF, I saw the WolfSSL booth - would such a solution work ? It said it was for IOT…

thx,

A.J.


#11

I don’t see SSL support happening anytime soon. It’s very complicated, very CPU/memory intensive, and needed by very few people. The photon is a new device and still has a lot of bugs to fix and basic features to implement.

If you need it desperately maybe you should try to make it yourself? I can’t find anything for the Arduino (bad sign). This topic describes some of the issues…



#12

+1 for HTTPS support… Parse.com requires HTTPS connection and they have an Arduino SDK (which unfortunatly I cant get working on the Photon because the IDE doesnt jump or show which file contains the errors)


#13

@byroncoetsee, have you considered using webhooks? They were designed specifically to give Particle devices access to HTTPS sites.


#14

I have and am using webhooks… Problem with that is the data goes from Photon -> Server -> Parse -> Server -> Photon. Rather long winded and the data is very time sensitive. Also, webhooks return a Bool (I think?) when I need full on data…


#15

It’s our intent that the photon will eventually support outbound HTTPS. TLS is part of WICED and I believe they have an example HTTPS app.


HTTPS POST to mySQL on localhost
#16

Understand this is on the roadmap - that’s great! Just want to share my use-case: authenticating to a guest wi-fi portal. I plan to use SYSTEM_MODE(SEMI_AUTOMATIC); and a quick POST to an HTTPS gateway url prior to Spark.connect(); If it works this gives me more places for my internet gadgets to live. Performance here isn’t critical; even if it took a handful of seconds for the TLS handshake, it will only happen at startup. This simply isn’t something that can be achieved with a webhook!


#17

+1 for HTTPS support. It’s value is getting more and more important in the IoT world and very soon it would become a differentiation tool. Many purchase decisions will be heavily influenced by the availability of this feature. No joking.


#18

+1 here as well.


#19

Hey All,

We decided to take a stab at it, and made a version of httpsclient. Have a look and most importantly feel free to ask questions and contribute.

Pinging people on this thread here: @jdr @mdma @aj8uppal @frlobo @JumpMaster @peekay123 @ScruffR


#20

Can you provide a simple example to get a page from an https server?