How to turn a home thermostat into a smart device: easing the connectivity challenge: Page 6 of 7

May 09, 2017 // By Vikram Ramanna
How to turn a home thermostat into a smart device: easing the connectivity challenge
Consumers are developing a taste for smart home devices, thanks in part to the new sophistication of voice-controlled technologies such as Apple’s Siri Remote and the Alexa Voice Service on Amazon Echo, and of systems for the remote control of home devices such as Google’s Nest products.

APSTA is available in the WICED SDK as a sample application snippet. This means that the thermostat can host a webserver and allow other clients to connect to it; at the same time, as a client it can connect to the home access point for connection to the internet.

The WICED SDK makes it easy for the developer to host an http server on the thermostat to expose REST API calls to GET or POST the desired temperature. This powerful feature makes the thermostat accessible to other devices on the network.

For instance, a small peer application on a mobile device can be written to enable it to set the temperature using a sample POST request which would look something like this:

The app can also ask the thermostat to tell the mobile device which temperature it is currently set to, with a GET request such as:

The html page developed to host a webserver is placed under the resources folder along with the required javascript, css and image files. This needs to be included in the application Make Target as a resource object, allowing the server to render and display it when any client connects to the device.

There are two mechanisms for connecting the thermostat to a desired access point:

  • feed the SSID and password of the access point into the configuration file;
  • ask any client such as a mobile phone connected to the softAP hosted by the thermostat to allow the user to enter the password for the chosen access point. The thermostat subsequently reboots and stores the access point credentials in a device configuration table;
  • The WICED SDK also provides for the option of WPS security for registering a new device to an access point.
Design category: 

Vous êtes certain ?

Si vous désactivez les cookies, vous ne pouvez plus naviguer sur le site.

Vous allez être rediriger vers Google.