MMM-LocalTransport icon indicating copy to clipboard operation
MMM-LocalTransport copied to clipboard

Automatic update of destination

Open GHLasse opened this issue 7 years ago • 1 comments

Just an idea for an enhancement which I happen to work on: Wouldn't it be neat if the module would show you how to get to your next appointment?

This is what I did so far:

  • The default calendar module broadcasts the events
  • I added my Google calendar to the calendar module and added some test events to it.
  • I added a notificationreceiver to the local-transport module which detects the calendar module broadcast.
  • I made it filter out the first event which hasn't started yet and has a location defined.
  • If this event is less than one day from now, I replace the destination with the location of the event.
  • If there is no valid event within one day, the default destination is chosen instead.
  • I also added a key %{dest} which can be placed into the header and is replaced by the destination address returned by the google query.

This all works and I am happy to push it soon after some tidying up of the code, but if people have more ideas on what this enhancement should be able to do, then let me know :-)

GHLasse avatar Oct 21 '17 19:10 GHLasse

I would be greatful if anyone can test it and create a preview for it (would be best as a gif where the change in destination can be seen)

GHLasse avatar Nov 08 '17 19:11 GHLasse