evasmolders edited this page Jan 15, 2017 · 6 revisions

PanStamp is a low-cost open wireless automation platform forming a complete ecosystem of wireless nodes and IP controllers. The solution mainly consists of panStamps, low-power wireless modules programmable from the Arduino IDE, plus a set of software tools, gateways and controllers.

panStamp wireless modules can be used as complete appliances or as OEM components into custom devices. panStamp, like OpenRemote, is fully open source, making it a long-term solution where the project continuously gets feedback from the community.

panStamp also provides the necessary software pieces to configure the wireless networks and connect them to the IP world. Lagarto, panStamp's distributed software application, lets any computer turn into a flexible IP controller, capable to schedule custom programmings, log data locally or send it to multiple remote data services in the cloud.

OpenRemote integrates nicely with Lagarto through Lagarto's event-driven ptotocol. No need to define polling intervals or complex command strings. The new protocol extension for OpenRemote lets designers make their own graphic layouts with a minimal amount of command objects from OpenRemote Designer.

Download and run OpenRemote

Firstly, you need to download OpenRemote Controller 2.1.0 shanpshot for lagarto Also download and install the latest version of lagarto as explained here. The current OpenRemote snapshot does not include the necessary binary ZeroMQ libraries ( and files on linux and some dll's on Windows). You have to locate these files on your computer and place them under OpenRemote/webapps/controller/WEB-INF/lib/native/. You can run OpenRemote after this:

From Linux:
sh OpenRemote/bin/ run

From Windows:
OpenRemote\bin\openremote run

And then (or before that, anyway) run lagarto-swap:

OpenRemote Designer

Now it's time co configure OpenRemote from the online Designer tool. Simply open the following URL from a web browser: OpenRemote Designer

and create the necessary commands, sensors and actuators. Let's start by creating a device called "Lagarto-SWAP" or whatever name you prefer. Once we have our device created we can then proceed with the creation of commands, sensors and actuators attached to our device.

Temperature sensor

Before creating a sensor object from OpenRemote Designer we need to define a command to link OpenRemote to the actual SWAP sensor. We can then create our sensor from Designer and attach it to the command previously defined.

Annotate the endpoint id appearing on the first column from lagarto-swap's Network page. This id uniquely represents each endpoint in lagarto-swap.

Endpoint id's from lagarto-swap

In the above example our Temperature0 endpoint has the id "10.12.0"

Create a new command from OpenRemote Designer and select "panStamp lagarto" from the protocol field.

Sensor Command

Figure 2 : Sensor command

  • Name : Enter your preferred name for the command
  • Protocol : Select "panStamp lagarto".
  • Server name : The name of the lagarto-swap server which our endpoint belongs to. This name can be found (and edited) in lagarto-swap's web GUI -> Preferences -> Lagarto Settings.
  • Endpoint ID : Endpoint ID taken from step 1.
  • New value : Leave it empty.

Create a sensor object from OpenRemote Designer's device manager

Sensor Object

Figure 3 :Sensor object

Enter a name for the sensor and attach it to the command defined in the precedent step. Set the "Type" field to "custom".

Binary actuator

Actuators, like sensors, need a command which will be used by OpenRemote to link to the real parameter in lagarto-swap. The only difference is that actuators need the "New value" field to be filled from the command window.

Relay Command

Figure 4 : Command for binary actuators

  • Name : Enter your preferred name for the command
  • Protocol : Select "panStamp lagarto".
  • Server name : The name of the lagarto-swap server
  • Endpoint ID : Endpoint ID
  • New value : "TOGGLE". This is the "trick" used to turn on and turn off binary loads using a single command from OpenRemote. Otherwise, you can create two different commands with "ON" and "OFF" values.

Create sensor object and attach it to the command defined in step 1. Set the type of sensor to "switch".

Relay Sensor

Figure 5 : Binary sensor

Create switch object. We have to attach the switch to the sensor defined in the precedent step and set both ON/OFF commands to our single binary command.

Relay Object

Figure 6 : Switch object

OpenRemote users will appreciate how a single command can be used to read and write endpoints with our protocol extension.

Level actuator

Level actuators, dimmers, DAC's (digital to analog converters) or PWM (pulse width modulation) outputs can be controlled using sliders from Openremote. The configuration procedure is similar to the binary input:

Create a new command for your output:

Level Command

Figure 7 : Command for level actuator

  • Name : Enter your preferred name for the command
  • Protocol : Select "panStamp lagarto".
  • Server name : The name of the lagarto-swap server
  • Endpoint ID : Endpoint ID.
  • New value : "${param}". This is OpenRemote's magic word to pass numeric values to the protocol handlers.

Create sensor object and attach it to the new command:

Level Sensor

Figure 8 : Sensor defined to get/set values from the actuator

Create a new slider object and attach your new sensor and command to it:

Level Slider

Figure 9 : Slider object

Like switches, sliders need to be attached to a sensor, responsible to read values from the real endpoint, and a "setValue" command which will be used to send new values to lagarto-swap. Again, a single command (cmd_Level0) is used to read and write values.

Design your GUI

Once arrived at this point you should see a list of objects similar to the following one:

Designer Objects

Figure 10 : Device view from OpenRemote Designer

Now you can design your custom GUI for your Android/iPhone device. Open the Panel view from Designer and create a new panel. We are omitting the cosmetic aspects in this tutorial.

  • Create new screen.
  • Place a grid and define its number or rows and columns
  • Place a label for each analog input. In our example we should create the a label and attach it to the Temperature0 sensor.
  • Place a switch for every binary actuator. In our example we should select Relay0 from the SwitchCommand selector.
  • Place a slider for every level actuator, dimmer, ADC or PWM. We should then enter Level0 (Level0 slider object created from Designer's Device view) in the SliderCommand field for our current example.
  • Save your work.

Upload design to OpenRemote Controller

Upload your Designer project to your OpenRemote controller by opening the following URL from a web browser: http://IP_addres_controller:8688/controller/. You will have to identify yourself and press the "Sync with Online Designer" button. Finally, open your graphic interface and select the OpenRemote Controller from the list.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.