
Traffic with waze in Domoticz
Moderator: leecollings
-
- Posts: 7
- Joined: Thursday 03 November 2016 11:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Traffic with waze in Domoticz
Yes, I have got exactly the same issue. Not sure whether Waze is blocking my IP address or that they have disallowed the usage of this feature 

-
- Posts: 43
- Joined: Tuesday 03 May 2016 10:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5108
- Location: Barendrecht
- Contact:
Re: Traffic with waze in Domoticz
Just found out they made an extra check for the ""api""
I fixed my problem with information from here
You have to fake the referer url. I changed the row:
Code: Select all
local waze=assert(io.popen('curl "https://www.waze.com/r...".')
to:
Code: Select all
local waze=assert(io.popen('curl --referer https://www.waze.com "https://www.waze.com/r...."')
Hardware: Raspberry Pi 2B | RFXCOM RFXtrx433E v1 | Synology DS213+ | KaKu Clones | Conrad RSL switches | KAKu Doorbell Clone | USB Webcam | ICY Thermostat | Resol DL2 | Imatic Relay Board | Eminent 6230 | Eminent 6220 | iMatic 16 ports Relay Board
-
- Posts: 7
- Joined: Sunday 26 April 2015 18:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Traffic with waze in Domoticz
+1! Great find. Now my lua script is working again!
Thanks!
Thanks!
-
- Posts: 42
- Joined: Wednesday 13 September 2017 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: France
- Contact:
Re: Traffic with waze in Domoticz
Hello,
I'm sorry I've followed the howto of lemassykoi but I'm getting this error :
2017-09-13 13:42:30.717 LUA: >> Monitoring Traveltimes
2017-09-13 13:42:30.718 LUA: >> Debug is set to: Y
2017-09-13 13:42:30.718 LUA: >> Update timeout: 600
2017-09-13 13:42:30.718 LUA: >> Lastupdate Home to Work : 5934
2017-09-13 13:42:30.718 LUA: >> Lastupdate Work to Home : 5922
2017-09-13 13:42:31.033 LUA: ========================================================================================================
2017-09-13 13:42:31.033 LUA: { "error" : "Internal Error"}
2017-09-13 13:42:31.033 LUA: ========================================================================================================
2017-09-13 13:42:31.034 Error: EventSystem: in script_time_Waze.lua: [string "-- script_time_Waze.lua..."]:99: attempt to index field 'response' (a nil value)
EDIT :
I changed the value work to home to their french translations and forgot to change the value in the script
I'm sorry I've followed the howto of lemassykoi but I'm getting this error :
2017-09-13 13:42:30.717 LUA: >> Monitoring Traveltimes
2017-09-13 13:42:30.718 LUA: >> Debug is set to: Y
2017-09-13 13:42:30.718 LUA: >> Update timeout: 600
2017-09-13 13:42:30.718 LUA: >> Lastupdate Home to Work : 5934
2017-09-13 13:42:30.718 LUA: >> Lastupdate Work to Home : 5922
2017-09-13 13:42:31.033 LUA: ========================================================================================================
2017-09-13 13:42:31.033 LUA: { "error" : "Internal Error"}
2017-09-13 13:42:31.033 LUA: ========================================================================================================
2017-09-13 13:42:31.034 Error: EventSystem: in script_time_Waze.lua: [string "-- script_time_Waze.lua..."]:99: attempt to index field 'response' (a nil value)
EDIT :
I changed the value work to home to their french translations and forgot to change the value in the script
-
- Posts: 497
- Joined: Friday 22 May 2015 12:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11083
- Location: Asten NB Nederland
- Contact:
Re: Traffic with waze in Domoticz
great adonn
Your mind is like a parachute,
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
-
- Posts: 42
- Joined: Wednesday 13 September 2017 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: France
- Contact:
Re: Traffic with waze in Domoticz
Hello
I've reinstalled domoticz and lost all my files.
Is there still somebody here still using this script ? I've tried the bash script but I can't make it work.
I have a forbidden error
Thank you
I've reinstalled domoticz and lost all my files.
Is there still somebody here still using this script ? I've tried the bash script but I can't make it work.
I have a forbidden error
Thank you
-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Traffic with waze in Domoticz
Sae request here, nobody using the script anymore?
-
- Posts: 8
- Joined: Wednesday 23 October 2019 8:41
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Traffic with waze in Domoticz
Hello,
I got this error since 2 days:
Error: EventSystem: in Waze: [string "..."]:38: bad argument #1 to 'for iterator' (table expected, got nil)
it seems to be a problem on line 38
anyone has an idea ?
thx
I got this error since 2 days:
Error: EventSystem: in Waze: [string "..."]:38: bad argument #1 to 'for iterator' (table expected, got nil)
it seems to be a problem on line 38
for response,results in pairs(route) do
anyone has an idea ?
thx
-
- Posts: 272
- Joined: Sunday 11 May 2014 11:09
- Target OS: Windows
- Domoticz version: 2023.1+
- Location: NL
- Contact:
Re: Traffic with waze in Domoticz
looks like the json/api is changed, but no clue how to correct the script yet
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
-
- Posts: 56
- Joined: Monday 26 March 2018 18:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Traffic with waze in Domoticz
I don't know which script you are using but in my PHP script I had to change:
Code: Select all
foreach($traffic['response']['results'] as $street) {
Code: Select all
foreach($traffic['response'][0]['result'] as $street) {
Code: Select all
$time = $time + $street['crossTime'];
Code: Select all
$time = $time + $street['cross_time'];
-
- Posts: 272
- Joined: Sunday 11 May 2014 11:09
- Target OS: Windows
- Domoticz version: 2023.1+
- Location: NL
- Contact:
Re: Traffic with waze in Domoticz
thank you !I don't know which script you are using but in my PHP script I had to change:
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
Who is online
Users browsing this forum: No registered users and 1 guest