To use it, you just need to copy the widget files and then define a widget. You will also need to get your own Google Maps API key. Instructions are in the github repo.
I will add som customizations later on. I am considering adding a feature to use layouts from https://snazzymaps.com/ since they already have all the tools for designing your own map there.
I have also written a time travel feature so that the map travels through time, but the 0.83 Home Assistant upgrade broke the REST API call to grab the history, so I’ll have to add that later when I figure out what’s wrong.
Snazzymaps is just a site were you can design your google map and share your design with others. The section needed to style the maps is available to easily download from the website. I designed the default layout I am using for the widget on snazzymaps.
The 3D floorplan also started out as a widget while I was trying to learn to use transform elements in javascript, but it got to complex so its now a stand-alone app with its own websocket connection. I intend to make a widget out of it again some time in the future, its some work needed to write a guide on how to use it.
Hi, i am trying to install this custom widget. After following the instructions step by step i can see the map in my HAdashboard, but cannot localize the two device trackers i put in the dash file.
My dash file is:
google_map:
widget_type: googlemaps
entities:
- device_tracker.life360_maurizio_fabiani
- device_tracker.life360_fha
base_url: http://192.168.1.29:8123/
api_key: xxxxxxxxxxxxxxxxx # Need to be obtained from the Google API console.
token: xxxxxxxxxxxxx # Can be created through the Home Assistant UI.
zoom: 16 # Initial zoom level.
time: 24h # The amount of time to go back in time during time travel. You can combine w,d,h,m ie.
# 2w1d3h20m which would mean 2 weeks, 1 day, 3 hours and 20 minutes.
latitude: xx.xxxxxx # Your home coordinates are used to calculate the distance from home.
longitude: xx.xxxxxx
template: topaco # You can chose other styles or make your own, see the styling section below.
# Some sample styles: topaco | dark | vintage | retro
layout:
- google_map(8x7) # Or whatever size you want for your map.
You shouldn’t need to have the legacy api password enabled since the widget uses a long-lived access token. I think there is an error in how I construct the url for the images. I will have a look a the code.
I was expecting the entity picture to be a local file placed in the www folder. I have updated the basegooglemaps.js file to handle external images correctly now. Please replace your existing basegooglemaps.js file with the new file from https://github.com/tjntomas/HADashboard-widgets/tree/master/custom_widgets/basegooglemaps and see if it works. You might need to force a recompile of the widget or simply restart appdaemon.
More, i cannot go back to other dashboards with the navigate button and also the reload button doesn’t work.
I am thinking i maybe have some problems with the token or the auth request. I created a long-lived token from the HA UI and put inside the widget config. About auth do i need something else?
BTW all other dashboards work as expected.
If you look in the Home Assistant log, do you see any errors regarding websockets? How is your Home Assistant setup, i.e. are you using hassio or docker? Can you ssh into the machine and see if you have a tool called wscat installed? If so, please verify your websocket connection with
Also verify that the token you have in the widget definition is the same as you have in the appdaemon.yaml file and that the ip address for your Home Assistant instance is correct, i.e. 192.168.1.29.
In the HA log there is NO entry regarding websocket. I switched one month ago from hassbian to hassio using this image: “hassos_rpi3-2.12.img.gz” so i suppose i am using hassio (really newbie about it).
With ssh i get no command named wscat and using that chrome addon if i put: “ws://192.168.1.29:8123/websocket” and click on open i get “error”.
The token is the same and the IP is correct.
So which is the culprit ? Why i cannot open the websocket?