HomeHabit Dashboard - Original thread

Version 0.2.18
Release Notes

Bug fixes:

  • Clicking anywhere outside a dialog should close it (see: #32)
  • Possible fix for issues with parsing color item state (see: #35)

Igor, this is what I have now tried:

	Frame label="{widget:mode}" {
 		Selection item=Scenario_GF_Livingroom mappings=[
 			1="Dim",
 			2="Clean"
 		]
 	}
 	
 	Frame label="{widget:mode}" {
  		Selection item=Mode mappings=[
    		awake="Awake",
    		night="Goodnight"
 		]
	}

This is what I have in the items file:

Number Scenario_GF_Livingroom			{ autoupdate="false" }
String Mode

I’m trying with both Number and String. None of them work and when clicking on any of the two mode widgets the app crashes. Let me cause another crash and I will comment on it in the crash report being sent to you…

A little bit offtopic, but i hope you can answer this to me:

If i install this owntracks App and install a mtqq server and so on, can i make a live view of the smrtphones of my wife and me and see in realtime, where my wife is at the moment?

So i don´t have to call her, if i come home and nobody is at home, i can look to the map and see, if she is in the supermarket or something like this?

Yes! This should work in 1.8 in the classic UI, but not the Android app (don’t know about iOS app):

items/your.items:

Group Where
Location WifeLocation "Wife location [%s]" (Where) { mqtt="<[broker:owntracks/wife/phone:state:JS(owntracks-coordinates.js)]" }

transform/owntracks-coordinates.js:

var location = eval('(' + input + ')');
result = location.lat + "," + location.lon;

sitemaps/your.sitemap:

... 
Group item=Where
...
1 Like

I will use this in rastini, not habdroid.

And is this working with the given mtqq-server from owntrack also or do i have to set up an own server? I want to test this before, so it would be better to use the server from owncliud. Will i get the same inforamtion - so i only need to install the mtqqtitude-binding (don´t know the exact name right now)?

I would set up a mosquitto server and the MQTT binding for the example I gave. Hopefully this nice new Android client can show maps for Location items. The sitemap DSL ought to be extended with a Map widget that takes either an item=<location item> or item=<group item>, in the latter case puts all contained location items on the map.

@halloween the same items setup should work for Rotini as it would for android (what @watou described) , like string items with location represented with “lat,long”. In Rotini you can also add accuracy as third param, to show the radius around the point, so it would like “lat,long,accuracy”. Lat and long are represented as decimals. I will more examples on Rotini wiki for map widget soon as well.

I want to only use the location based on the celltower and wlan, not with gps to lower the power consumtion. Is there a way to do this setting in owntracks or is the only way, to make it system-wide in the android settings? So i would have to change this every time i use a gps-software for navigation?

Please note that this syntax is incompatible with openHAB’s Location items and Point types, because your optional third argument is accuracy, while in openHAB the optional third parameter is elevation in meters. In order to minimize confusion, perhaps your app could be changed to work with the native Location items? In openHAB 1.8, their string version is lat,long[,alt], so maybe you could have a syntax lat,long[,alt[,accuracy]]?

@watou I’m not really sure what is the use of altitude in what I see mostly 2D maps usage in HA, while accuracy is very useful. Do you know any valid use case for altitude?

Sure – the Netatmo binding has a recording of where weather stations are installed, including altitude, because of course weather is very different at different altitudes. Also, if people fly instead of drive, it would be nice to know if you partner is on the way home, versus crashed into a lake. Tracking how high up your GPS-enabled drone is flying over the neighbor’s property would also be nice (for the inevitable court case).

More seriously, the model of data in openHAB should have priority over the various UIs that present it. While your (and most) UIs only show two dimensions, it doesn’t make sense to restrict the model to that. You could make an argument that openHAB/ESH’s PointType should hold an optional accuracy value, in cases where you know a point on a map, but only to a degree of certainty (probably expressed as a radius in meters). So the core model is expanded to address the UI needs, not the UIs working around deficiencies in the model.

Just my two cents!

Flying plane is a good example, thanks!
But, why would you track a drone through HA, wouldn’t you use drone control software for that?

I wasn’t proposing to ignore openHAB model. I have been using String item with this format with Classic UI for long time, probably before Location/Point items existed (or before I knew about it), so that’s how incompatibility happened. So I will tackle this when I add Location item support; “lat,long[,alt[,accuracy]]” is actually a good alternative.

1 Like

Why not? Why not integrate your drone control software into openHAB like anything else? openHAB now knows where vehicles are through the Tesla and Mojio bindings, and self-driving cars, planes, drones, etc., will surely follow.

There were problems with LocationItem/PointType in 1.7.*, particularly the issue where PointType.toString() (and hence the REST API output) was pretty-printed and therefore unusable to clients. This is fixed in 1.8.0 (and had earlier been fixed in ESH). So now that LocationItem/PointType can be used by clients, I’m very happy you will include this in your plans!

That’s actually very good point. There are might some interesting possible widgets to improve user experience in those cases. I feel like this takes home automation into “life automation” :slight_smile:

1 Like

Isn’t that the goal?! :smile:

Totally!

1 Like

Small change to my earlier suggestion: have the optional 4th value be “radius” instead of “accuracy”, since “accuracy” presupposes the purpose of the radius. It could also be used as a geofence. I would like to see a shaded region for a geofenced Location in one of your widgets, with labelled points moving across the map that are other Location items, which may have their own radii.

Good idea!

With owntracks, will there be gps always on? Isn´t that drainig battery too much?

From my usage on multiple phones there is not a big drain. But, it all depends on what settings you set in owntracks.
If you set it to report only after movement, then it should be less, because I think it gets movement event from OS services instead of GPS (I might be wrong).
I know that at some point I tried doing GPS reporting through tasker and that was draining battery because it was kicking off GPS every time, so that led me to believe that owntracks doing something more optimized.