Waze Travel time - Waze in time Add-on?

In your post you say it displays in habpanel. That suggests the item works. Mine one works as a string, not number. I’m not sure it works the same on rpi and Linux and Windows

Yes, it displays correctly in HABPanel correctly as a number item.

my workaround for now…

item to > Node-red > Node-red to string > String from Node-red to Open hab with new item just for display

not slik but working

Having a look in the help for exec binding I see this -

output	String	Output of the last execution of the command

So, the output is String and it seems, on Windows at least, it does not mind doing an implicit conversion between String and Number. On RPi though it is not doing it.

A couple of work-arounds are use a rule, onchange of the string, set a number proxy item or have a rule doing the execution locally and convert to Number.

I’ll do the latter as I can then control the schedule. It’s more “polite” on the Waze API.

I don’t use HABPanel so I can’t really say why it is showing anything there. But in BasicUI, “-” usually means the Item is NULL or UNDEF. Look in openhab.log to make sure there are no errors. Look in events.log to make sure that the Item is changing state.
.

Excellent contribution !

the integration with WazeRouteCalculator was my dream since years.

i have an issue

the items do not get updated
meantime, i have implemented the things and items with the sample script as below (scripts works from command line)

String gil_work_Data "Travel Time To BYP [%.0f Minutes]" { channel="exec:command:gil_work:output" }
String  gil_home_Data "Travel Time Home [%.0f Minutes]" { channel="exec:command:gil_home:output" }

Things

Thing exec:command:gil_work [command="python /etc/openhab2/scripts/waze-sample.py", interval=300, timeout=5, transform="REGEX(.*Time (.*) minutes.*)"]*
Thing exec:command:gil_home [command="python /etc/openhab2/scripts/waze-sample.py", interval=300, timeout=5, transform="REGEX(.*Time (.*) minutes.*)"]*

The thing is well displayed with the associated item in paper ui

in the log, it looks like that it’s running but no update

i think that the pip worked only for openhabian user and not for the openhab user

i have made a chmod on the scripts folder but here i am blocked

Thanks again for the contribution and the help

once that i will get this integration, i will implement this rule !!!

at 8:30 if the time to work>40 then say “Drink another coffee, it takes x miinutes”

it works!

i guess the issue that it was necessary to make the pip under su openhab

i am not sure about the waze package accuracy. my phone results are always longer.

The results do not match to the waze live map

image

image

1 Like