mealie Online-Kochbuch
Es gibt ein sehr interessante Online Browser basierendes Kochbuch "Mealie"

Installation mit Docker-Compose
Docker-Compose - hier klicken
version: "3.7"
services:
mealie-frontend:
image: hkotel/mealie:frontend-nightly
container_name: mealie-frontend
depends_on:
- mealie-api
environment:
# Set Frontend ENV Variables Here
- API_URL=http://mealie-api:9000 #
restart: always
ports:
- "9926:3000" #
volumes:
- ./data:/app/data/ #
mealie-api:
image: hkotel/mealie:api-nightly
container_name: mealie-api
depends_on:
- postgres
volumes:
- ./data:/app/data/
environment:
# Set Backend ENV Variables Here
- ALLOW_SIGNUP=true
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- MAX_WORKERS=1
- WEB_CONCURRENCY=1
- BASE_URL=https://kochbuch.xxxx.de
# Database Settings
- DB_ENGINE=postgres
- POSTGRES_USER=mealie
- POSTGRES_PASSWORD=mealie
- POSTGRES_SERVER=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=mealie
restart: always
postgres:
container_name: postgres
image: postgres:15
restart: always
environment:
POSTGRES_PASSWORD: mealie
POSTGRES_USER: mealie
### Einkaufsliste nach Telegram schicken
Benötigt wird folgendes Plugin:
https://flows.nodered.org/node/node-red-contrib-chatbot braucht NPM 8.19.4 und Node v16.20.0
HINWEIS: Die Palette kann nicht in Docker Container https://hub.docker.com/r/nodered/node-red/ installiert da die oben genannten Version im Image nicht vorhanden sind. Man muss also selbst ein eigenes Images bauen oder NodeRED native auf einem Linux Container installiert werden.
NodeRED Code
NodeRED Code - hier klicken
[
{
"id": "767e8ab9a03f0e4f",
"type": "inject",
"z": "abcd6ab2be488b84",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 200,
"y": 240,
"wires": [
[
"626bb8984931c788",
"94531acc91568a22"
]
]
},
{
"id": "626bb8984931c788",
"type": "trigger",
"z": "abcd6ab2be488b84",
"name": "",
"op1": "Einkaufliste",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "5",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 220,
"y": 360,
"wires": [
[
"fdab0ec18a7364d8"
]
]
},
{
"id": "94531acc91568a22",
"type": "http request",
"z": "abcd6ab2be488b84",
"name": "Einkaufsliste",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://kochbuch.unixweb.eth64.de/api/groups/shopping/items?group_id=XXXX-XXXXX-XXXXX-XXXXX&page=1&perPage=50&orderBy=created_at&orderDirection=desc&paginationSeed=Einkaufen",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "bearer",
"senderr": false,
"headers": [],
"x": 410,
"y": 240,
"wires": [
[
"b73ba28428b11da8"
]
]
},
{
"id": "e7810838c682396c",
"type": "switch",
"z": "abcd6ab2be488b84",
"name": "",
"property": "payload.content",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "/liste",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 390,
"y": 300,
"wires": [
[
"94531acc91568a22",
"626bb8984931c788"
]
]
},
{
"id": "fdab0ec18a7364d8",
"type": "chatbot-conversation",
"z": "abcd6ab2be488b84",
"name": "",
"botDevelopment": "83fad7bd2c994193",
"botProduction": "83fad7bd2c994193",
"chatId": "617681859",
"userId": "",
"transport": "telegram",
"x": 390,
"y": 360,
"wires": [
[
"85f263c2ecc9df03"
]
]
},
{
"id": "b73ba28428b11da8",
"type": "json",
"z": "abcd6ab2be488b84",
"name": "",
"property": "payload",
"action": "",
"pretty": true,
"x": 570,
"y": 240,
"wires": [
[
"fc2f6cc52c469909"
]
]
},
{
"id": "c5b7376177890472",
"type": "chatbot-telegram-receive",
"z": "abcd6ab2be488b84",
"bot": "",
"botProduction": "",
"x": 210,
"y": 300,
"wires": [
[
"e7810838c682396c"
]
]
},
{
"id": "85f263c2ecc9df03",
"type": "chatbot-message",
"z": "abcd6ab2be488b84",
"name": "",
"message": [
{
"message": "Einkaufsliste -->>>>>>>>>>>>>>>>"
}
],
"language": "none",
"x": 570,
"y": 360,
"wires": [
[
"90658281a5e95487"
]
]
},
{
"id": "fc2f6cc52c469909",
"type": "function",
"z": "abcd6ab2be488b84",
"name": "Einkaufliste",
"func": "for (var i = 0; i < msg.payload.total; i++) {\n var newMsg = {};\n newMsg.payload = msg.payload.items[i].note;\n node.send(newMsg);\n}\nreturn null;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 730,
"y": 240,
"wires": [
[
"81eaa91b4f669350"
]
]
},
{
"id": "90658281a5e95487",
"type": "chatbot-telegram-send",
"z": "abcd6ab2be488b84",
"bot": "",
"botProduction": "",
"track": false,
"passThrough": false,
"errorOutput": false,
"outputs": 0,
"x": 770,
"y": 360,
"wires": []
},
{
"id": "81eaa91b4f669350",
"type": "chatbot-conversation",
"z": "abcd6ab2be488b84",
"name": "",
"botDevelopment": "83fad7bd2c994193",
"botProduction": "83fad7bd2c994193",
"chatId": "XXXXXXXXX",
"userId": "",
"transport": "telegram",
"x": 930,
"y": 240,
"wires": [
[
"4d675f4164517f5d"
]
]
},
{
"id": "5b4f462150cf7432",
"type": "chatbot-message",
"z": "abcd6ab2be488b84",
"name": "",
"message": [
{
"message": ""
}
],
"language": "",
"x": 570,
"y": 400,
"wires": [
[
"90658281a5e95487"
]
]
},
{
"id": "4d675f4164517f5d",
"type": "link out",
"z": "abcd6ab2be488b84",
"name": "link out 4",
"mode": "link",
"links": [
"07d30318e27ee772"
],
"x": 1095,
"y": 240,
"wires": []
},
{
"id": "07d30318e27ee772",
"type": "link in",
"z": "abcd6ab2be488b84",
"name": "link in 1",
"links": [
"4d675f4164517f5d"
],
"x": 465,
"y": 400,
"wires": [
[
"5b4f462150cf7432"
]
]
}
]
Die Gruppen-ID ist in der Gruppenverwaltung von Mealie zu finden.
Für den API-Aufruf gibt man die URL mit /docs am Ende ein. Dort ist eine Restful API vorhanden, die Parameter selbst zusammen bauen kann. Dort können weitere Funktionen implementiert werden mit NodeRED.
So sieht bei erfolgreicher Installation die Einkaufsliste bei Telegram aus: