Hi -
I’ll do my best to give you the information to implement this yourself.
You do NOT need a Waze developer account.
To implement this you need the following:
EXEC binding installed
REGEX transformation installed
Python must be installed - I installed the latest version 3.7
You need to install the WAZE script as per the instructions posted on GITHUB
First create your thing(s) I created 2 one for the route to work, the other for the route home:
waze.things
Thing exec:command:BYPRoute [command="C:/PROGRA~1/Python37/python.exe C:/PROGRA~1/Python37/Lib/site-packages/WazeRouteCalculator/BYPRoute.py", interval=300, timeout=5, transform="REGEX(.*Time (.*) minutes.*)"]
Thing exec:command:HomeRoute [command="C:/PROGRA~1/Python37/python.exe C:/PROGRA~1/Python37/Lib/site-packages/WazeRouteCalculator/HomeRoute.py", interval=300, timeout=5, transform="REGEX(.*Time (.*) minutes.*)"]
My OH installation is on Windows so I needed to show a full path to the executable first, depending on your OS you may need to adust.
waze.items
Number BYPRoute_Data "Travel Time To BYP [%.0f Minutes]" { channel="exec:command:BYPRoute:output" }
Number HomeRoute_Data "Travel Time Home [%.0f Minutes]" { channel="exec:command:HomeRoute:output" }
Please note I am still having an issue with the time displaying on my sitemap…it is working fine in HABPabnel.
BYPRoute.py and HomeRoute.py
import WazeRouteCalculator
from_address = 'Your Starting Address Goes Here'
to_address = 'Your Destination Address Goes Here'
region = 'US'
route = WazeRouteCalculator.WazeRouteCalculator(from_address, to_address, region)
route.calc_route_info()
And that should do it…
Make sure you have your path’s to the files set correctly.
Good Luck…let me know if I can answer anything else.
Squid