This page last changed on Jul 17, 2014 by druciak.

This is my first post so I'd like to say hello.
I am currently making design of my home automation system and I am looking for a controller. It will be based on z-wave/1-wire/http components and I would need a web based and Android client. OR at first look was a great solution, but after while I realized it has some limitations and does not seem to be mature enough.
Here are my questions anf concerns:
1. Onewire implementation seems broken, sometimes it cannot read values (displays "N/A"). I tried implementation done by Tom Kucharski and it is much better (thanks!). It would be a solution unless I need another feature from another developer, which makes controller build much harder.
2. Z-Wave limitations. I don't have any z-wave device yet to test OR with, but I read that z-wave is also not well implemented and limited to 10 devices only in free version. $150 seems pretty expensive for the software only, and for the software that does not work well.
3. I don't see any option to format sensor's value. I'd like for example format temperatures to one decimal digit, but for sure there are many other use case it would be needed.
4. Is there a way to poll more than one value for a command? For example I have a weather station that has all the sensors exposed by HTTP and JSON. To have each value from the station I needed to declare separate command and each of these command makes its own HTTP request. It does not make sense IMO. In such case it would be better to make one request and feed all the sensors with values.
5. I created a panel with a switch. This switch is for OneWire command. In general it work well in WebConsole, but in Andorid app it does not display switch state. I suspect this is due to sensor value which is 0/1 instead on/off, but on the other hand it work well on web console. Having in mind that there is no option (is there?) to convert these 0/1 to on/off I don't see a solution for that.
6. I prepared a background image for my screens, simple white dot (1x1) which is stretched to fill the screen. I works well in web console (background is white), but again not in Android app. Am I doing something wrong or there is a bug in the app?
Thanks for any response, any answers and solution are very welcome.


sensor.png (image/png)

does not seem to be mature enough

Then why bother? Move on to mature ones.

"Darowanemu koniowi nie zagląda się w zęby"

Posted by aktur at Jul 16, 2014 22:11

I was hoping some of my questions can be solved somehow, since I am discovering OR and likely there are things in there I am not aware of. But apperently your knowledge in this matter isn't better than mine.
I will try to domesticate OR for a while and then decide what to do.

Posted by druciak at Jul 17, 2014 07:33

"Darowanemu koniowi nie zagląda się w zęby"

What he says is not only true for the free version, but essentially also for the Pro version that he is considering. The Pro site pretends to sell mature products. Imho it does not make sufficiently clear to new users that they need to have quite some technical background. So making that quote is a bit harsh I think.

Posted by pz1 at Jul 17, 2014 08:33

Thanks, I was going to mention this as well...

Posted by druciak at Jul 17, 2014 09:32

I solved some of the issues (more-less):
1. Using Tom Kucharski controller.
5. Using SWITCHABLE sensor. It also has limitations, for example it does not read current value, so changing value of SWITCHABLE sensor outside the controller does not change switch state. Not sure which option is better...
6. For the first tests I installed version from Google store, which seems to be older than on SF files. Now with 2.1 it works better, but size of the panel does not reflect screen size - it is much smaller. The previous version resized panel to fill the screen. Is there a way to fix this? Or I should just prepare a custom panel with proper size?

The rest is not so important, maybe except for #3.

I have one additional question: how can I build Android console, I mean where are the sources of the latest published version (Android_Console_2_1_0_SNAPSHOT-2013-03-02.apk)?

Posted by druciak at Jul 23, 2014 19:57

3. I don't see any option to format sensor's value. I'd like for example format temperatures to one decimal digit, but for sure there are many other use case it would be needed.

The rest is not so important, maybe except for #3.

You can use rules for this. One example is available here http://mqlservice.net/openremote/2013/05/22/temperature-sensors-calibration/

Posted by aktur at Jul 24, 2014 09:25

Nice! Will try it soon. These rules are really powerful and this may be the reason to stick with OR. Already had a look at Drools docs, but haven't written any rule yet.
Thanks a lot. It should also help with #5 I guess, but I think I will fix the code once I get the info where I can pull the sources from. In WebConsole this is done in this way (org.openremote.web.console.widget.SwitchComponent):

if (!value.equalsIgnoreCase("off") && !value.equalsIgnoreCase("on")) {
	try {
		int numValue = Integer.parseInt(value);
		numValue = numValue > 0 ? 1 : 0;
		value = numValue == 0 ? "off" : "on";
	} catch (Exception e) {}
}

BTW: the middle line seems not necessary, anyway it works.

Posted by druciak at Jul 24, 2014 09:51

Finally I got my rule working, but it was pain in the ass, believe me. Here is the code:

package org.openremote.controller.model.event

global org.openremote.controller.statuscache.CommandFacade execute;

rule "Format temperature"
when
  CustomState(source matches "Temp.+(?<!_F)", $s: source, $v: value)
then
  double parsed = Double.parseDouble($v.toString());
  String sens = String.format("%s_F", $s.toString());
  execute.command(sens, String.format("%.1f \u2103", parsed));
end

I had to define additional sensors and command for each command/sensor pair I'd to format. The convention is to add "_F" suffix to the name. It works for all sensors with name starting with "Temp".
Two questions:
1. Is there a way to check a command exists?
2. Do I need to have sensors for "raw" value? Is there a way to read the value directly from a command in rules?

Posted by druciak at Jul 25, 2014 12:02

1. Is there a way to check a command exists?
2. Do I need to have sensors for "raw" value? Is there a way to read the value directly from a command in rules?

1. No.
2. Yes. No.

Posted by aktur at Jul 25, 2014 14:32

The Android screen size and density issues are a bit complex: http://jira.openremote.org/browse/ANDROID-91 I got as far as I could on that before needing to move on to other projects.

You're on the right track for what currently works well by thinking about making a custom panel of the appropriate size. Unless the code has changed significantly since I last looked at it, someone will need to continue working on the ticket above in order to make that part smooth. The older versions just used auto-scaling, but that decreases picture quality, so it was desired to find some way of allowing really high-resolution backgrounds to look good without sacrificing usability and backwards compatibility. Not so easy.

I was thinking about having the designer have a few more Android sizes in it. That may require some user involvement, but could at least make a better, simpler alternative to having to do a custom panel.

Thanks for the feedback,
Andrew

Posted by cortextual at Jul 27, 2014 22:00

Thanks for the explanation. I think auto-scaling as an option would also make sense even though the quality decreases. This way you let users to choose. Do you know where I can get the latest code of the Android panel?

Posted by druciak at Jul 28, 2014 08:18

The person on this forum who should know everything about Android console (and web console too) is Richard Turner. You can start looking in his workspace https://svn.code.sf.net/p/openremote/code/workspace/richturner/. I would be too interested in a better Android console as right now the ones designed for iPhone are not looking good on Android devices. They were better with auto-scaling.

Posted by aktur at Jul 29, 2014 10:28

I am running version 2.1.1, which I got end 2013/begin 2014 for test towards (IIRC) a new formal release in the playstore. For unknown reasons that never happened.
PS: I don't think it does auto scaling.

Posted by pz1 at Jul 29, 2014 11:00

Thanks for the info, I was looking for repos with 2_1_0 in the name, but it seems his "Android_Console_2_0_0_Betas" is the main repository for the console. Also I found out that there is a tag for released 2.1.0 in his "tag" directory. I am going to get familiar with this code soon, at least I hope.

Posted by druciak at Jul 29, 2014 11:08

I solved #5 by adding custom state items:

This is better than changing Android app code or adding a rule. I think it is also better than "SWITCHABLE" command.

Posted by druciak at Jul 29, 2014 19:19
Document generated by Confluence on Jun 05, 2016 09:38