Node.js cli tool for monitoring your favorite TooGoodToGo businesses. Notifications are shown when the stock of any of the businesses changes. The following notification types are supported:
- Desktop notification
- Console output
- Telegram chat message
- Install Node.js 8.x or higher (Windows | Linux | OSx).
npm install -g toogoodtogo-watchertoogoodtogo-watcher config. Fill in your TooGoodToGo account details. Optionally enable / disable certain notifications. See Configuring Telegram notifiations for instructions on setting up the Telegram notifications.toogoodtogo-watcher watch
Usage: toogoodtogo-watcher <command>
Commands:
config Edit the config file.
config-reset Reset the config to the default values.
config-path Show the path of the config file.
watch Watch your favourite busininesses for changes.
Options:
--help Show help [boolean]
--version Show version number [boolean]
By default Windows doesn't display the notifications in the notification center. You can enable this by doing the following steps.
- Go to 'notifications & actions settings' (
Windows key, type 'notifications',enter) - Click on the 'toast' app at the bottom of the screen.
- Enable the 'show in action center' checkbox.
- Open a Telegram chat with
BotFather. - Follow the instructions to create your own bot.
- Copy the token and enter it in the configuration via
toogoodtogo-watcher config, and setenabledtotrue. - Start the application
toogoodtogo-watcher watch - Click the
t.me/BOTNAMElink from theBotFatherchat message. - Press
BEGIN. - Your bot should greet you, and show a notification about your favorites. Note: the bot will show the favorites which you configured. Multiple people can connect to the bot to get updates about these favorites.
- Go to https://ifttt.com/create/.
- Click on
thisand select Webhooks. - Fill in an Event Name (e.g.
too_good_to_go_updated). - Click on
that. - Select anything you'd like to integrate with (e.g. Philips Hue).
- Finish setting it up. Note:
value1contains a plain text message,value2contains an HTML message. - Update the
iftttconfiguration viatoogoodtogo-watcher config:- set
enabledtotrue - set
webhookKeyto the token found at Web Hook settings (last part of the URL) - add the Event Name selected in step 3 to the
webhookEventsarray
- set
Note: You can add multiple events to webhookEvents
Note: the Docker image is a multiarch image. So it will also work on Raspberry Pi's.
- Create a directory to store the config file and copy the config.defaults.json into
YOUR_FOLDER/config.json. See above for instructions on how to configure the application. - Run the following command. Example: a user
johnwho stored the config in~/docker/toogoodtogo-watcher/config.json:
docker run \
--name toogoodtogo-watcher \
-e TZ=Europe/Amsterdam \
-v /home/john/docker/toogoodtogo-watcher:/home/node/.config/toogoodtogo-watcher-nodejs \
marklagendijk/toogoodtogo-watcher
- Create a directory to contain all your Docker Compose things.
- Create a directory
toogoodtogo-watcherinside the created directory, and copy the config.defaults.json totoogoodtogo-watcher/config.json. See above for instructions on how to configure the application. - Create a file
docker-compose.yaml:
version: "3"
services:
toogoodtogo-watcher:
image: marklagendijk/toogoodtogo-watcher
restart: unless-stopped
environment:
- TZ=Europe/Amsterdam
volumes:
- ./toogoodtogo-watcher:/home/node/.config/toogoodtogo-watcher-nodejs- Install the Heroku CLI and login.
- From your terminal, run
heroku config:set TOOGOODTOGO_CONFIG=content, replacing content with the content of your config.json file.