This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[Published] ANWB Traffic information (0.4.8)

jjtbsomhorstjjtbsomhorst Member
edited December 2017 in Apps
I just finished creating a little app for Homey that can let you know if there are any traffic jams,road works or police checks on the dutch high ways.

It can be found on the appstore: https://apps.athom.com/app/eu.jeroensomhorst.anwb

First of all to give an idea what you can do with it see the following flow:



This flow will check at 16:30 on a workday if there is a traffic jam on the A59. If this is the case. It will send me a push notification using the Homey app.

Speech triggers

The following speech triggers are available: 

English:
traffic,trafficjam.

Dutch:   staat er file, staan er files?

This will trigger the app to report the current traffic information. 



The following then cards are available: 



Let homey find out if there is any traffic information and report it


Homey will tell you if there are, and which, traffic jams there are on the selected highway (snelweg)


You can select what information you want Homey tell you.  You can choose between traffic jams, road works or police checks. Also you can specify which road you want it to scan. 


Homey will tell you how many traffic jams there are and the total length

The following 'and' cards are available: 



Check if there is/isn't traffic on that specific road.

.
There are/aren't  road works. 

There are/aren't police checks 

If you  know how to work with the Athom CLi tool you can download the respository here: https://github.com/jjtbsomhorst/eu.jeroensomhorst.anwb

Changelog

0.4.8

  • Fixed an issue that would cause Homey to tell all traffic instead of only from a single road.

0.4.7

  • Fixed the Api. Switch from http to https

0.4.6

  • Changed the category from Internet to Location

0.4.5

  • Added more N roads
  • Added more A roads
  • Changed all the Dropdown lists on various cards to choose roads to automplete fields.
  • Localization category 

0.4.4

  • Fixed a grammar issue with radar checks condition
  • Fixed a bug that would cause the api to return empty results instead of the real results

0.4.2

  • Added condition to check if there are police checks on specified road
  • Added condition to check if there are road works on specified road

0.4.0
  • Fixed a bug that caused the app to crash when the speech trigger was used (English: traffic,trafficjam. Dutch:   staat er file, staan er files?)


0.3.2
  • fixed a bug that would cause the app to crash when someone wanted to know road block information

0.3.1
  • Changed images and icon

0.3.0
  • Refactor of code. Api has been moved to separate file
  • Added summary card. Gives info about how many jams there are and the total distance
0.2.0
  • Added trigger for traffic info on specified road.

0.1.0 
  • Initial release

Donate

If you like the app. Please consider a donation

paypal



«1

Comments

  • Great, i let Homey wake me up in the morning like Philips Wakuplight idea but could use this, set var in BL that i'm waking up, when set check if there is a traffic jam so yes lights out and snooze 60 mins because i will work from home :)
  • Very nice, but would be great if it can checks for a route to a address. 
  • How cool! Thank you. This is better then rss-feeds! 
  • jjtbsomhorstjjtbsomhorst Member
    edited October 2016
    Great, i let Homey wake me up in the morning like Philips Wakuplight idea but could use this, set var in BL that i'm waking up, when set check if there is a traffic jam so yes lights out and snooze 60 mins because i will work from home
    I have resubmitted the app. In the next release it will feature a 'and' card. So you can check if there is a traffic jam on a specified road.



    jovink said:
    Very nice, but would be great if it can checks for a route to a address. 
    I have to check if that is possible bu the problem is that this is not a route app such as tomtom or so. 
  • jjtbsomhorstjjtbsomhorst Member
    edited October 2016
    nvm
  • Tomtom does have nice api's so i have heard. Maybe something foto An otter time
  • jordenjorden Member
    edited October 2016
    Great, this was one of my first ideas for Homey. Will definately install this one!

    If you want "expected route delays", you should use Google maps API. For example:

    https://maps.googleapis.com/maps/api/distancematrix/json?origins=Amsterdam&destinations=Almere&mode=driving&language=en

    This will return the amount of KM and the time (38 minutes currently). I was thinking of making an app to set a trigger if it changes to > 38+5 minutes.

  • it has been published
  • jorden said:
    Great, this was one of my first ideas for Homey. Will definately install this one!

    If you want "expected route delays", you should use Google maps API. For example:

    https://maps.googleapis.com/maps/api/distancematrix/json?origins=Amsterdam&destinations=Almere&mode=driving&language=en

    This will return the amount of KM and the time (38 minutes currently). I was thinking of making an app to set a trigger if it changes to > 38+5 minutes.

    How does this work? When I enter Utrecht and Breda google maps gives me 1 hour 50 minutes estimate and with this api only 51 minutes (the normal time with a working bridge :P)
  • @DieterKoblenz I'm not sure! Those damn bridges :disappointed: 

    I didn't look into it further yet but I'm sure Google has a load of options that can be turned on and off. On https://developers.google.com/maps/documentation/distance-matrix/intro there is more info to be found.
  • Nice! Maybe you can integrate it with your Telegram app (/traffic A1)?  :)
  • In the current version (0.3.2) there is a bug that causes the speech trigger to crash the application. I'm aware of the issue and have submitted version 0.4.0 to resolve this. 
  • Version 0.4.0 has been released. 
  • Just installed this app, this will be very useful. However, I did found some things that don't work as smooth as I'd like...

    I want to know at 15:31 if there are any radarchecks on the A6, A1, or A10. I have set it up as in the screenshot, but now I hear "Er wordt op dit moment niet gecontroleerd" 3 times.



    Perhaps it is possible to use the "Settings" page to be able to select multiple roads that you want to watch? Like Flitsmeister does it.
    Otherwise, perhaps only mention when there are radar checks, and let the app be quiet if there aren't any?
    anwb.png 191.3K
  • Thanks for the feedback. I think I will make an update where the different cards don't give an audio response if there is no data found. Or maybe the response (er wordt..) should have the name of the road it checks? 
  • I just submitted a new version that will contain some extra conditions (and) cards to


    Check for police actions on specified road


    Check if there are road works going on. 


  • This app notified me of police checks on the A1 yesterday, don't know if I would have known/seen otherwise.... Thanks!

    This updates seems to me like the missing part to make it perfect.
  • This morning i received a lot crashreports. I think that is because in the newest release iived from drop downs to type ahead properties in various cards. Solution for this is to open the flow(s) and update the value to the same value it was on. 

    Sorry for the inconvenience!
  • Latest version got approved (0.4.4)
  • I'd love it if the UK could be added, not sure if there's an API though...
  • I found an RSS feed to get the current situation in England but that could not cover whole UK of course. 
  • Where is the RSS @jjtbsomhorst ;

  • I just create a new branch 0.4.5 for those who know how to install it using CLI. Please download the source and test it if you want. 

    This release contains more N and more A roads.
  • I am using this app to tell me if there are any traffic jams on the A4. When i ask, Homey tells me if there are any, but after that, continues to tell met all traffic jams in Holland. Is this a bug?
  • jjtbsomhorstjjtbsomhorst Member
    edited November 2016
    Maybe you have used the same sound trigger as the default one? That is the only way I could think of that this would occure. Could you post the screenshot of your flow?
  • I'm not quite sure if I got this topic right. Is it possible to check a route (eg home/work) at a certain time? 
  • With the ANWB currently not. It only checks certain roads (by name). 
  • Too bad. Not useful for my needs
  • Currently the app is broken. There has been a change in the ANWB website so I can not get the traffic information anymore. I send them an E-mail to get access to the new api 
Sign In or Register to comment.