Telegram-Webcam-Bot/flow.js
2019-12-09 12:04:21 +01:00

2 lines
5.8 KiB
JavaScript

[{"id":"ec9e2d4f.f2e5a8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"b30b0135.5bc12","type":"chatbot-telegram-send","z":"ec9e2d4f.f2e5a8","bot":"386196ef.68005a","botProduction":"","track":false,"passThrough":false,"outputs":0,"x":890,"y":240,"wires":[]},{"id":"5e34af5f.d1a2a","type":"chatbot-telegram-receive","z":"ec9e2d4f.f2e5a8","bot":"386196ef.68005a","botProduction":"","x":190,"y":240,"wires":[["44582bac.349004","7d6e98e9.8ea5a","6120793a.b46be","b5a587b6.d0e5c8","852936a7.a59cf","c0ff7758.47e5f8","d2773d14.6cb0e8","edf9348.97dd5c8"]]},{"id":"d2773d14.6cb0e8","type":"chatbot-message","z":"ec9e2d4f.f2e5a8","name":"","message":[{"message":"Aktuelles Foto der Webcam\n"}],"answer":false,"silent":false,"x":590,"y":240,"wires":[["b30b0135.5bc12"]]},{"id":"9de7a46f.b989a8","type":"chatbot-image","z":"ec9e2d4f.f2e5a8","name":"","filename":"","image":"","caption":"","x":790,"y":380,"wires":[["59a76ee7.97eed"]]},{"id":"44582bac.349004","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam","x":390,"y":300,"wires":[["ecb06c0d.088818"]]},{"id":"ecb06c0d.088818","type":"http request","z":"ec9e2d4f.f2e5a8","name":"","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.1.200/jpg/image.jpg","tls":"","persist":false,"proxy":"","authType":"","x":570,"y":300,"wires":[["9de7a46f.b989a8"]]},{"id":"7d6e98e9.8ea5a","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam2","x":390,"y":160,"wires":[["89718f1d.3c4c98"]]},{"id":"89718f1d.3c4c98","type":"exec","z":"ec9e2d4f.f2e5a8","command":"wget -O /tmp/bild.jpg \"http://admin:admin@192.168.1.100/cgi-bin/snapshot.cgi?1\"","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Bild","x":530,"y":160,"wires":[["7de9050f.5236fc"],[],[]]},{"id":"7de9050f.5236fc","type":"chatbot-image","z":"ec9e2d4f.f2e5a8","name":"","filename":"","image":"/tmp/bild.jpg","caption":"","x":690,"y":180,"wires":[["b30b0135.5bc12"]]},{"id":"6120793a.b46be","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam3","x":390,"y":340,"wires":[["5bec1085.bccad8"]]},{"id":"5bec1085.bccad8","type":"http request","z":"ec9e2d4f.f2e5a8","name":"TUM München","method":"GET","ret":"bin","paytoqs":false,"url":"https://www.foto-webcam.eu/webcam/tum-olympiapark/current/1200.jpg","tls":"","persist":false,"proxy":"","authType":"","x":560,"y":340,"wires":[["9de7a46f.b989a8"]]},{"id":"b5a587b6.d0e5c8","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam4","x":390,"y":380,"wires":[["1b784fff.9ed778"]]},{"id":"1b784fff.9ed778","type":"http request","z":"ec9e2d4f.f2e5a8","name":"Freimann","method":"GET","ret":"bin","paytoqs":false,"url":"https://www.foto-webcam.eu/webcam/freimann/current/1200.jpg","tls":"","persist":false,"proxy":"","authType":"","x":540,"y":380,"wires":[["9de7a46f.b989a8"]]},{"id":"852936a7.a59cf","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam5","x":390,"y":420,"wires":[["6982ecaa.05ad54"]]},{"id":"6982ecaa.05ad54","type":"http request","z":"ec9e2d4f.f2e5a8","name":"Zugspitze Berg","method":"GET","ret":"bin","paytoqs":false,"url":"https://www.foto-webcam.eu/webcam/zugspitze/current/1200.jpg","tls":"","persist":false,"proxy":"","authType":"","x":560,"y":420,"wires":[["9de7a46f.b989a8"]]},{"id":"c0ff7758.47e5f8","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/cam6","x":390,"y":460,"wires":[["83a8a114.0bcf78"]]},{"id":"83a8a114.0bcf78","type":"http request","z":"ec9e2d4f.f2e5a8","name":"Zugspitze Talstation","method":"GET","ret":"bin","paytoqs":false,"url":"https://www.foto-webcam.eu/webcam/bzb-tal/current/1200.jpg","tls":"","persist":false,"proxy":"","authType":"","x":580,"y":460,"wires":[["9de7a46f.b989a8"]]},{"id":"edf9348.97dd5c8","type":"chatbot-command","z":"ec9e2d4f.f2e5a8","name":"","command":"/help","x":390,"y":500,"wires":[["22d41715.46c368"]]},{"id":"22d41715.46c368","type":"function","z":"ec9e2d4f.f2e5a8","name":"create help text","func":"\nvar helpMessage = \"/help - shows help\\r\\n\";\nhelpMessage += \"/foo - opens a dialog\\r\\n\";\nhelpMessage += \"/cam - Office Cam1\\r\\n\";\nhelpMessage += \"/cam2 - Office Cam2\\r\\n\";\nhelpMessage += \"/cam3 - TU-München Cam\\r\\n\";\nhelpMessage += \"/cam4 - Freimann München Cam\\r\\n\";\nhelpMessage += \"/cam5 - Zugspitze Bergstation Cam\\r\\n\";\nhelpMessage += \"/cam6 - Zugspitze Talstation Cam\\r\\n\";\nhelpMessage += \"/cam7 - Other Cam\\r\\n\";\n\nhelpMessage += \"Your chat id is \" + msg.payload.chatId;\n\nhelpMessage += \"\\r\\n\";\nhelpMessage += \"You are welcome: \"+msg.originalMessage.from.username;\nhelpMessage += \"\\r\\n\";\n\n\n\nmsg.payload.content = helpMessage;\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":500,"wires":[["179a47dc.5efba"]]},{"id":"b4ecb071.4362e8","type":"link in","z":"ec9e2d4f.f2e5a8","name":"","links":["179a47dc.5efba","59a76ee7.97eed"],"x":715,"y":260,"wires":[["b30b0135.5bc12"]]},{"id":"179a47dc.5efba","type":"link out","z":"ec9e2d4f.f2e5a8","name":"","links":["b4ecb071.4362e8"],"x":720,"y":500,"wires":[]},{"id":"59a76ee7.97eed","type":"link out","z":"ec9e2d4f.f2e5a8","name":"","links":["b4ecb071.4362e8"],"x":895,"y":380,"wires":[]},{"id":"f2b320ea.ab7c6","type":"comment","z":"ec9e2d4f.f2e5a8","name":"Webcam Telegram Bot","info":"In diesem Bot können relativ einfach Bilder einer oder mehreren Webcams angefordert werden ohne die URL oder den Browser benutzen zu müssen.\n\nEinfach mit /cam das jeweilige Bild einer Webcam anfordern und wird in Telegram automatisch anzeigt. \n\nAuthor : Joachim Hummel ","x":180,"y":80,"wires":[]},{"id":"386196ef.68005a","type":"chatbot-telegram-node","z":"","botname":"Webcam1Bot","usernames":"","providerToken":"","polling":"1000","store":"d04fdc7c.ac99","log":"","parseMode":"","debug":false,"webHook":"","connectMode":"polling"},{"id":"d04fdc7c.ac99","type":"chatbot-context-store","z":"","name":"Mem","contextStorage":"memory","contextParams":""}]