andy31
(Andy)
1
Hi everyone,
Just need bit of advice.
How to setup location on map correctly?
I`m using configuration from demo house for it (sitemap + items).
Its showing default location, how to change it so it updates to my current location. This is what I can see at the moment - Berlin, miles away.
Do I need any additional binding to detect my location?
I`m including configuration below:
Sitemap:
Frame label="Map/Location" {
Mapview item=DemoLocation height=10
Items:
/* Locations */
Location DemoLocation "Brandenburg Gate Berlin"
vzorglub
(Vincent Regaud)
2
Yes you do, how do you itend openHAB to know where you are? Mobile phone, GPS tracker? There are different possibilities
andy31
(Andy)
3
Hi Vincent,
I thought that I display location of my server at home which is connected to home network. Assuming I will need some soft of binding for that?
vzorglub
(Vincent Regaud)
4
No you need to define your location in the item:
Create a rule:
rule MapMyLocation
when
Item System started
then
var PointType home = new PointType("your home's lat,long")
DemoLocation.postUpdate(home)
end
1 Like
andy31
(Andy)
5
HI Vincent,
Thanks , this works now when accessing OH2 via web browser (Classic UI or Basic UI)
However when I visit the same section on my mobile phone OH2 app location is not shown.
Is there a limitation of the app for mobile phone ? Or do I need to enable something else ?
vzorglub
(Vincent Regaud)
6
What mobile do you use?
iPhone or android?
vzorglub
(Vincent Regaud)
8
See:
Time to get a better phone…
1 Like
andy31
(Andy)
9
Thanks Vincent that’s explains. I probably will get android phone as soon Im out of contract.