Search code examples
iotwindows-10-iot-core

Tiny WiFi connected relay - where to start


I'm trying to get some initial info on my very first IoT project. I want to build a * tiny * wifi connected relay to control, let's say, lights. I'm a newbie in the hardware and electronics field though, but I'm a pro developer, so programming is not a problem.

Now, I've looked at different options and I can't seem to find really small components for the task. It might be I overlooked something, so please help me with available options.


Solution

  • Look at the ESP8266 devices. They have WiFi on chip and can be programmed using the Arduino environment. You basically write code in C++ to do whatever you need.

    Here is an Amazon search for some examples: https://www.amazon.com/s?k=esp8266

    I recently did a project using a Linknode R4 (similar to above but with 4 relays) and programmed it as a web server with REST API. Then I built a front end with ASP.NET Core to that talks to the REST API for the devices on my network. The Arduino sketch for the web server is posted on Github at https://github.com/SteveInCO/LinknodeR4. I would assume it would work with little modification on the device I linked above.

    The default program for the R4 allows controlling it via their website or iOS/Android apps, though I could never get it to work out of the box. Their model uses a polling method so the relays continually ask the server what to do next.

    Windows IoT doesn't run on these small devices yet, but no reason you can't front end the Arduino API with a UWP app running under Windows IoT on a Raspberry Pi instead of the web app like I did. I think the eventual plan is for ASP.NET Core to be able to run on an ARM based system like a Raspberry Pi, but last I checked it wasn't quite there yet.