-
Notifications
You must be signed in to change notification settings - Fork 0
/
flows.json
1 lines (1 loc) · 6.33 KB
/
flows.json
1
[{"id":"af1e35b547d82d1a","type":"tab","label":"coneccion","disabled":false,"info":"","env":[]},{"id":"d0c092fbc0fb745b","type":"debug","z":"af1e35b547d82d1a","name":"salida1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":857,"y":102,"wires":[]},{"id":"d5e302110debae4c","type":"http request","z":"af1e35b547d82d1a","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.thingspeak.com/update?api_key=G28HZOKZQFENE9K6&field1={{topic}}","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":344,"y":220,"wires":[[]]},{"id":"dde8bd3f69aca78b","type":"function","z":"af1e35b547d82d1a","name":"function 1","func":"if (msg.payload != null) {\nmsg.chatId = global.get('chatId')\nmsg.payload=msg.payload\nreturn msg\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":568,"y":188,"wires":[["33ef3664ba1d1ab6","f48f9026c362070b"]]},{"id":"33ef3664ba1d1ab6","type":"wiotp out","z":"af1e35b547d82d1a","authType":"d","qs":"false","qsDeviceId":"","deviceKey":"619dafbff43291b9","deviceType":"","deviceId":"","event":"event","format":"json","qos":"","name":"12345","x":739,"y":191,"wires":[]},{"id":"9f3f44e81a105305","type":"telegram receiver","z":"af1e35b547d82d1a","name":"consultjcbot","bot":"904e712701a5f6cc","saveDataDir":"","filterCommands":false,"x":191.77777099609375,"y":143.77777099609375,"wires":[["043aa4f09de1018c"],[]],"icon":"node-red/arrow-in.svg"},{"id":"043aa4f09de1018c","type":"function","z":"af1e35b547d82d1a","name":"function 2","func":"var variable\n\nif (msg.payload.type == \"voice\"){\n let prueba = msg.payload.weblink\n prueba = prueba.split(\":\")\n msg.topic=prueba[2].split('/')\n msg.payload='audio'\n \n}\nelse{\n msg.topic = msg.payload.content\n msg.payload = msg.payload.content\n}\n\nvariable=msg.payload.chatId\nglobal.set('chatId',variable)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":343,"y":139,"wires":[["d5e302110debae4c","eda26498ac2e3fa3","3dbefcdfdfa6dd5d"]]},{"id":"34760e5f614f3c7f","type":"http request","z":"af1e35b547d82d1a","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.thingspeak.com/channels/2013619/feeds.json?api_key=E9C9I4JBQOEUSETJ&results=2","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":426,"y":67,"wires":[["299cee4369acc51d"]]},{"id":"ddb62fd336ccd082","type":"debug","z":"af1e35b547d82d1a","name":"salida 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":861,"y":150,"wires":[]},{"id":"299cee4369acc51d","type":"function","z":"af1e35b547d82d1a","name":"ParseDataThinkSpeaking","func":"msg.payload = JSON.parse(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":626,"y":67,"wires":[["436f143dce11fcd4"]]},{"id":"f48f9026c362070b","type":"function","z":"af1e35b547d82d1a","name":"function 4","func":"msg.payload = {\n chatId: msg.chatId,\n type: \"message\",\n content: msg.payload\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":574,"y":244,"wires":[["13399240fbc77802"]]},{"id":"13399240fbc77802","type":"telegram sender","z":"af1e35b547d82d1a","name":"prueba","bot":"904e712701a5f6cc","haserroroutput":true,"outputs":2,"x":731.4444580078125,"y":242.5555419921875,"wires":[["0f0314a1627f25b2"],["0f0314a1627f25b2"]]},{"id":"3dbefcdfdfa6dd5d","type":"watson-assistant-v2","z":"af1e35b547d82d1a","name":"Watson Assistant-jc","service-endpoint":"https://api.us-south.assistant.watson.cloud.ibm.com/instances/9bea25d6-7b3b-458f-9eaa-85bf0c29ecfb","assistant_id":"1","debug":false,"restart":false,"return_context":true,"alternate_intents":false,"multisession":true,"timeout":"","optout-learning":false,"persist-session-id":false,"credentials":{},"x":592.5,"y":371,"wires":[[]]},{"id":"a64dd5d6c00bd32b","type":"http in","z":"af1e35b547d82d1a","name":"","url":"prueba","method":"get","upload":false,"swaggerDoc":"","x":197.5,"y":45,"wires":[["298b22c296271f31","34760e5f614f3c7f"]]},{"id":"298b22c296271f31","type":"http response","z":"af1e35b547d82d1a","name":"Responsematlab","statusCode":"200","headers":{},"x":439.5,"y":20,"wires":[]},{"id":"ec46b0b7a9c0087a","type":"inject","z":"af1e35b547d82d1a","name":"manual GET","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":196.5,"y":78,"wires":[["34760e5f614f3c7f"]]},{"id":"436f143dce11fcd4","type":"function","z":"af1e35b547d82d1a","name":"telegram o matlab","func":"let msg1 = {payload:null}\nif (msg.payload.feeds[1].field2 != null){\n msg1.payload = msg.payload.feeds[1].field2 \n msg.payload = null\n \n\n}\nelse{\n msg.payload = 'mesaje'\n}\nreturn [msg,msg1];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":622.5,"y":114,"wires":[["d0c092fbc0fb745b"],["ddb62fd336ccd082","dde8bd3f69aca78b"]]},{"id":"0f0314a1627f25b2","type":"debug","z":"af1e35b547d82d1a","name":"salida 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":887,"y":234,"wires":[]},{"id":"eda26498ac2e3fa3","type":"debug","z":"af1e35b547d82d1a","name":"salida 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":335,"y":273,"wires":[]},{"id":"619dafbff43291b9","type":"wiotp-credentials","name":"12345","org":"rcqlw4","serverName":"","devType":"Iot","devId":"12345","keepalive":"60","cleansession":false,"tls":"9c443a1ddd43ebaf","usetls":false},{"id":"904e712701a5f6cc","type":"telegram bot","botname":"consultjcbot","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksprotocol":"socks5","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false},{"id":"9c443a1ddd43ebaf","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":""}]