Example:
The MMM-EventSearch module for [MagicMirror²] fetches and displays event information using the SerpAPI to search for events based on a given query, location, and other parameters.
To find a suitable query go to goolge and try a little for your city or surrounding city/provice/state.
In your terminal, go to your MagicMirror² Module folder and clone MMM-EventSearch:
cd ~/MagicMirror/modules
git clone https://github.com/ChrisF1976/MMM-EventSearch.gitnot needed but doesn't hurt:
cd ~/MagicMirror/modules/MMM-EventSearch
npm installcd ~/MagicMirror/modules/MMM-EventSearch
git pullTo use this module, add it to the modules array in the config/config.js file:
{
module: "MMM-EventSearch",
header:"Was ist los?",
position: "bottom_center",
disabled:false,
config: {
apiKey: "xxxxxxxxxxx", // Your API Key from https://serpapi.com
location: "Germany",
query: "braunschweig veranstaltungen morgen", //query. Try a working query for you on google
updateInterval: 12*60*60*1000, // Update twice a day (example)
hl: "de",
gl: "de",
moduleWidth: "400px",
maxResults: 5, //maximum number of shown results
rotateMoreEvents: true, // new option to enable rotation
rotateInterval: 60*1000, // new option for rotation interval (1 minute)
googleDomain: "google.de",
},
},| Option | Possible values | Default | Description |
|---|---|---|---|
apiKey |
string |
none | API key for authenticating requests to the event service. Get yours on https://serpapi.com. |
query |
string |
"Veranstaltungen Braunschweig" |
The search query for fetching events. Modify it to match the events you're looking for. |
location |
string |
"Germany" |
Location to restrict the event search to. |
updateInterval |
integer |
12*60*60*1000 |
Interval (in milliseconds) for automatically refreshing the events list. |
hl |
string |
"de" |
Language for search results. Set it to the desired language code (e.g., "en" for English). |
gl |
string |
"de" |
Geolocation for search. Set it to the desired country code (e.g., "us" for the United States). |
googleDomain |
string |
"google.de" |
The Google domain to use for event search. |
moduleWidth |
string |
"400px" |
Configurable width for the module. You can adjust it to fit your layout. |
maxResults |
integer |
5 |
Maximum number of shown search results. |
rotateMoreEvents |
boolean |
true |
New option to enable rotation if more events are found than shown. |
rotateInterval |
integer |
60*1000 |
New option for rotation interval (1 minute). |
- Open AI
- my wife :-)
