Hi, new to this forum but not to home automation

deandob

Active Member
Hi,
 
Been browsing here for several years but until now haven't registered. With all the cool things happening in Home Automation at the moment I'd like to participate in the discussions here - IoT is creating a lot of attention (& hype), interesting projects on kickstarter (eg. Ninja Sphere - recently defunct though) and cool products like Amazon Echo.
 
My system
I have a home brew system developed over the last 8 years. Initially I was going to purchase Charmed Quark's system but I didn't like the approach to scripting with a proprietary language, and as a software developer (mostly Microsoft) and with a hardware background, I thought using some of the industry standard toolsets would be a better and more flexible approach (like .NET, Visual Studio, Node.JS etc.). So I started building up my system and after several iterations and a lot of learning, the current system is based on HTML5 widget based UI (desktop & mobile) talking websockets to a .NET message based server with a Node.JS plug-in device driver manager, supporting REST, sockets, websockets, MQTT and uses Microsoft Azure for access from the internet.
 
Screenshots
Here is one of the screens from the HTML5 dashboard - weather portal example (data from a weather station as well as info provided by a local internet weather feed like rain radar)
 
=> see screenshots below, wasn't allowed to add screenshots as a new member.....
 
Here is a screenshot of the design surface used for the HTML5 dashboard. Apart from the top & bottom status bars, everything else on the screen is user definable with widget based drag/drop, re-sizing and channel definition that makes for a very simple and flexible UI. Creating new widgets is also simple if you know HTML5/javascript and they can be very functional (eg. the graph widget based on D3 can do zoom and panning for scrolling or drilling into data with standard touchscreen gestures). 
 
=> see screenshots below, wasn't allowed to add screenshots as a new member.....
 
Here is a screenshot of one of the settings screens, where triggers/events can be setup, data transformations to create virtual devices, time series visualisations, editing of UI widgets or device drivers in .NET or JavaScript (device drivers have access to the automation framework functions using standard javascript, with driver features exposed for user actions or administration via metadata configuration settings).
 
=> see screenshots below, wasn't allowed to add screenshots as a new member.....
 
Sensors
Are ethernet based using PIC microcontrollers that talk to the server over MQTT TCP/IP and derive power over Ethernet (using PoE).These include IO modules (eg. for gate control, motion sensors) and more sophisticated sensors like an ultrasound tank level sensor. Sensors use a software PIC framework using the cheap PIC18F66J60 chips and have a small master module that handles the power and TCP/IP communication and expose GPIOs via headers so any type of sensor can be built around them (eg. bluetooth modules). Similar to arduino but more purpose built - next iteration of the sensor platform will include a small webserver with a web based console to program sensor functionality using the TINYBASIC language. I'm also working on (but not ready yet) a smarter sensor platform using raspberry pi and Windows 10 IoT for more sophisticated functions like speech recognition, touchscreen, audio etc.
Hackaday project blog
 
Automated
I have automated my front gates (which can also detect who is opening), all house lights on C-BUS (eg. home theater scenes, 'all lights off' button etc.), weather station, power monitoring & solar power inverter (eg. the data transformation engine calculates real time how much energy I'm saving and getting paid by the electricity company), IP camera motion detection and real time and history viewing in the browser, event history for graphing temperature or energy (or whatever) trends over time and a whole lot more.
 
I have ended up with a lot of automation and a not perfect (or fully complete) but what I still consider to be a pretty sophisticated system with the main features seen in most good automation systems and a number of unique ideas I have not seen elsewhere. If anyone is interested I can share more details, I have some of the code up on github.
 
I can't post links or add screenshots to show you more of my system - if an admin relaxes my account I'll post.
 

picta

Active Member
Welcome to the forum, deandob! It sounds like you got a really cool system, hope we'll be able to see your screenshots soon.
 
You can post your web links now buy replacing special characters with words
 
I would be very interested in learning more about your sensor platform, how many sensors does it have, how do you build/calibrate them, what are they used for in your system.
 
Also curious about your solar power monitoring, how long have you been doing it for and how your own measurements compare with the power company annual invoice.
 

deandob

Active Member
Regarding power calculations, I have been monitoring power usage, generated and savings for several years, although the calculations are real time from each sensor datapoint generated, there is still a margin of error about 5%. Good enough though.
 

deandob

Active Member
Last one - setting screen. This shows how to setup real time data transformations, creating dynamic channels that allow powerful device abstractions. In this example it creates a virtual device called FIT which is the sum of all the power phases from the power monitor and subtracts the power being generated by the solar inverter and represents the $ savings per hour I get from the utility company for sending back generated power to the grid. The channel for this virtual device can be used like a real device (real time calculation, history, used for triggers etc.) and include time based calculations like average, max, min values. Most automation systems can't do this level of complexity real time and as a virtual device I can easily draw historical graphs, calculate my expected monthly payback from the utility company etc. This to me is what smart automation is all about, and nothing here is hard coded, it is all easily user configurable.
 
https://onedrive.live.com/redir?resid=850a95a2c4eb0195!44495&authkey=!APRyFg_cjLUjGzs&v=3&ithint=photo%2cJPG
 

Attachments

  • settings.JPG
    settings.JPG
    61.7 KB · Views: 28

picta

Active Member
These look awesome! I like the weather screen. Do you use the weather data in some automation functions?
 

JonW

Senior Member
That looks great!  I've built some of my own controls for the HAI Omnipro system, but while I can do the interfacing and hardware stuff relatively easy, I'm a bit graphics challenged on making the pretty GUI's.  I'd be interested in hearing more about the HTML5 widget based UI.  Was that an existing framework that you utilized or is it from scratch?  I'd be interested in checking out the Github links you mention.
 
Thanks for sharing!
 

deandob

Active Member
Picta,
 
Yes, the weather data is used for triggers, eg. sunrise / sunset (which is an inbuilt function) and I also trigger a WhatsApp message when it starts to rain (to take the washing back inside!). The key to this screen is the integration of a number of sources of data, the weather radar, weather prediction, and real time current weather data. Everything on this screen has been built with HTML5 UI widgets so is very extensible.
 
Jon, I used this as an exercise in learning HTML5, so it is my first app using HTML5/JavaScript. It has grown into a fairly sophisticated front end and the framework used was bootstrap for the top and bottom banners (+ things like tooltips) but the main part of the UI is the WYSIWYG widget design surface which took a bit of work to get right and it was from scratch. Basically you drag widgets from the widget tray onto the design surface, re-size and change any attributes that the widget allows you to (eg. color, channel for receiving or sending commands from the server). The power is in the widgets which are HTML5/JavaScript and I also use a lot of SVG for improved graphics. The widget HTML5 is imbedded in the dashboard as an object when rendering the page, and the object interacts with the automation framework through an API. It is quite simple to write new widgets as the HTML5/JS is standard and the API's aren't too complex, and also easy for a non technical person to use the UI to design their own screens. 
 
I have the front end working across the internet as well, but as it is driving my house (eg. lights, gates) I'd rather not publish the URL for it at this point but might setup a demo house if folks are interesting seeing how it works. Was also looking at a mobile phone interface on the weekend, checking out the various frameworks available but the best option is to use the same widget interface with some tweaks (eg. use bootstrap responsive CSS), so you can design the UI screens for the phone in the same way as the desktop and just dynamically adjust widget size to suit the phone form factor, perhaps with adding a couple of mobile specific optimized widgets in the widgets toolbox.
 
An earlier version is on github - search for my username 'deandob'. Happy to answer any other questions, I have more screens to show if interested.
 

BobS0327

Active Member
JonW said:
That looks great!  I've built some of my own controls for the HAI Omnipro system, but while I can do the interfacing and hardware stuff relatively easy, I'm a bit graphics challenged on making the pretty GUI's.  I'd be interested in hearing more about the HTML5 widget based UI.  Was that an existing framework that you utilized or is it from scratch?  I'd be interested in checking out the Github links you mention.
 
Thanks for sharing!
 
@JonW
 
I thought you might be interested in a widgets library I stumbled across while doing an internet search.   Check out Generic Logic's Community Edition (CE) http://www.genlogic.com/
 
It's a free library for non commercial use.  The only downside to using the non commercial Community Edition is that it displays a splash screen on startup of your app for about 10 seconds indicating that you are using the Community Edition in your app. 
 
Top