The app is a static HTML5 page with one HTML file, a CSS file for Ionic (from Ionic CDN), a JS file with the traceur-runtime, browserify, Ionic bundle (that contains Ionic + AngularJS), some Node modules (OAuth and Qs), and the traceur compiled ES5 code for the app itself. Everything is cached on the client with HTML5 application cache.
Browserify is used as the module system and built together with Grunt where
grunt-replace and a custom Grunt task is used to generate unique file names (with MD5) and insert it in the application cache manifest and HTML file.
To communicate with the Telldus API, OAuth 1.0 are being used and the OAuth keys are stored in localStorage. The Telldus API does not support CORS or JSONP, so as I described in my previous post I use Yahoo YQL as proxy (over HTTPS) to communicate with Telldus API.
The code is on Github (I will update it later, after I bought more receivers and sensors). And I run it from my Dropbox account (does not matter if the URL is long when you save the app to the home screen and run it in fullscreen mode without the address bar).
Here are some screenshots of the app on my Nexus 5 (after I added it to my home screen so that fullscreen mode works).
Looking for devices
List of devices that can be turned on/off.
Config. Add Telldus OAuth keys.
Really nice to work with ES6/7 code! I really enjoy the async/await parts + the simple module system and the arrow functions.
I am not much for big frameworks…But for this use case the Ionic framework felt like the right choise. It was pretty easy to create a mobile app with nice look and feel that seems to work on both iPad 3, iPhone 5 and Nexus 5.