|
[{"id":"3fd7311e.c028ce","type":"mqtt-broker","broker":"localhost","port":"1883"},{"id":"a968646d.569798","type":"inject","name":"Get Weather","topic":"","payload":"1","repeat":"0","crontab":"15 6 * * *","once":false,"x":124,"y":365,"z":"22fdfba5.dd0204","wires":[["6fac9031.90537"]]},{"id":"6fac9031.90537","type":"http request","name":"BBC Weather current conditions","method":"GET","url":"http://open.live.bbc.co.uk/weather/feeds/en/2636049/observations.rss","x":326,"y":365,"z":"22fdfba5.dd0204","wires":[["f99774f4.066888"]]},{"id":"f99774f4.066888","type":"xml2js","useEyes":false,"name":"","x":554,"y":364,"z":"22fdfba5.dd0204","wires":[["fc39496b.03c6b8"]]},{"id":"fc39496b.03c6b8","type":"function","name":"Parse Weather","func":"// Parse forecast and send to Twilio SMS and mqtt topic\n\nvar weatherChannel = msg.payload.rss.channel[0];\nvar pubDate = weatherChannel.item[0].pubDate[0];\nvar description = weatherChannel.item[0].description[0];\nvar mqttMsg = { topic: \"nodered/printer\", payload: pubDate + \"\\n\" + description };\nvar smsMsg = { topic: \"+44YOUR_MOBILE\", payload: pubDate + \"\\n\" + description };\n\nreturn [mqttMsg, smsMsg];","outputs":"2","x":738,"y":364,"z":"22fdfba5.dd0204","wires":[["42902f9a.bd6fd"],["f2bea1ba.0d416"]]},{"id":"a6f692fc.59097","type":"http request","name":"BBC Weather Next Day forecast","method":"GET","url":"http://open.live.bbc.co.uk/weather/feeds/en/2636049/3dayforecast.rss","x":368,"y":421,"z":"22fdfba5.dd0204","wires":[["6987a4d2.96785c"]]},{"id":"e0ebc595.1f1438","type":"inject","name":"Next Day Forcecast","topic":"","payload":"","repeat":"0","crontab":"00 21 * * *","once":false,"x":131,"y":420,"z":"22fdfba5.dd0204","wires":[["a6f692fc.59097"]]},{"id":"6987a4d2.96785c","type":"xml2js","useEyes":false,"name":"","x":577,"y":420,"z":"22fdfba5.dd0204","wires":[["247c6996.db8396"]]},{"id":"247c6996.db8396","type":"function","name":"Parse Forecast","func":"// Parse forecast and send to Twilio SMS and mqtt topic\n\nvar weatherChannel = msg.payload.rss.channel[0];\nvar day1 = weatherChannel.item[1];\nvar title = day1.title[0];\nvar description = day1.description[0];\nvar mqttMsg = { topic: \"nodered/printer\", payload: title };\nvar smsMsg = { topic: \"+44YOUR_MOBILE\", payload: title };\nreturn [mqttMsg, smsMsg];\n","outputs":"2","x":742,"y":420,"z":"22fdfba5.dd0204","wires":[["42902f9a.bd6fd"],["f2bea1ba.0d416"]]},{"id":"42902f9a.bd6fd","type":"mqtt out","name":"Send to Printer","topic":"nodered/printer","broker":"3fd7311e.c028ce","x":986,"y":428,"z":"22fdfba5.dd0204","wires":[]},{"id":"f2bea1ba.0d416","type":"twilio out","title":"Send SMS","name":"TwilioSMS","x":977,"y":358,"z":"22fdfba5.dd0204","wires":[]}] |
Hi,
Can you please help with Twillo configuration . any link regarding configuring it for India ? thanks