Android app

Hello I have been toying around a little bit with android and vera. I have created a little application called Elisa (loosely based on my two daughters Lisa en Eline). At this moment Elisa is capable of:

[ul][li]control device locally and remote[/li]
[li]displaying devices in a device view and execute their default action[/li]
[li]displaying events in an event view and execute them[/li]
[li]displaying a floorplan with the devices on them[/i][/ul]

The floorplan is completely in mock. The points are hard coded and also the devices. I am a little stuck in this area, since I now need a place to store these values. With my current vera version(1.0.979) I don’t know where to store the points for the floorplans. I have trying to figure out, if I could change the userdata which is send by vera. But I could not find it. From what I understand the new versions have floorplan support, so probably the userdata is expanded with these values. So upgrading probably solves these issues, but what if i want to store some more data. E.g. the scene list is cluttered with scenes i use for my qees remote but i probably want to hide in my phone. So i would like to have the ability to store these values in vera. Does anybody have some recommendations on how to expand the userdata call or to create a new webcall al together.

In the screenshots in the device view, you can also see that the ping sensors are picked up as motion sensors (i will change that). I am also just started with a .net wpf application to design the floorplan (i somewhat missed the flash work and i like smart clients better then webapplications). The wpf application has the same problem as the android app, my vera version is not ready to store/read floorplan data.

I plan to put this code in public domain. But i need to find a place where to put it (preferably in git).

When browsing this forum I also found rakstars homebuddy, which also looks nice.

Very interesting!

Is it a native Android app? which calls are you using to interface with Vera?

Is it a native Android app?
No, its created fully with the android SDK, not with the NDK.

which calls are you using to interface with Vera?
The ones described in the “UI Notes” section building a control only UI. All responses are requested in xml. Perhaps I will switch to json, if it’s more performant.

All interaction between UI and veraservice is asynchronous, so the UI remains to feel responsive.

In the [font=courier]data_request?id=user_data2[/font] result, you can see the [font=courier][/font] section, where every room is listed with name, posx/posy and width/height. Also, on each device definition, if it has been placed in a room, there are room, posx and posy attributes. If the room attribute is 0, then it hasn’t been placed so there’s no position, it’s only listed in the unassigned devices box.

I’m not sure why you’d like to store data on the Vera. maybe you want to be able to modify the floorplan from your app instead of just using what is already positioned on the Flash UI?

Note I still have firmware 1.0.979 (stability is a very important, because it has a big effect on the waf factor :D)

In the data_request?id=user_data2 result, you can see the section, where every room is listed with name, posx/posy and width/height.
That means that every room must be a rectangle, ouch…

I’m not sure why you’d like to store data on the Vera.
My floorplan is something I would like to share, between various devices (my phone, my wifes, my computers). So it must be on a server,
otherwhise i need to replicate it on each device…

Nice one! I wish I had time to continue what I started for Vera’s touchscreen interface…

Is it available on the Market?

No it’s not in the market. The main reason is that the floorplans are still mockups (the point collections are hard coded). I hope that somebody can help me a bit further to upload these point collections to vera (either by cracking open the userdata or by creating a new http call altogether) (hint hint). The second reason is that I have no clue how to place it in the appstore.

I also have some other todo’s on my list before I would call this app finished:

[ul][li] remove mock code and replace with data originating from the vera [/li]
[li] clean up code and document (this is my first android app and i am a c# guy are my excuses :D) [/li]
[li]stabilize the code when wifi was enabled and the device goes to sleep and then powered on (seems to be a general Android problem, since all apps on my phone are complaining about the connection.[/li]
[li] Recognize device more finegrained (e.g. the ping sensors are picked up and displayed as motion sensors) and create som nice icons [/li]
[li] Create long ‘mousedowns’ to handle special execution options e.g. for a dimmer a long click should display 0, 25, 50 75, 100% dialog [/li]
[li] Optimize the response times between execution and ui update (it’s reasonable but could be better)[/li]
[li] Create a notion in the ui when the app is updating its data [/li]
[li] Extend configuration options, with update rate and possibility to call automatic fetching all together) [/li]
[li] Extend the ping sensor code with the option to wol some computers and add support to this app [/li]
[li] Extend the ping sensor code with snmp options and add suppor to this app (i’d like to see when my disks run out of space) [/li]
[li] Add the ability to hide rooms, devices, scenes [/li][/ul]

And probably I could think of more… My biggest problem is that a day only has 24 hours ;D

Nice one! I wish I had time to continue what I started for Vera's touchscreen interface...
I plan to place this one in public domain (i am awaiting javiers plans for the app store and code repo), so then perhaps we could join forces.....

I also have plans to port this app to windows mobile, my wife has a winmo phone. I think this should not be too difficult (I know that platform way better and I already have reasonable portions in .net, so porting to compact framework should be doable)

Great
Does it connect over 3G, LAN, or both?
Can your app show images from the camera devices?

Both 3G and LAN (3G goes through find vera, LAN connects locally).

No camera support, I don’t have a camera.

I think I’m also not allowed to buy a camera, my wife is still getting used to the idea I can control the lights and track motion :wink:

might want to hop in on this discussion about sharing code. there’s currently not a plan- but maybe you should chime in with your thoughts to help come up with a plan.

http://forum.micasaverde.com/index.php?topic=3064.msg13910#new

good luck!

Hmmm… a WPF app for floor plans, eh? Open Source? I’m on board!

I plan on contributing a Voice Command WPF application once i round out some things. Currently this app polls only once for devices and then builds a grammar for commanding binary and dimmer devices via GET web requests. That being said its only setup to work locally at the moment - not sure if it makes sense to work remotely. Works well, sometimes it picks up phrases that rhyme, but it really just brings ‘light’ to the conversation (har, har har).

I had no idea how I was going to tackle the floorplan side of things, figured i’d just allow users to upload a BMP and then let them drag/drop some device pointers or something. maybe we can work on this?

I’d love to get into to Android development, maybe we should talk @structor - sounds like we might be able to help each other out here.

Hmmm... a WPF app for floor plans, eh? Open Source? I'm on board!
It's not open source yet ;). I would like to publish it, but need to clean up a bit and preferably in a scm related to vera. And if the wpf app is going to be more then a quick floorplan designer, we should perhaps steel some idea's from the ui threads.

O and I (we) need to figure out a license form, GPL? I never bothered to look into license forms, so perhaps somebody else could clue me in. I have some small conditions for sharing:

[ul][li]My apps should go under the name Elisa (1 the doughters reason and its coming from family time 2 it matches nicely with vera)[/li]
[li]If I share, I would like that somebody who uses my code to share back[/li]
[li]Discussions about the code should be on one forum / website[/li][/ul]

I'd love to get into to Android development, maybe we should talk @structor - sounds like we might be able to help each other out here.
We are already talking ;D.
sounds like we might be able to help each other out here.
Great, no I only need somebody to help out with vera, otherwhise I need to spend some time to figure it out myself. All real actions on my side are going to happen after one week from now. I have to spend some quality time with my snowboard ;).

[quote=“structor, post:13, topic:165588”]O and I (we) need to figure out a license form, GPL? I never bothered to look into license forms, so perhaps somebody else could clue me in. I have some small conditions for sharing:

[ul][li]My apps should go under the name Elisa (1 the doughters reason and its coming from family time 2 it matches nicely with vera)[/li]
[li]If I share, I would like that somebody who uses my code to share back[/li]
[li]Discussions about the code should be on one forum / website[/li][/ul][/quote]

GPL is specifically enforces the 2 requirement - if anybody uses your code and modifies/enhances it, they have to share it too, or make it public.

As of #1 and #3 - you can add additional small requirement to GPL as long as they don’t conflict or invalidate it.

I think the Affero GPL deals with #3 (all contribs go ‘here’).

not that i like the proliferation of licenses… i personally prefer to deal with just GPL and BSD/MIT

fyi:

http://forum.micasaverde.com/index.php?topic=3287.0

new 'official code repository for mios/vera is live.