Webpages on Photon / SoftAP

@Moors7 Ok sounds like getting the credentials in is better than I realized.

I only need to graph data remotely every 10 mins, anything higher than that is not
needed in my case to get a good idea of sensor readings in a room.

I tried sending the data faster which was troublesome and I had to use a faster http client for it to work
at 1 min intervals (on the core).
I dont need to store/graph the “live” data, just have the option to view it in the case of
trying to find something with the sensor and wandering around (like a Geiger counter).

Even if I did get very fast interval sending to work, it would become a problem for the server in time
with dozens of devices reporting every second. I’m planning to try one of the 1.3" OLED screens anyway to
see how that looks since they are only $5, but it would have been nice to use the local
cellphone screen to view it on a webpage.

"The free Nest app lets you set up your Nest products" ~Nest

So, for Nest it's okay to ask people to download an app, but for Particle it's not?
This is also Nest:

If you don’t have a supported phone or tablet, you won’t be able to connect your Nest Protect to your Wi-Fi network nor associate it with your Nest Account.

The similarities aren't by accident, the Nest Protect and the Photon actually use the same wifi chip.

Tell that to the guys who sold their company for $3.2B :wink:

Enough about Nest, their products are probably awesome and all that. But so is the Photon. If I'm not mistaken (okay, I know they are), they are working on getting softAP to work through a browser. What this would mean is that you'd go to an (externally) hosted webpage, and follow the steps to set up your Photon. You wouldn't have to host it yourself. Now, I think we can agree that that's more convenient than having to host it from the photon itself?

You can still create a user app in which you host a webpage through which you can manage credentials. I just don't feel like that should be put in the system firmware, wasting useful space/resources.


@Rockvole

A 10 minute resolution should be highly doable! 1 minute intervals as well (I'm currently doing that with a Core). I personally like the SSEs for sending the data in JSON format. I then have that picked up by my server which parses and stores it. Seems to work really well. You can send SSEs at a rate of 1p/s, so your resolution could go up accordingly.

If you want to do any serious representation of data on a webpage, you should really not want to do that on the device itself. If you use SSEs you don't need anything other than a device which can access the web. If you go to this page in a browser, it shows you your SSEs with having to host anything, anywhere: https://api.particle.io/v1/devices/events?access_token=ACCESS_TOKEN

Depending on your server and the amount of devices, you should be okay. Node.js is actually very good at handling a lot of concurrent events, and is generally being used for scenarios like that.

With a bit of HTML/CSS/javascript, you should be able to make a rather decent webpage which will allow you to monitor your device. For that reason, amongst others, I've set up this page. You can easily see the functions/variables/status of your devices and can trigger them accordingly. Feel free to use it if it's helpful :wink:

1 Like

@Moors7 - I tried to add the WiFi connections to a device from a different user but it didnt work for me.
Steps :

  1. Clear the Wifi details of a Photon holding down mode button 10 secs
  2. Check that its not online
  3. Create an account with my wifes phone
  4. Put Photon into listening mode
  5. Try finding it from Photon App on my wifes phone
  6. No devices found
  7. Back to my own app on my own phone and add the wifi details fine

So I couldnt add the Wifi details or even find the device from a separate user / phone.
Is there a different way I should be doing this or is it for IPhone only ?


Also, I dont mean it will be part of the firmware :

I didnt imagine this would be custom firmware, but it would be installed much like tinker is now. Then the user can choose to flash their own firmware as before or link in the Particle template if they want those features.

It would be installed at the same time as Tinker, but would be an optional include for users who want those features.

That's strange, it worked perfectly for me. Could you try it again with your phone, but with your wife's account, to rule out issues with the phone simply being incompatible. Likewise, trying it on her phone with your account should be interesting as well. There isn't really a reason why it shouldn't work.


In that case, go for it! I'd be interested to see how it works out :smile:

I tried :

  1. Unclaiming Photon from my account
  2. Factory reset the Photon
  3. Add Photon from my wifes phone
  4. Shows up in list fine on her phone.

Looks like my Wifes phone works fine with Photons.
I dont think testing if it works from the same phone with a different account is a valid test
since if it works it wont tell me if its really working, but that perhaps there is a bug in the app.

Okay, I’ve just installed the particle app on my iPad (fresh install, has never been on there before). I then erased the wifi credentials on the Photon. I used the iPad to go through the steps, using a different account. My Photon is now connected, so I’d argue that it seems to work.

My mistake! I completely agree that downloading an app is not too high of an expectation if the app is simple enough to use and user friendly. I’ll have to look more into what Particle/the community is doing to make a custom version for a specific company. Always been impressed by Particle so I’m sure it will work out nicely. Running a local http server to connect though, would likely be a nightmare for someone without any experience to do unless you packaged it somehow.

Thanks for the response! Definitely eye-opening since I was under the assumption that Nest does a browser based wifi setup.

1 Like

ESP8266 is going to set user/market expectations, as well as Nest.

Here’s one load for the chip that supports a web interface for config via their version of SoftAP.

Just providing another datapoint.

2 Likes

@AndyW, that is a great example. However, as mentioned, there is a 512KB flash requirement for the code. This would be great on the P1 but not so much on the Photon/P0. The single setup screen may be feasible on the Photon/P1 and I believe that’s being worked on.

Sure - my point was a broad one about market expectations, not about technical specs.

@AndyW - neat that other IOT devices are supporting this.

I think long term for Particle the effort to add these pages is less than the effort to write a Spark app for windows phone and blackberry (and if Samsung have their way Tizen will become popular too).

1 Like

Again, if I’m not mistaken on how it all works, a neater solution is in the works. SoftAP configuration through a browser, using javascript. In this scenario, you’d simply go to a page like setup.particle.io, and that would allow you to configure your device. No local HTTP servers, no additional software. You’d merely have to be able to navigate to that page. Hard-/software agnostic :smile:

I’m confused how you could configure the WiFi to a device from an external website ? Surely the device has to be able to reach the external website ? i.e. needs to know the connection details to your router ?

I'm not sure, just making a guess here: I suspect the website will allow you to load the required javascript to your browser, after which you'll be able to use that to configure the device. Not sure whatsoever, but I expect/hope it to be something like that.

@Moors7, @Rockvole, the phone/tablet/PC would change their wifi connection to the SoftAP SSID and from there, access the config webpage. A lot like you do in a hotel without the login.

So, in summary SoftAP == Webpages hosted on the Photon

I’m really just talking about extending SoftAP with some additional pages to make life easier.
It sounds like Particle is already planning to build SoftAP anyway ?

2 Likes

[In a separate thread][1]

@nexxy set expectations that we’ll see this by the end of the week! Really looking forward to seeing something that clears up all of the speculation on how the js will allow the browser to serve up all this interaction, deal with browser compatibility, and close the feedback loop once a device connects.
[1]: Photon softAP usage?

3 Likes

@mashandburn, @rockvole,

To be clear, SoftAP is not something that allows you to host webpages on the Photon.
SoftAP is a protocol that allows you to configure the Photon’s Wi-Fi connection.

Building something to allow the Photon to host webpages is definitely an interesting idea, but it is not something I am currently undertaking. I just want to get that cleared up :smile:

Hi.
Any update as to delivery time for a web based solution to wifi setup?

@kevin,

That’s not something that’s been discussed on our current roadmap as far as I’m aware, so I’m assuming you will want to look for community contributions for the time being. In the mean time I’ll do my best to provide examples on how SoftAP Setup can be performed without hosting HTML on the Photon.

Thanks!