Securifi Community Forum

Sensors and Home Automation => Home automation => Topic started by: eldaria on June 21, 2014, 05:39:21 am

Title: openHAB
Post by: eldaria on June 21, 2014, 05:39:21 am
So I came across something called openHAB.
http://www.openhab.org/features.html (http://www.openhab.org/features.html)
Now how cool would it be if this was built into Almond+, I suppose the Almond+ is powerful enough to run it.

Certainly something to look into.

Title: Re: openHAB
Post by: pete on June 22, 2014, 12:23:09 pm
Interesting stuff eldaria.

Title: Re: openHAB
Post by: dbuttke on July 12, 2014, 03:59:20 pm
Would be very interesting to see this happen.
Title: Re: openHAB
Post by: cputoaster on July 15, 2014, 08:36:18 am
I would also be very interested to have some "standard" server for home automation running on almond+ as it would allow to profit from the huge community and developer resources of that project. Maybe securifi should focus on continuously integrating this one (or a similar one) instead of rolling their own.
Title: Re: openHAB
Post by: cputoaster on July 21, 2014, 03:34:32 am
Other idea: Could the securifi team maybe just create an openhab module for some cool native touchscreen controls (some largish buttons / sliders would be ok for me for some switches / dimmers) or support one of the existing ones http://www.openhab.org/features-ui.html that are based on a browser.
Title: Re: openHAB
Post by: anthonylavado on July 21, 2014, 03:47:31 am
I'm wondering what is available in the SDK so an app like that can be created.

This is also one of the reasons I wish there was an "API" of sorts, so I could pair Z-Wave devices to the Almond+, and still use OpenHAB for all the logic- polling sensors for info, or turning devices on/off.
Title: Re: openHAB
Post by: cputoaster on July 30, 2014, 03:23:45 am
Did anyone already try Oracles JRE embedded on almond+? As a first step toward working openHAB. Googling around it does not seem that there is a simple package available.
Title: Re: openHAB
Post by: eldaria on July 30, 2014, 03:48:20 am
After reading a bit more i'm not sure the Almond+ would be suitable to do this.
Since it is based on Java, one would need Java to run on the Almond+, and although I'm sure the Almond+ could run Java if you got it working, Java is quite resource hungry and it would probably eat up too much resources, leaving nothing left for any other stuff.
Title: Re: openHAB
Post by: FrederikSchack on July 30, 2014, 05:24:19 pm
My God! It's full of stars!

It does everything I dreamed of in this post:
http://forum.securifi.com/index.php/topic,1288.0.html

Even the code completion and collection of historic data (OpenHAB Persistence with for example MySQL)!

It comes with WebUI and Android, iOS and Windows Mobile apps, freely updated by a community!

This is exactly what Almond+ needs. The basic home automation is in place, we just need OpenHAB (or OpenHAL ;-)) on top of it.

Almond+ has a decent processor (1 GHz dual core), so maybe if they have an efficient interpreter? In the presentation they also say that it runs on Raspberry PI which has a max 1 GHz single core ARM CPU. So I see it happening.

http://parleys.com/play/5148922b0364bc17fc56c8c3/chapter10/agenda


This would blow away Fibaro, MiCasaVerde and all the others. Man!
Title: Re: openHAB
Post by: pete on July 30, 2014, 07:29:56 pm
Been playing a bit with OpenHAB on an Intel Atom based touch tablet running Ubuntu 14.XX.  (Intel Atom Z520 (1.33 GHz, 512KB L2 cache))

Runs much better in Linux than same touch tablet running Wintel.

Not sure how well it would do on the Almond +.
Title: Re: openHAB
Post by: cputoaster on July 31, 2014, 04:12:41 am
http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html would suggest that it works more or less out of the box, using the official oracle-optimized java, but with debian instead of openwrt. Now we just need someone with an almond+ to actually try ;-).
https://blogs.oracle.com/hinkmond/entry/freescale_one_box_unboxing_then this would suggest that openwrt is not a problem either. HW wise, I don't hink openhab needs much resources, its supposed to be programmed lean and mean, less ram would just mean that one would have to artificially limit the JVM max ram usage to force more GC.
Title: Re: openHAB
Post by: LGNilsson on July 31, 2014, 04:54:55 am
Keep in mind that the firmware on the Almond+ is loaded into RAM, so the full 512MB isn't available.
Below is the output from "top" at the command line
Code: [Select]
Mem:    432392k total,   114672k used,   317720k free,    11564k buffersShould still be plenty available memory though as we seemingly have some 300MB left to go around.

Also, we have a 750MHz dual core, not a 1GHz. That said, once all the driver work is done, courtesy of a network offload co-processor, the Almond+ will be using very little of the Cortex-A9 part of the SoC when it comes to handling any kind of network traffic, unlike most routers where a large chunk of the CPU is used to handle the network traffic.
As a quick example, I was testing some stuff the other day and used an Asus RT-AC66U which was using 50%+ CPU whereas as the Almond+ was using 15-20%+ doing the same thing and that's without the offload being fully implemented.
Title: Re: openHAB
Post by: FrederikSchack on August 01, 2014, 03:54:38 am
Hi Lars,

If there's no technical issues that prevents OpenHAB from working on Almond+, do we then have a decent chance that it will be implemented at some point?

Best regards,
Frederik
Title: Re: openHAB
Post by: LGNilsson on August 01, 2014, 04:57:20 am
I'm not sure it'll be something we'll be doing, it's at least not something we're planning for the next 12 months, but it's most definitely possible that someone, say one of our developers, could do it.
Title: Re: openHAB
Post by: Automate on August 02, 2014, 10:31:55 pm
After reading a bit more i'm not sure the Almond+ would be suitable to do this.
Since it is based on Java, one would need Java to run on the Almond+, and although I'm sure the Almond+ could run Java if you got it working, Java is quite resource hungry and it would probably eat up too much resources, leaving nothing left for any other stuff.
If so http://www.domoticz.com/ may be another option.  It's free and open source also.

Quote
Domoticz is a very light weight Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device. Supported platforms:
Unix/Linux, (Raspberry Pi/Cubieboard recommended) Windows
Compatible browsers: Chrome/Firefox/Safari/IE 10+/...

Domoticz is written in C++ the same as the Almond+ SDK
Title: Re: openHAB
Post by: anthonylavado on August 03, 2014, 01:48:14 am
http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html would suggest that it works more or less out of the box, using the official oracle-optimized java, but with debian instead of openwrt. Now we just need someone with an almond+ to actually try ;-).

I do run it just fine on a Raspberry Pi Model B here at home, and they've mentioned that as they are working towards version 2.0, they are trying to optimize for smaller platforms. The real trick (other than running it on an Almond+) is somehow getting access to the Z-Wave and ZigBee hardware in the Almond+ to actually *do* something with OpenHAB.

As of right now, I haven't heard of a way to interface with the Z-Wave or ZigBee chips, and there doesn't appear to be any plans to give us that access (at least not at the moment, maybe further out).

Edit: Just reading my other thread again about the SDK, while there doesn't appear to be an official "API" of sorts that we can call, I wonder if the SDK can be used to build an app/function/add-on for the Almond+ that exposes a function like that?

The home automation software side of things here breaks down in to two parts then:
1) Getting the functions people want most (whether it be built in to NutsOS or alternative software)

2) Making sure there's a way to access those control functions remotely, or from another device

For example, I can run OpenHAB on my Pi while we wait for the HA side of NutsOS to take shape, but I'd love to use the Almond+ as my Z-Wave hub. For this to work, the RPi would need to be able to make calls to devices and such on the Almond+.
Title: Re: openHAB
Post by: LGNilsson on August 03, 2014, 05:30:47 am
It should be possible with the SDK, yes.
It might require a skilled programmer for some of it, but there's no reason as to why this shouldn't be possible.
Let's see how our automation solution ends up though, as if what I've seen will play out the way I hope it will, it'll be quite different from what everyone's used to.
Title: Re: openHAB
Post by: cputoaster on August 22, 2014, 05:59:21 am
Reading a bit more about how OpenHAB interfaces with z-wave, it seems to be via some USB serial port. Is that how the zwave chip is integrated in the almond+ too (from a sw perspective)?
Title: Re: openHAB
Post by: LGNilsson on August 23, 2014, 09:13:26 pm
Not quite, both ZigBee and Z-Wave are connected directly to UART, i.e. a serial port, there's no USB inbetween.