Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not updating the route based on the calendar event and only loads based on the initial config on raspberry pi #34

Open
TheAshwanik opened this issue May 8, 2023 · 1 comment

Comments

@TheAshwanik
Copy link

When running the module on a raspberry pi installation of MagicMirror2 the module is only able to load once when using the configuration.

              {
                            module: 'MMM-google-route',
                            position: 'bottom_left',
                            config: {
                                key: 'xxxxxx-xxxxx',
                                directionsRequest:{
                                    origin: 'xxx,-xxxxx',
                                    destination: 'xxx,-xxxx',
                                    travelMode: 'DRIVING'
                                },
                                listen: '[CALENDAR_EVENTS]',
                                refreshPeriod: 0,
                                minimumRefreshPeriod:5,                        
                            }
                },

Because I have given the origin and destination the module loads that as default route on raspberry pi once.
I expected that when my calendar module sends an event as notification, then the location is used and route gets displayed based on the event location. This works on my laptop when i forcefully reload the page, and never on my raspberry pi, even though the route module receives the calendar notification correctly ( i printed the event info in the route module, I can see it in console). But the module on screen does not auto refreshes. The status is Google Direction service status : ZERO_RESULTS

image

Step1. Config as above and start MM2
Step2. Raspi and laptop still shows the default/old route for the origin and destination mentioned in the directionRequest config.
Step3. manually reload the page on browser on laptop, it still shows the default/old route for the origin and destination mentioned in the directionRequest config.
Step4. Wait for sometime, manually reload the page on browser on laptop - Shows the route based on calendar event on laptop suddenly. Nothing changes on raspi.

Add a new Google calendar event occurring in next hour with new destination. Nothing changes.
Step5. Wait for sometime, manually reload the page on browser on laptop - Shows the route based on calendar event on laptop suddenly. Nothing changes on raspi.

@mrdis
Copy link
Owner

mrdis commented Nov 1, 2023

Hi, it seems to be an issue in the configuration, the listen parameter should be an array of strings.
So please try using
listen: ['CALENDAR_EVENTS'],
instead of
listen: '[CALENDAR_EVENTS]',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants