Skip to content
Reivaxy edited this page Oct 6, 2018 · 24 revisions

Welcome to the Xiot Framework wiki!

The purpose of this wiki is to help anyone interested in using and/or collaborating to this project.

Let's first look at how it's working right now, from a user perspective.

To have something usefull, you will need to have at least two esp8266 based boards. I obviously haven't tested all available esp8266 boards, but a few should be compatible, and I'll list the ones I've actually successfully used.

On one, you will flash the code from this iotinator repository, and it will be the "master".

On the other one you will flash one of the available modules (each one has its own repo): iotSwitch, iotFan, iotDimmer...

So let's say you flashed iotSwitch. And you powered up the two boards...

What happens next?

Here is an illustrated chronology:

iotinator action/screen Module action/screen
Power iotinator up, first time after flashing the software.

Please note: my pictures are blurry but the screen is actually sharp and nice!
The screen is showing the module's name "iotinator", then a steady "outbound" wifi icon, then the default ssid "iotinator" opened by the module as an Access Point, its ip on the network, and the "Please initialize" message.
"Please initialize" means you need to initialize the master module, and to do that just connect your mobile phone to the "iotinator" wifi network, with password "iotinator", and put the displayed ip in your browser's url bar

Fill in the fields:
Access point ssid/pwd is the name and password you choose for the custom Wifi, because you don't want to use the default "iotinator" name.
Home Wifi SSId/Pwd are the name and passwords for your home wifi, so that the module can get the current time and expose its UI and do other evil stuff.
Web App Host is the website on which the UI files are available. During dev, it should be your dev machine, otherwise just set it to http://www.iotinator.com
Hit the submit button, your settings will be saved in the EEPROM.
Once initialized, the module will alternatively display the new ssid (I chose to call it "XiotWifi" here) and its ip on it, as well as your home wifi ssid and its ip on it. After a few seconds, it also should display the current date and time.
Yes, it is connected to your home wifi AND exposes its own ssid!
As soon as it is connected to your home SSID, the master will send its local IP to www.iotinator.com. This way, instead of having to type the possibly changing IP address in your browser, you can just type http://my.iotinator.com and you'll see the app.
Power the switch module up, first time after flashing the software.
The screen will show the module's title, "Switch", a blinking "inbound" wifi icon and a message saying it's trying to connect to the "iotinator" ssid. But the master no longer exposes the "iotinator" ssid ! It has switched to the name you chose.
Press the reset button on iotinator. It will then reopen the default "iotinator" ssid for 20 seconds and display a seconds counter in the bottom right corner
The Switch module was just waiting for a "iotinator" wifi network! It will then connect to it! It will then send a registration request, to which the master will respond sending the configuration.
The master module got the Switch module registration request, and sends back the ssid to chose to use: "XiotWifi"
The Switch module got the configuration when registering, and now switches to the new ssid "XiotWifi", and can display the time it got from iotinator

We can see the name of the module was modified. How come!? It's just that I have another Switch module which connected first. So iotinator will rename the second one to the first name available.
Once the 20 seconds are over, iotinator reopens the ssid you chose, and all modules connect using this ssid, and the system is ready to work.

The configuration is persisted in EEPROM, so when you turn the modules off then on, they will automatically reconnect to the ssid you chose, but iotinator will first expose the default ssid for 20 seconds, in case new modules need to connect.

When you want to connect a brand new module, just press reset on iotinator, and that's it!

Now, with your phone connected to your home ssid (or even to the ssid you set up in iotinator, but that's less convenient), you can open your browser on http://my.iotinator.com or on the IP address displayed (the one according to the ssid you connected to), and it will show the webapp:

We can see that there are actually other modules connected, so they show up on the page.

The UI for the Switch module allows you to turn on or off a device connected to it. Here I turned if "on", which is shown on the screen. For the demonstration it turns a led on, but it will actually drive a relay to switch a lamp, or heater, or whatever.

So, what have we seen?

We have seen that once the iotinator master module has been configured using the default "iotinator" ssid, it opens a wifi network you choose, protected by a password you choose.

We have seen that any new Xiot module is then able to join by just resetting the master.

We have seen that such registered modules then show up on the web app that can display their states and offer controls to change their states.

What do we get?

If you just want to use modules, you get inexpensive stuff to make your home smarter, monitor and control stuff from wherever in the world when traveling around, using one single web application (and, later, SMS too) to check the status, edit parameters, ...etc. Of course the choice is limited for now, but some are in the works, and it would be awesome if more people contribute ;)

If you want to design a monitoring and/or control module, you get an easy to use framework that allows you to design a tailored-to-your-needs module with fancy Oled screen, wifi connection, web app in literally just a few lines of code.

The code for the Switch module is here: https://github.com/reivaxy/iotSwitch

The code for its UI is here: https://github.com/reivaxy/iotinator/tree/master/webSite/htdocs/app/switchUIClass (It should probably also be in the iotSwitch repo, and may move there at some point, but for now it's much easier to leave it here).

As you can see by yourself there is not much of it !

I have started working on the iotXenia module to monitor an aquarium, and that should illustrate many other possibilities such as saving parameters, etc.

It will have the same features as an earlier project: https://github.com/reivaxy/aquaMonitor

Its name comes from these creatures.