Node-RED nodes for integrating with the wger workout and fitness tracker API.
This package provides a comprehensive set of Node-RED nodes for interacting with the wger API, allowing you to:
- Search and manage exercises
- Create and manage workout plans
- Track nutrition and meals
- Log weight measurements
- Manage user profiles
Install via Node-RED's palette manager or run:
npm install node-red-contrib-wger
The wger API supports several authentication methods:
- None - For public endpoints (limited access)
- Token - Uses a permanent API token
- JWT - Uses JSON Web Tokens
To get an API token:
- Create an account at https://wger.de
- Go to your profile settings
- Generate an API token
Configuration node for connecting to a wger API instance.
Manage exercise-related operations:
- List exercises
- Search exercises
- Get exercise details
- Get exercise images
- Get exercise comments
- Get categories, muscles, equipment
Manage workout plans and sessions:
- List, create, update, delete workouts
- Manage workout days
- Manage exercise sets
- Get workout canonical representations
- View workout logs
Manage nutrition plans:
- List, create, update, delete plans
- Get nutritional values
- Manage meals and ingredients
Track weight measurements:
- List weight entries
- Create new entries
- Update/delete entries
- Get statistical data
Manage user profiles:
- Get/update user profile
- Manage settings
Generic API node for custom operations not covered by the specialized nodes.
The package includes several example flows:
- Exercise search
- Workout creation
- Nutrition plan management
- Weight tracking
Find these in the Node-RED import menu under "Examples".
msg.payload = {
term: "bench press",
language: "en"
};
msg.operation = "searchExercises";
return msg;
// Create workout
msg.payload = {
name: "Full Body Workout",
description: "A comprehensive routine"
};
msg.operation = "createWorkout";
// After receiving workout ID, create a day
msg.payload = {
description: "Monday - Chest",
workout: workoutId,
day: [1]
};
msg.operation = "createDay";
// Add exercises to the day
msg.payload = {
exerciseday: dayId,
exercise: exerciseId,
sets: 3,
repetitions: 10
};
msg.operation = "createSet";
All nodes provide error outputs and status indicators:
- Blue dot: Processing request
- Green dot: Success
- Red dot/ring: Error occurred
Errors include details about the API response when available.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
For issues and feature requests, please use the GitHub issue tracker.