Google Maps widget with traffic

Tags: #<Tag:0x00007fe04f58f5e8> #<Tag:0x00007fe04f58f1d8>

(Kristof Rado) #83

I haven’t started using the HABPanel on a daily basis, I’m just started building it (and the wall tablet for it), but the main idea for me was to have a morning dashboard which will be only displayed in the morning. It seems when you don’t have it running in the foreground, it won’t do any api call

(Bastiaan van Haastrecht) #84

No, the items defined http request will run 24x7. So be carefull how you set the interval.

(Kristof Rado) #85

Where I can set the interval?

(Bastiaan van Haastrecht) #86

In the items file definition file. Please read the first post @ ’ Travel time widget’. You will see an explination of the interval. In the example its set to 300000, which is in miliseconds. (5 minutes).

(Kristof Rado) #87

ohh sorry :slight_smile: I’m talking about the actual widget and that seems that don’t really use the API if you don’t display the actual dashboard with the map

(Bastiaan van Haastrecht) #88

Ah ok, yes thats correct. The browser retrieves that, so when browser sleeps no requests are made.

(Kristof Rado) #89

However I’m still has this ‘false’ labels on the map. Maybe it somehow connected to regional things or I don’t know, maybe someone could help me with this?

(Nick ) #90

Go to google console and navigate to the libraryu and activate the Distance Matrix API, this will give permission to do distance calculations.

(Andre Mundo) #91


tried to use this nice function.

Startet with the items part and get lots of errors in my OpenHAB Log.

018-11-18 14:13:03.833 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.util.UnknownFormatConversionException: Conversion = ‘F’
at java.util.Formatter$FormatSpecifier.conversion( [?:?]
at java.util.Formatter$FormatSpecifier.( [?:?]
at java.util.Formatter.parse( [?:?]
at java.util.Formatter.format( [?:?]
at java.util.Formatter.format( [?:?]
at java.lang.String.format( [?:?]
at org.openhab.binding.http.internal.HttpBinding.execute( [244:org.openhab.binding.http:1.11.0]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute( [200:org.openhab.core.compat1x:2.2.0]
at org.openhab.core.service.AbstractActiveService$ [200:org.openhab.core.compat1x:2.2.0]

The URL itself works fine within the browser.

Any ideas?

Thanks in advance.


(Steve Janzen) #92

Hi All,
I am very very new to all fo this.
I do not understand where I should be putting the map.html file. I am getting a HHTP error 404
Problem accessing …
Can anyone help me.

(Angelos) #93

Win or Linux?

(Steve Janzen) #94

Both, I am experimenting on both but my final system will run on linux.
I know this is a stupid question but where is the /conf/html/google-maps/ folder.

(Angelos) #95

On Windows: inside C:\openHAB2\conf\html you need to create the google-maps/ folder.
On Linux: inside /etc/openhab2/html/ (same story… create the subdir)

(Steve Janzen) #96

Ok Thanks I will try…

(Steve Janzen) #97

Ok I have google coming up in the widget and can click on it and a new page for google maps comes up.
I see only a small square as well. What should the zoom level and height be set at? could this be the problem?

(CL) #99


Hi guys,

I got it working but it didn’t show full screen. The calculation was down the bottom which is supposed to be at top left corner.I played around the setting but none helped.Any ideas? Thanks.