Yet Another Client

About a year or so ago a new (great looking) Android client came to life. Functionality and bugs were fixed over the year that followed, but then the developer decided that the client would be a pay-only client, and while a nice GUI, the pricing suggested would be out of my budget, as I have more time than I have money, to spend on a nice GUI.

I struggled with this and decided to see if there was any other (nice) options out there. There a few clients out there, but nothing to my liking. My long term plan is to add small 5 or 7" screens to where the wall switches are currently located. After much back and forward, I’ve decided that small android tablets would be better (and cheaper) than a cheap R PI clone (Orange PI Lite) with a quality LCD screen, and to write it in Xamarin.forms (.NET) C# as I’m not a developer, but written the odd few pieces over the past few years in C# and I found a great free book “Creating Mobile Apps with Xamarin.Forms” to help me along the way.

Using Xamarin.Forms would allow the client to run on Android, iOS, Universal Windows, Phone 8.1 and WinPhone 8 (apparently). The client may even be portable using Mono to run under Linux GTK#? or winforms (for the brave).

I’ve purchased a (cheap) Amazon Fire 7" to develop the client, as it has really good viewing angles, as my other cheap tablet from Aliexpress was beyond disappointing.

There is much to do, but this is an initial screenshot of a couple of “widgets”. First row are all the same widget, but with different parameters. These also handle negative “ranges”, a point of issue with the other client. 2nd row is another “widget”. 3rd row has three “widgets”, an on/off button, date/time over 2 cells and a blank (also missing from the other client). I also prefer the hour in the date/time field to have 2 digits as I probably suffer from OCD, and this makes it more “balanced”.

https://github.com/johnjore/Kala/blob/master/Screenshots/Sitemap%2C%205x3.png

For the Sherlock of you, yes, its very similar to the other Android client and I’ve used Google’s dark theme and their icon library of about 950 icons.

Anyway, these “widgets” are GUI only at this point as the REST API part has not been written, nor has preferences, multiple pages, screensaver or the other widgets, so plenty of work, but I only started a couple of nights ago. The client is mainly written for me and my needs, but I’m sharing it on GitHub if you want to use it or if you can help out.

I have no set timelines, but as I’m planning on using this myself, the sooner the better. If you would like to use it, don’t bother asking when it will be ready, it will be ready when its ready and I find time to work on it. There is also no point in reporting bugs as it doesn’t actually work yet…

Anyway, maybe I see you over on GitHub

JJ

5 Likes

I would love a panel based android GUI which is open source, I’m guessing your plan is to have it’s own unique theme rather than being very close to the other android client as you speak.

How would you see this working better than say a dedicated app that shows a page from HABPanel?

Hello!

Honestly, I don’t see a reason for changing look and feel of the UI. Problem with “other Android client” is not the way it looks, but the fact it will become a commercial application. I was wondering what kind of setup will your application use - sitemaps or on-device setup?

Best regards,
Davor

Great thing! I used the “other client” too but i will not pay per device… I want to use the ui on many tablets around the house - so it would be very expensive… So i´m looking for a nice android-client. Habdroid is ok for a short overview when i´m out of town, because i can see everything like in the web-frontend, but home use or for my wife there is no acceptance factor. The “other cleint” was great but not this kind of lincencing model.

@Benjy:
Unique theme? Open and Free is the unique theme.

HABPanel and dedicated app: Each user needs to decide what works best for them. I have no interest in the Java based HABPanel.

@davorf:
Sitemaps. No interested in manually managing each client. I’ll start working on the REST API part this evening. Sitemap layout should firm up with this done.

JJ

1 Like

Hello!

Exactly my point of view. It may look appealing and easier for beginners, but it’s too complicated to maintain multiple devices with on-device setup.

Best regards,
Davor

Initial REST supported added, and documentation updated with a couple of screenshots and a sample Sitemap. GUI doesn’t yet update it self, nor are the values linked to items. Both are next on the todo list.

Layout is currently crud and simple, with no automation in grid size or layout.

JJ

1 Like

@johnjore - great work. I use Imperihome, which I like, but im concerned about the developers interests in further development and taking user suggestions… as such im constantly watching other clients and was looking forward to the “other Android client” until the pricing was revealed…instantly lost interest.

So I wish you luck and will definitely give this a go when you have some more of the basics done and I find some more time. I hope I can help by providing feedback etc.

Thanks again!

I got side tracked, but github now has a version that updates the GUI as changes happen. (Only a few object types for now; (guage and switch). A simple screensaver has been added. Button for on/off also works. GUI does not scale the “widgets” correctly on all devices, looks pretty bad on my phone, but looks fine on the Fire.

In other words, most of the main components to make it sortof usable are done, with incremental improvements to be added as time goes by.

The Wiki is now world writable, so if anyone is interested in helping out maintaining it, please do. Ping me for an updated sitemap and I’ll include some basic explanations for you to format and edit on the wiki.

Google Play charges 25$, so sideloading is the way forward, at lest for now. I’m also not interested in a loads and loads of negative reviews as its work in progress. Let me know if you need a pre-compiled APK, and I’ll start uploading them to GitHub, else just download the latest source, compile and deploy.

I don’t know how much I’ll get done this or next week, but at the top of my todo list is:

  • Add dimmer slider
  • Add Weather widget
  • Improve widget scaling issues for Gauge, Dimmer and Switch.

JJ

PS: If you have dev or designer skills, please help out. Source files are a mess and could benefit from a bit of refactoring…

@ptmuldoon,

No, this is not written using Java, but C#. On Windows, use Visual Studio and Xamarin.

JJ

@johnjore

I just (hopefully correctly) build the apk and installed it on my phone. But the app only seems to want my openhab server ip info. And when entering that, still can get it to connect or do anything.

Doe the app need a ‘Kala’ or specific site map to continue?

Hi and very good. And yes, it needs a sitemap. Attached is a file I’m working on. Remove the “.xml” from the filename and ignore the weather parts, still a work in progress. The rest should work. There is limited error handling, so maybe delete the weather parts if things go really bad or crash… Its on the todo list… On the settings page, specify “Kala” as the sitemap (last entry), its case sensitive, if you use the attached file, and save it as “Kala.sitemap” in the sitemap area.

If you have time, please do update the Wiki on github with some documentation, maybe a page per widget, and one for the sitemap itself?

The general gist of it is px and py is position; what cell to put what in (0 based).
sx and sy is size, and icon is the file name from Google’s material icons. They have all been added to the app and are embedded in the apk. Filenames can be found @ https://material.io/icons/

From the sitemap definition itself;
sitemap Kala label=“Office {kala=true,screensaver=600,fullscreen=true,background=212121,cell=424242,text=ffffff}”

screensaver part states it should activate after 600 seconds, and fullscreen should hide the top/bottom. The rest are color codes. Fullscreen takes two loads to take effect as it needs to be set early on, but by the time the sitemap is read, its (currently), too late to set to take effect, but is cached as part of settings for next time.

Happy to provide more documentation, but this should provide a starting point?

Out of curiosity, what android version and do you know the screen density? (mdpi? xxdpi?)

Screenshot in post #1 is from a 7" mdpi device (Amazon fire). Proper handing of different screen resolutions has yet to be done, and it looks pretty bad if the cells are made too small.

My plan is to finish the weather widget and then add functionality to embed other sitemaps into the initial sitemap, this should reduce overhead trying to keep multiple devices with different first pages, but identical 2nd and 3rd page etc.

JJ

Kala.sitemap.xml (2.4 KB)

I’ms still struggling some to get the app working.

Maybe a dump question. But is app/client working for OH2 or Open Hab 1? I’m mainly moved over OH2 now.

I did add the Kala.sitemap to my OH2 setup. Do you need to include a username and password as I’m not sure what those setting would be since i don’t use a user/pass currently in accessing OH2.

Think its time to open the issue tracker on github. Please open a ticket there?

Should work on OH2 but not tested. Looking at the http connection part, I can see the code will always try and add authentication. A small change to suppress that when username is blank is probably a good idea. Dont’ try and use HTTPS unless the certificate is trusted and the cert name and the hostname match.

JJ

Hi - this looks very nice.
Is it still under active development?

As most of the critical items have been implemented, and I’ve been busy with other projects, progress has stalled a little, but its still under active development. Feel free to help out if you have time and skills.

JJ

Could you perhaps put an apk somewhere?
I would like to test Kala, but hesitate to set up the complete build environment.

Hello!

This would be really great. I’m a developer, but never used C# or .NET development tools. We could try your application and, for what it’s worth, help with testing it.

Best regards,
Davor

Any news? I would really love an android app.
Key Feature for me is Test-To-Speech + Screen-Save so my tablet doesn’t burn in.

Not really, logged a few open bugs on Github, but no active work has been done in the last few weeks due to other projects and travels. Feel free to help out…

JJ