This page last changed on Aug 29, 2013 by marco.miccini.

Hello everyone!

I'm new with OR.

I'm thinking to use it for my thesis of engineering IT.
I will use a microcontroller of Texas Instruments (AM335x ARM - http://processors.wiki.ti.com/index.php/AM335x_Starter_Kit) where I can use a customized version of Linux or Android 4.0. I'll have to use it as controller with an interface and I'll also access to it via a smartphone or tablet. So OpenRemote could be perfect for my purpose!

The only issue is to put it in the microcontroller. Can I use only Linux? Is it possible to put OR on Android? I've searched a little in the forum, but I didn't find nothing about this.
If I can't use Android as controller, could I have problem with a customized version of Linux?

Any help or suggestion are welcome.

As long as you have a Java available for the Linux on your microcontroller you should be fine.
I was able to install a normal Java on Android (need root rights for that) and had the controller running there.

Posted by mredeker at Aug 30, 2013 08:32

Thanks Marcus!

I'm also interested to use the OpenWebNet protocol.
I've found this thread: http://www.openremote.org/display/forums/adding+openwebnet+support
but the discussion was locked and it seems that there isn't a real and complete integration of this protocol on OpenRemote. Is it right or are there any news about it?

Posted by marco.miccini at Aug 30, 2013 23:49

We never digged deeper into OpenWebNet. But it seems that our generic TCP protocol cannot be used to have it work correctly.
An OpenWebNet protocol would be nice to have but at the moment no time and resources to implement something.

Posted by mredeker at Aug 31, 2013 20:21

Marco,

if you'd be interested in working an OpenWebNet protocol into the codebase, please let us know.

Posted by juha at Aug 31, 2013 20:23

Hi,
I think it will be needful for my thesis, but it will be in the second part of my job.
I will signal you when I'll start with this part of my project, and I hope you could give me a little of support.

Posted by marco.miccini at Sep 01, 2013 17:16

Ok, no problem. The libraries for the protocol already exists, so it is "just" a matter of integrating them with OpenRemote – no need to re-implement the network protocol. Julian Divett has been looking at the options (as there are several libs available) so let me know when you're ready and I'll put the two of you in touch and you can discuss trade-offs.

Posted by juha at Sep 06, 2013 22:28

Hello Juha!
I just finished to put OpenRemote into my embedded linux. It seems to work, but I've nothing to test it. So, at first, I would ask you a virtual demo application to test the system without any devices attached.
Then, I'm ready to go with the integration of the OpenWebNet libraries into OpenRemote, so please, let me start with this.

Posted by marco.miccini at Oct 03, 2013 09:18

To get started, you can install any software on your PC that accepts, for example, HTTP commands – XBMC, VLC, or something else (TCP or Telnet commands work to some extent too). So you can build a test setup that's not related to openwebnet to get something working.

Posted by juha at Oct 22, 2013 01:01

Thanks Juha!
I created two simple applications from the online tutorials, with XBMC and Shell Script, and they all work.
Now I'm looking at the source code to begin with the protocol integration.
Any helps are welcome!!

Posted by marco.miccini at Nov 04, 2013 17:01

Marco,

For the actual protocol implementation, you should look at pre-existing libraries that can be integrated to OpenRemote. No need to re-invent that particular wheel. However, the license compatibility must be checked for any new library.

So check what available libraries are out there, and let's discuss the suitability either here or on Skype.

– Juha

Posted by juha at Nov 06, 2013 02:10

Hi Marco - I have a BTicino/Legrand lighting system which uses Openwebnet. I have been able to turn on/off lights but we have not been able to get feedback using the standard OpenRemote TCP implementation.

I have found some Java libraries which are Open source and we could possibly use those to create a proper protocol for Openwebnet. These are at the Myopen website is a good place to start and there are a few people over there who could help. You will find some threads regarding Openremote.

Unfortunately I do not programme in Java but if you want to test your implementation I am happy to help.

Julian

Posted by jules_bike at Nov 06, 2013 10:59

Hi Juha and Julian,
I've found four different openwebnet library:
http://openwebnet.codeplex.com/
http://code.google.com/p/bticino-openwebnet/
http://code.google.com/p/freedomotic/
http://code.google.com/p/open-web-net-monitor/

The first one seems to be the most complete and it's written in C#. It's under GPLv2 license.
The second seems to be good too and is written in Java. It's under Apache License 2.0 (I don't known it).
The last two are uncomplete, so we can no consider them.

What libraries did you find, Julian?
I've just visited the Myopen website and I'm going to register into it to find some other interesting material.

Now, I go to analyze this two libraries.
If you prefer to discuss about all this on Skype, this is my contact: marco.miccini.

Marco

Posted by marco.miccini at Nov 07, 2013 17:43

I have tried a couple of solutions:

I tried the last one on your list which uses the btcommlib but had some timeout issues for large queries and it only allowed one connection at a time.
I downloaded freedomotic who have a web front end which does myopen home automation and I guess you could extract their libraries for communication.
I then got in touch with Fabio Crisciani on the Myopen site who has some libraries here: myhome libraries he seems quite willing to help. There is an italian discussion on the Myopen site here

For testing there is a useful Windows/Linux front end that monitors the Openwebnet session. It is called JClientOpen which you can download from the Myopen website here.

Definitely the myopen site is a great resource.

Good luck!

Posted by jules_bike at Nov 07, 2013 20:32

Somebody called Bticino send us a jar file the other day.
The file is called hsyco.jar and comes from www.hsyco.com.
I don't know if that is of any help?

Posted by mredeker at Nov 07, 2013 21:28

Hi Marco,

The apache license is compatible and for a Java based library the second option seems like a good one if you think it's complete (http://code.google.com/p/bticino-openwebnet/). Not sure if Jules has had any experience with this library yet.

– Juha

Posted by juha at Nov 07, 2013 22:56

@Marcus
I've visited this website. It seems interesting. It would be also interesting to known the content of jar you received.

@Julian
What about the library cited by Juha? I don't really know if it's complete, but it seems like so.
Did you do any test with the Fabio Crisciani's library? Is it complete? It also seems good...and tested.

Posted by marco.miccini at Nov 08, 2013 16:08

Hi Marco no I've not tried either of these.

Posted by jules_bike at Nov 08, 2013 17:15

We just realized the jar does not expand and is broken.
Maybe you can find out anything on the hsyco.com website.

Posted by mredeker at Nov 08, 2013 23:21

Hi all!
I visited the MyOpen website and I found many interesting arguments.
I think the best library to use is the one mentioned by Julian, already used in another project (Freedomotic).
Then I'd like to known if you have made some tests with the telnet protocol, instead of HTTP.

Now, I might start with the integration, but first I need a complete local system.
It's all ready and (I think) working, except the Designer.
I used these snapshots:

  • Beehive_1_0_0_SNAPSHOT20090401
  • Controller_2_1_0_FM_SNAPSHOT-20130617
  • Designer_2_14_0_SNAPSHOT-2013-05-11

I followed the corresponding readme file of each one to compile them. During the compiling of the Designer, I have also set the mail configuration with a valid server.
Then, if I click the link to create a new account it gives me some errors.

So I tried to manually insert my account into the database (as suggested in this thread), but if I try to login it gives me back the message "The username or password you entered is incorrect.".
What am I doing wrong? These are the records inserted into the db:

  • account:
    oid
    1
  • user:
    oid email password register_time token username valid account_oid
    1 my_email my_pwd NULL NULL my_username 1 1
  • user_role:
    user_oid role_oid
    1 1
    1 2
    1 3

My only doubt is relative the valid field. I set it with '1' value, but when I do a query from my command line, I receive a non-printable character instead of 1.

Please HELP ME!!!

Meanwhile I'll try to compile another version of the Designer.

PS: In fact I also had a problem with the webconsole, but for the moment it's not important and I solved taking one already compiled.

Posted by marco.miccini at Nov 11, 2013 19:45

Hi Marco - you should not need to download the beehive or designer these are cloud based servers that we all use to build and store our configurations for OR. The controller is the only software you need plus of course an app for each of your devices that will act as the user interfaces. These you download from App Store or Play store depending. You can use Webconsole but I have found that it does not work as well as the apps.

Posted by jules_bike at Nov 11, 2013 20:22

Hi Julian,
I know it, but to integrate a new protocol I need to customize the Controller and also the Designer. So I need to have them running on my machine to test the integration.

Another question for Juha: what version of every package do you suggest as starting point?

Posted by marco.miccini at Nov 12, 2013 08:35

Password should be hashed, so easiest solution would be to do a forgot password but if you have issues with e-mail sending, then that won't help.

Posted by ebariaux at Nov 12, 2013 10:36

Thanks Eric!
I fixed the problem, as reported in the other thread, but now I have another problem.

After doing the login, I receive the alert "The response could not be deserialized" and a blank page is showed.
I'm trying to resolve also this problem, but for the moment I haven't been able. Some helps are very welcome!!

Posted by marco.miccini at Nov 12, 2013 10:49

Could you post the whole stacktrace ?

Posted by ebariaux at Nov 12, 2013 12:22

I tried with Designer_2_13_9_Rosemary_20130330 and the problem isn't present.
So now I can start my job!

Anyway, a building Designer guide could be very helpful...

Posted by marco.miccini at Nov 12, 2013 12:37

I haven't been able to find any logs relative to this problem. The only thing that I can see is the error window with the message above. But I'm a newbie with tomcat, maybe I'm missing something.

Posted by marco.miccini at Nov 12, 2013 14:46

After many and many tries, finally I've been able to make all working. I used:

  • Beehive_3_0_0_Alpha5
  • Controller_2_1_0_FM_SNAPSHOT-20130617
  • Designer_2_14_0_SNAPSHOT-2013-05-11
  • WebConsole_2_1_2_ProInstaller_1_0_10

I refined the pre-built configuration and used another version of gwt (2.4.0).

Posted by marco.miccini at Nov 15, 2013 10:38

Hi all!
I began to integrate the OpenWebNet protocol into OpenRemote.
Currently I can send command to the OWN gateway through an implementation of the ExecutableCommand interface.
Now I'm trying to receive a message from the gateway (after sending a query command to it) with a polling interval, but I don't understand very well what the right way to follow should be.

In your guide, I saw different interfaces to follow. The first is StatusCommand, but it's mentioned as deprecated.
Then, there are two implementations of the EventProducer interface: ReadCommand (that is an abstract class) and EventListener (that is another interface). EventListener should be used with asynchronous notifications, ReadCommand with polling interval.
So I suppose that I should extend the ReadCommand class, but it has a fixed polling interval set to 500ms.

So these are my questions:
1) Is this the right way?
2) How can I set a dynamical polling interval taken from the xml file generated by the designer?
3) How can I get the sensor type in the read method of ReadCommand? Or how can I know what kind of sensor I'm handling in the read method?

PS: Maybe, should I move the discussion to the design forum...??

Posted by marco.miccini at Nov 27, 2013 10:18

Hi,
this sounds great. Maybe a forum thread with OpenWebNet as title would help
Your command should implement the EventListener interface and not the deprecated polling interval.
Have a look at the HTTP protocol which is working similar.

Maybe the OpenWebNet library is even able to send data only when available without using a polling?
Some kind of open socket connection and whenever data is available you would parse that and update the given sensor in your EventListener.

The EventListener interface gives you the sensor and when you have data to update you just call setValue() on the sensor.

Posted by mredeker at Nov 27, 2013 10:35

Thanks Marcus!
I moved the discussion to a new thread.

Posted by marco.miccini at Nov 27, 2013 17:11
Document generated by Confluence on Jun 05, 2016 09:42