Built a "moodlamp" for my daughter. How does she best get it configured to WiFi?

Hello all. Thanks in advanced.

I made a “moodlamp” for my daughter for Christmas; however, when she takes it home, she will need to connect it to her home wifi.

I have read through a bunch of form topics ranging from personal web sites to a softAP approach.

I have reviewed the APIs and I may have missed something; however, is there a Firmware option to re flash to code in the cloud?

And have come to what conclusion ;)?

I’m not quite sure what the question is, would you mind elaborating?

If the lamp is still in your possession, you can pre-configure the credentials, thus requiring no action when she gets home. Alternatively, she could use the app. Or the CLI, or a SoftAP page, or… any of the methods described in the topics you’ve mentioned to have read :wink:

I made a “moodlamp” for my daughter for Christmas;

Sounds like a cool project! Details anywhere?

however, when she takes it home, she will need to connect it to her home wifi.

Lots of ways to do this. Do you want her to “own” the Particle device inside or do you want to continue to own it? If she is to own it she can put the Particle device in listening mode and use the Particle mobile app to configure the WiFi. If you want to continue to own it you’ll either need to set it up for her (might not be possible) or have her set it up over either serial or WiFi (SoftAP)

I have read through a bunch of form topics ranging from personal web sites to a softAP approach.

I personally really like the SoftAP approach. I do wish a very basic WiFi configuration portal was baked into the firmware.

I have reviewed the APIs and I may have missed something; however, is there a Firmware option to re flash to code in the cloud?

Not sure what you mean? The device must be connected to WiFi and have access to the internet to be flashed over the internet.

2 Likes

I have not made a details about it yet; however, I used this from Adafruit and created a mobile-first web page that allows her to set various “moods” of the lamp as well as create custom colors.

No-- I prefer to own it so I can update it with different versions and more features.

What I mean is that after she uses a softAP app to configure her lamp to her network, I want to re-flash the lamp code in it. Or do people simple keep the softAP code there and run it only when there is no connectivity?

She would need to own the device to use the CLI or mobile app. I want to remain the devices owner so I can update it.

You can place it in listening mode by holding the setup button. You can then use the Particle app to configure the credentials without claiming the device. No special SoftAP code needed.
You can have the SoftAP code work when there’s no connection though, which is a valid alternative.

She’d need to have physical access, yes, but not claim it. Both the CLI and the app can be used to configure credentials without actually claiming the device to an account.

What I was getting at was that if you knew her wifi credentials, you could pre-configure it using either the CLI (over serial), or in code. That way, no further interaction would be required when she gets home.

If you want to make it even more complex, you could make the lamp a ‘product’ in the console, where you’re the product creator, and she’s the customer. That way, she can claim it to an account, but you keep the possibility to flash new code. I wouldn’t take it that far though.

The easiest solution would be for her to hold the mode button and use the app.

1 Like

Using SoftAP will allow her to add the device to her local wifi, you keep the ownership of the device and be able to update the device when you want.

It is added to your existing code.

Look for the demo in the docs.