Implementation Spotlight: Telensa

Rising energy and maintenance costs due to aging street lighting equipment are some among many of the reasons local authorities are choosing to invest in PLANet — ‘Public Lighting Active Network’ from Telensa. Using a robust Ext-based user interface to control up to 150,000 lights wirelessly, PLANet from Telensa can measure each lamp individually and switch on any combination of lamps within seconds. Get a unique insight into the development challenges faced at Telensa using Ext JS as their front-end of choice.


A typical readings page — supply voltages are recorded by every telecell

We needed to choose a library that was consistent in the way that it presents information to the user, but also consistent in the way that you code using the library.

Tell us a little bit about PLANet and your goals for the application.

PLANet is a street lighting telemanagement system, for remote control and monitoring of street lights. Telecells are installed on street lights as replacements to photocells. These establish wireless connection to a base station, which is a central radio that can also be installed on a street lighting column. A base station can accommodate up to 10,000 telecells over a ranges of 2-3km (urban) and 5-8km (rural). Numerous base stations make up a single system.


PLANet System status page

Base stations connect over regular IP network links to a central system, which runs the overall system. The central system is also a web server and provides the web based user interface. Because of the nature of the system and its eventual possible use by local police, fire departments and authorities, the main challenge throughout has been focused around performance, robustness and fail safe mechanisms.

Efficiency and CO2 reduction benefits

PLANet gives street lighting operators tight control of their lights which translates into a highly energy efficient system – the lights can be programmed to switch on only when needed depending on the time of day, the day of the week, the season, the light level or even the occasion. How much of an energy saving this could make will depend on how aggressive the lighting policies are, but we estimate that using PLANet could help reduce a local authority’s street light energy consumption by up to 40%. This is not an insignificant number when you consider, for example, that the annual energy consumed by all of Europe’s street lights is estimated at 35TWh representing some 1.3% of all electricity consumption.

Why did you choose Ext JS?

Given the wide range of JavaScript libraries available it was important to choose the right one. We needed to choose a library that was consistent in the way that it presents information to the user, but also consistent in the way that you code using the library.

With all Ext components extending the ‘Observable’ class we had the ability to write consistent code in an event-driven manner, much like writing a desktop application, not easily achieved with other libraries. What’s more is that we knew it would work cross-browser, again something not easily achieved that saves countless hours on large projects.

The PLANet application is extremely feature-rich. How did you manage the UI code complexity?

Most PLANet pages make good use of the Ext grid component. In fact, the grid is probably the most central component to the entire application and it was important that we managed the code around this component in as clean a way as possible. Because of the number of columns, each usable multiple time across many grid instances, we collected together all the column definitions into a central file as to only define them once, but use them multiple times. We did this with all fields across the application, including grid columns, text fields, HTML fields and combo boxes. To make the process of changing multiple fields easier and less error prone, we decided to generate the field definitions from the database. This means that each field is defined in the database, before running through a UI build process to make it into a JavaScript file that is included in each web page. Using this process we can manage the generation of UI fields from the database, which means we can control system upgrades from the DB in the future.


Any single street lamp or configured group of lamps can be switched on within seconds

What other techniques did you use to achieve consistency throughout the UI?

Despite significant use of the database to generate UI components, we also extended the grid in other ways to provide state saving, filtering and export functionality.


Custom extensions for state, filtering and export

Each grid can be exported to CSV, taking into account current state and filtering. State of the grid is saved upon each change and when the page is unloaded. In addition, each grid layout can be saved to the database using a simple drop down menu. Filtering is made easy through the use of Ext.Window, with different filters appearing based on the column data type.

What features could we add to Ext to make building a rich application like PLANet easier in the future?

We have found that as we expand the way we want to work with the library, the library is expanding to meet our needs, reminding us why we chose Ext in the first place.

Once an application gets over a certain size, and customer releases become more frequent, the burden of testing the application starts to take its toll. An Ext supported test suite would save huge amounts of time. The current problem of test suites with Ext is being able to reliably predict the automatic ids that Ext generates for page elements. Test tools are beginning to implement support for CSS selectors to overcome this problem, but few currently exist. Ext could provide better documentation on how to build better test cases with Ext so that more time can be spent on development rather than testing.


Lamp Types — dimmable and non-dimmable street lamps are supported

Do you have any advice for developers using Ext for the first time?

Ext can be used by Web Application developers who are familiar with HTML but may have little or no experience with JavaScript application development. If you are starting to build a new web application, or you are revamping an existing application, then take your time to understand the basics of the library including:

  • Understanding the major UI components (grid, form, tree etc)
  • How to integrate your existing data with Ext
  • How to use Ext Layouts
  • The Ext Component Model

Of course, there is only one real way to learn, and that is to get on and do it!

Final thoughts?

As we move on to what is our third major release of PLANet, we are starting to develop with Ext in new and exciting ways. We are loading JavaScript code dynamically from the server as part of a wizard for controlling switching programs of the street lights. We have found that as we expand the way we want to work with the library, the library is expanding to meet our needs, reminding us why we chose Ext in the first place.


1 thought on “Implementation Spotlight: Telensa

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s