Author Topic: OpenHAB impressions  (Read 7341 times)

davinci

  • Newbie
  • *
  • Posts: 12
OpenHAB impressions
« on: December 18, 2014, 04:45:03 PM »
EDIT: split topic by Felix(admin): This thread was split from the original thread here to keep them more relevant.

I've looked at your website ColinR, excellent work and design :-)

Thanks for the information. Looking forward to read about the lab you set up for your friend.

The more I think about the nodes and potential relationship with other systems (lights, sonos) in my house I'm probably going to install and configure OpenHAB, evaluate the functionality and see if it will provide the functionality and flexibility I am looking for, and hopefully it will be stable enough on a Raspberry Pi.

I do not want to fiddle and code too much for these solutions at the moment. After the evaluation of OpenHAB i will probably quickly figure out if it will be as expected or not, and then continue with OpenHAB, or go either your way with a python based gateway or a nodejs one.

OpenHAB also got a web ui that is based on a javascript framework, it looks promising: https://github.com/openhab/openhab/wiki/TouchUI

Also like that the OpenHAB system have this rules based trigger system built-in, making it very easy to perform (script/code based) actions based on values from any of the nodes/inputs.

-Davinci
« Last Edit: December 20, 2014, 10:33:00 PM by Felix »

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #1 on: December 20, 2014, 03:17:14 AM »

OpenHAB also got a web ui that is based on a javascript framework, it looks promising: https://github.com/openhab/openhab/wiki/TouchUI

Also like that the OpenHAB system have this rules based trigger system built-in, making it very easy to perform (script/code based) actions based on values from any of the nodes/inputs.

-Davinci

Thanks for the kind words.

Mine is jQuery and jquerymobile (javascript) based. It supports actions out of the box. I just deployed a laboratory pressure sensor Moteino system that emails when pressure drops below a specified level. Took no special code except addition of actions through the normal UI. Easy stuff.

I'll post soon.

C
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #2 on: December 20, 2014, 03:22:33 AM »
Man, I just checked out (or tried to check out) the framework you linked, and:

1. No demo. links broken.
2. No docs.
3. Runs on non-standard ports (therefore not on internet without forwarding or other port-fu)
4. Runs on websockets and uses longpolling.

Mine runs on 100% apache and sqlite. A production web server, not some half-baked dev server they cooked into a "REST API".

Sorry to sound pessimistic, but I'm getting tired of poorly built crap.

C
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: OpenHAB impressions
« Reply #3 on: December 20, 2014, 01:18:57 PM »
Man, I just checked out (or tried to check out) the framework you linked, and:

1. No demo. links broken.
2. No docs.
3. Runs on non-standard ports (therefore not on internet without forwarding or other port-fu)
4. Runs on websockets and uses longpolling.

Mine runs on 100% apache and sqlite. A production web server, not some half-baked dev server they cooked into a "REST API".

Sorry to sound pessimistic, but I'm getting tired of poorly built crap.

C

Were you referring to OpenHAB?
I looked into that as well, too bad it's built on JAVA, I tried to read on the details but there's not a lot and I don't like the idea of custom ports like 8080/8443 and still not sure what webserver they use.
I am working on a new interface for my stuff which I will make available after I have a working solution, but I'm looking forward to see what you have to share. I also use jquery mobile and I use the no frills standalone neDB database, so far I'm liking the ease of use.

kobuki

  • Sr. Member
  • ****
  • Posts: 289
Re: OpenHAB impressions
« Reply #4 on: December 20, 2014, 01:32:13 PM »
Sorry to bark in, guys, OpenHAB seems to be popular these days and I'm looking for a similar solution. What is the problem with Java or the non-standard ports in your opinion? 8080 and 8443 are very common port alternatives for the HTTP and HTTPS protocols, respectively. They are mostly in use to be able to run more than a single HTTP(S) service on a single host, on a single IP address and they're configurable. And, since it's written in Java, probably has a built-in web server written in Java, too (most likely candidates are Tomcat and Jetty, haven't read up on the specifics yet). But I'm eager to see your own solution as well :)

(Disclaimer: I have 15+ years of Java SW engineering experience.)

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #5 on: December 20, 2014, 03:53:05 PM »
Man, I just checked out (or tried to check out) the framework you linked, and:

1. No demo. links broken.
2. No docs.
3. Runs on non-standard ports (therefore not on internet without forwarding or other port-fu)
4. Runs on websockets and uses longpolling.

Mine runs on 100% apache and sqlite. A production web server, not some half-baked dev server they cooked into a "REST API".

Sorry to sound pessimistic, but I'm getting tired of poorly built crap.

C

Were you referring to OpenHAB?
I looked into that as well, too bad it's built on JAVA, I tried to read on the details but there's not a lot and I don't like the idea of custom ports like 8080/8443 and still not sure what webserver they use.
I am working on a new interface for my stuff which I will make available after I have a working solution, but I'm looking forward to see what you have to share. I also use jquery mobile and I use the no frills standalone neDB database, so far I'm liking the ease of use.

First of all, let me apologize for my rant, which was fueled by early morning grumpiness and quite a few pints. For the record, I've poorly made plenty of crap in my time.

I was trying to check out their visualization, TouchUI or whatever. It was not meant to be a commentary on OpenHAB by any means. Not that popularity necessarily indicates quality, but they seem to be doing alright. As you mentioned, however, JAVA (boo for me).

I had a demo online of my UI that's connected to my home gateway, but it seems I neglected to update my DNS when my ISP recently switched my IP. Let me get on that. The URL is cupidcontrol.com, so when it flips over you'll be able to take a look. You can use the user/pw viewer/viewer. What I use almost exclusively is the mobile interface (click Go to Mobile at right). I haven't removed the original CSS interface because I still use one of the screens for running my reflow oven. Once I convert it I'll remove it. Many of the old pages already don't work as I have made many js library changes and not maintained them.

C
« Last Edit: December 20, 2014, 04:20:42 PM by ColinR »
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #6 on: December 20, 2014, 03:59:18 PM »
Sorry to bark in, guys, OpenHAB seems to be popular these days and I'm looking for a similar solution. What is the problem with Java or the non-standard ports in your opinion? 8080 and 8443 are very common port alternatives for the HTTP and HTTPS protocols, respectively. They are mostly in use to be able to run more than a single HTTP(S) service on a single host, on a single IP address and they're configurable. And, since it's written in Java, probably has a built-in web server written in Java, too (most likely candidates are Tomcat and Jetty, haven't read up on the specifics yet). But I'm eager to see your own solution as well :)

(Disclaimer: I have 15+ years of Java SW engineering experience.)

Nothing wrong with Java (if you write Java).

Nothing wrong with non-standard ports, if you don't mind typing them into the address bar, and making sure your firewall(s) between your device and the tubes are configured properly. But the better question: why non-standard ports at all?

I assume that you are correct that they run a robust Java web server. My commentary was more general, with reference to application service packages that ship with development servers that people just end up using in deployment. They're just not designed for it, but it's done anyway. Otherwise, you end up doing work to squeeze this special service (that supposedly makes your life SO much easier) through Apache by, for example, by setting it up as a wsgi handler. Which then begs the question: why not just use plain wsgi in the first place? If it's good enough for Django, it's good enough for me.
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

kobuki

  • Sr. Member
  • ****
  • Posts: 289
Re: OpenHAB impressions
« Reply #7 on: December 20, 2014, 04:29:03 PM »
You're right regarding the inconvenience associated with the nonstandard ports. As for why to use them I think I already replied to that. And while it's surely another small inconvenience for the average user, they can be set to the standard ones. Or you can reverse proxy them if you want.

Application service packages that ship with deveopment servers -- it's a possibility, but servers used for development are usually the same as the ones used for production (in case of Java embedded/bundled servers, at least). The configuration is tailored to suit the usage pattern. That's the issue that is sometimes forgotten, but very important.

As for the choice of technology -- the devs are free to choose any technology they want and so you are.

We're getting a little offtopic :-X

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #8 on: December 20, 2014, 04:47:43 PM »
You're right regarding the inconvenience associated with the nonstandard ports. As for why to use them I think I already replied to that.
Yes, but can you name a use-case where you need to serve two services on the same host where it doesn't make sense to simply separate services by URI within, say, an Apache Directory Directive?

Using another port for another web service has other disadvantages as well. You can't easily call resources on that separate web service from another without explicitly (and annoyingly) configuring Cross Origin Resource Sharing, as calling on another port is viewed as a legitimate security concern. It just seems to make more sense to do the interpretation within the single service (Apache, for example), separating the calls by URI rather than by what port you are calling on.
Quote
Application service packages that ship with deveopment servers -- it's a possibility, but servers used for development are usually the same as the ones used for production (in case of Java embedded/bundled servers, at least). The configuration is tailored to suit the usage pattern. That's the issue that is sometimes forgotten, but very important.
Flask and webiopi are two that come to mind. Flask is eventually run through wsgi, and webiopi is an API that from what I can tell needs yet another application to squirt it onto the net, and is doing so using their custom app server. Why do this when wsgi/ajax/apache already exist, are bulletproof, widely adopted, and well-tested? It's just unnecessary complication for a non-production solution.
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

kobuki

  • Sr. Member
  • ****
  • Posts: 289
Re: OpenHAB impressions
« Reply #9 on: December 20, 2014, 05:14:49 PM »
Yes, I know a lot of practical scenarios. One of the more common ones is a shared hosting site with eg. Apache as frontend and reverse proxy for a J2EE/Java Servlet-based service running on the same host, like a Wiki, a CMS or a Lucene/SOLR search engine. From the end user it's all hidden most of the time, naturally (and this is important!). The security issue you mentioned is a valid one but needs to be addressed separately. There's a LOT more than just Apache vhosts, WSGI, PHP or Python, etc. Or I could write about techniques for saving public ip addresses by shifting/modifying standard ports and stuffing them behind a reverse proxy, but this is a different story. And so on.

And in reality, there's nothing that's bullet-proof, believe me :) The rest I don't argue with, if you're familiar with the tech and are satisfied with it, use it. Some stuff is ubiquitous and unavoidable anyway, like HTML, JS or AJAX. That's the mainstream.
« Last Edit: December 20, 2014, 05:19:29 PM by kobuki »

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #10 on: December 21, 2014, 08:13:53 AM »
Those are complex applications indeed! I have done a lot of stuff, including reverse proxy (how I get my Pis outside), running a handful of sites at once, all with Apache vhosts and other simple directives.

I finally got around to posting this thermostat project that uses the UI we were discussing:
https://lowpowerlab.com/forum/index.php/topic,802.0.html

I've got a couple more I need to write up as well, but it just takes time.

C
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

davinci

  • Newbie
  • *
  • Posts: 12
Re: OpenHAB impressions
« Reply #11 on: December 23, 2014, 04:05:24 AM »
I'm not experienced with Jetty, the web server OpenHAB is running.

It could be useful to read a little about it if you are unaware of its architecture and history.

This might be an old article, but it's interesting for some.
http://www.infoq.com/news/2009/08/google-chose-jetty

And a list of services utilising Jetty:
http://eclipse.org/jetty/powered/

-Davinci


ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #12 on: January 02, 2015, 01:51:55 AM »
Finally got around to updating a few things and locking down a couple security issues. Still actively developing and tightening things up, so if you get a bug here and there, don't be surprised.

Description here (needs updating to add features recently added):
http://interfaceinnovations.org/ccsoftware.html

Live demo here. User/pw = viewer/viewer . Limited access, no write permissions. Original site is at cupidcontrol.com, but the mobile site will be the only one once I migrate all content.
https://cupidcontrol.com/mobile/

If you get the 'too many active sessions' message, it's because I have a session manager enabled that will limit the number of active sessions per user to a user-defined count. This prevents gateway overload. Each session currently lasts ten minutes (also configurable).

I'll make another dedicated post once I'm sure I've squashed all the major bugs.
C

CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6059
  • Country: us
    • LowPowerLab
Re: OpenHAB impressions
« Reply #13 on: January 02, 2015, 08:50:09 AM »
Wow really impressive. I like the graph integration although it seems a little slow or maybe I'm doing things too fast in the UI and not letting it refresh properly.
Quite a lot of work in there I can tell that.
I see you're using the original mark, have you trademarked your CuPID line of products?

ColinR

  • Full Member
  • ***
  • Posts: 176
Re: OpenHAB impressions
« Reply #14 on: January 02, 2015, 03:56:46 PM »
Thanks. We seem to be experiencing some load issues. Firebug tells me so. Working on it. From what I can tell, my wsgi doesn't seem to be running in daemon mode, which I meant to check on.

Loading the 1000 points normally takes a few seconds, but the other UI stuff is normally very responsive.

Yes, CuPID is registered.
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com