Pre-release

@bitcontrol bitcontrol released this Feb 5, 2016 · 2 commits to master since this release

Assets 2

In order to cross compile the RPS application on the Ubuntu 14 development host for the Raspberry Pi, the cURL library suited for the RPi has been copied onto the dev host. The RPS project within Eclipse has been configured to make use of the library.

Pre-release

@bitcontrol bitcontrol released this Jan 5, 2016 · 3 commits to master since this release

Assets 2

Apart from a new configuration in Eclipse, the code hasn't changed. This new configuration cross compiles the C code for the Raspberry Pi B+ board.

Pre-release

@bitcontrol bitcontrol released this Dec 18, 2015 · 4 commits to master since this release

Assets 2

It has been developed on an Ubuntu 14 computer and is designed to run on any Linux computer with the cURL library installed.
What's missing is the software driver for the general purpose input/output port (hardware interface). That module will be added once it's been decided on what hardware platform (Raspberry Pi or Beaglebone) the application will finally run.

Pre-release

@bitcontrol bitcontrol released this Dec 7, 2015 · 8 commits to master since this release

Assets 2

AJAX calls have been added to the browser code, and the server code has been adapted where necessary.

Changes applied to the source code (cosmetic changes aren't listed):

File index.html

  • Change the name of the form field from 'Password' to 'Device Identifier' - this makes the purpose of the field clearer
  • In the ON and OFF buttons: remove the calls to the modal dialogs - they aren't used anymore
  • Remove implementation of the modal dialogs - they aren't used anymore
  • Remove method="post" from <form> element - it isn't required anymore
  • Change name="password" to name="devId" in the form's element - adapt its name to its purpose
  • Add id="devId" to <form> - it is required in the JavaScript buttonClicked() function
  • Add action="javascript:void(0);" to <form> element - this stops the page from reloading when is hit while the focus is in the text input field
  • Add onclick="buttonClicked(this)" to <button> elements
  • Add JavaScript function buttonClicked() - it executes an AJAX call when a button is clicked
  • Add JavaScript function updateStatus() - it executes periodic AJAX calls to update the displayed device status
  • Add jQuery function $(document).ready() - it executes after the DOM has been generated

File switches.js

  • Improve the function set() such that it only updates the database if the requested new state isn't equal to the current state.

Database

  • Add 2nd remote power switch with identifier '2' to improve testability

Pre-release

@bitcontrol bitcontrol released this Nov 26, 2015 · 9 commits to master since this release

Assets 2

The JSON files in the data folder initialize the database with the device identifier (devId) 1. This is an example identifier for usage on the local host. It may not be suited well for the WWW.
Use the following commands inside Postman to

  • Get or set the state of the Remote Control Switch (the one that is set by the embedded computer and read by the browser)
  • Get or set the state of the client side switch (the one that is set by the browser and read by the embedded computer).

Set/get the state of the Remote Control Switch (set by the embedded computer, read by the browser):
GET, http://localhost:9000/status/1
SET, http://localhost:9000/status/1/on
SET, http://localhost:9000/status/1/off

Set/get the state of the client side switch (set by the browser, read by the embedded computer):
GET, http://localhost:9000/switches/1
SET, http://localhost:9000/switches/1/on
SET, http://localhost:9000/switches/1/off

Pre-release

@bitcontrol bitcontrol released this Nov 5, 2015 · 16 commits to master since this release

Assets 2

JavaScript server code has been added for Node.js. It displays the static web page now.
This release is related to the blog post https://bitcontrol.ch/en/2015/11/05/iot-remote-power-switch-part-4/.

Pre-release

@bitcontrol bitcontrol released this Nov 5, 2015 · 20 commits to master since this release

Assets 2

First release of the Remote Power Switch project. It contains the client code for a static web page.