This repository has been archived by the owner on Feb 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
24_with_ui.json
1 lines (1 loc) · 6.86 KB
/
24_with_ui.json
1
[{"id":"eb9e0150.98164","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a965e02b.ddfe3","type":"ibmiot in","z":"eb9e0150.98164","authentication":"apiKey","apiKey":"f157c0dc.e95ca","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"","applicationId":"","deviceType":"+","eventType":"+","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":true,"allApplications":"","allDeviceTypes":true,"allLogicalInterfaces":"","allEvents":true,"allCommands":"","allFormats":true,"qos":0,"x":95.28973817825317,"y":141.8835163116455,"wires":[["3cf5fe23.5e7f92"]],"l":false},{"id":"c02477a5.0754a8","type":"debug","z":"eb9e0150.98164","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":332.2840623855591,"y":139.9630479812622,"wires":[],"l":false},{"id":"3cf5fe23.5e7f92","type":"function","z":"eb9e0150.98164","name":"add params","func":" msg.payload.time = new Date().getTime();\n msg.payload.deviceId = msg.deviceId;\n return msg;","outputs":1,"noerr":0,"x":161.2897777557373,"y":141.00850820541382,"wires":[["c02477a5.0754a8","5e67918d.73db9","4eb3a306.a1925c"]],"l":false},{"id":"5e67918d.73db9","type":"cloudant out","z":"eb9e0150.98164","name":"","cloudant":"","database":"events","service":"haybale-ori-201910-cloudantNoSQLDB","payonly":true,"operation":"insert","x":329.28693675994873,"y":189.90055179595947,"wires":[],"l":false},{"id":"4eb3a306.a1925c","type":"function","z":"eb9e0150.98164","name":"CtoF","func":" msg.payload.tempF = msg.payload.temp*9/5+32;\n return msg;","outputs":1,"noerr":0,"x":328.28974628448486,"y":248.83235359191895,"wires":[["221a66bf.3ecf6a","8d51020d.0bb81","dff48aa2.c6ed78","668bd450.5f695c"]],"l":false},{"id":"221a66bf.3ecf6a","type":"switch","z":"eb9e0150.98164","name":"tempAlerts","property":"payload.tempF","propertyType":"msg","rules":[{"t":"gte","v":"190","vt":"num"},{"t":"gte","v":"175","vt":"num"},{"t":"gte","v":"150","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":4,"x":463.2869110107422,"y":246.82386016845703,"wires":[["b68dd141.9282"],["56b37fba.188c"],["e94fb1da.c081c"],["df9b1314.9f339"]],"l":false},{"id":"b68dd141.9282","type":"template","z":"eb9e0150.98164","name":"On fire","field":"payload.status","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Call fire services now! Fire expected!","output":"str","x":552.2925844192505,"y":179.77270698547363,"wires":[["8a4543dc.ae1f6"]],"l":false},{"id":"e94fb1da.c081c","type":"template","z":"eb9e0150.98164","name":"Start air movement","field":"payload.status","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Dangerously hot, promote air circulation.","output":"str","x":555.0142307281494,"y":283.005654335022,"wires":[["8a4543dc.ae1f6"]],"l":false},{"id":"56b37fba.188c","type":"template","z":"eb9e0150.98164","name":"Stop air movement","field":"payload.status","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Fire likely, stop air movement to avoid fanning flames.","output":"str","x":550.0142307281494,"y":233.00565433502197,"wires":[["8a4543dc.ae1f6"]],"l":false},{"id":"df9b1314.9f339","type":"switch","z":"eb9e0150.98164","name":"humidityAlert","property":"payload.humidity","propertyType":"msg","rules":[{"t":"gte","v":"20","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":528.2869110107422,"y":344.8210220336914,"wires":[["81c0afe9.04521"],["4cef2326.55395c"]],"l":false},{"id":"81c0afe9.04521","type":"template","z":"eb9e0150.98164","name":"Too humid","field":"payload.status","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Reduce humidity","output":"str","x":596.0142288208008,"y":325.0056743621826,"wires":[["8a4543dc.ae1f6"]],"l":false},{"id":"4cef2326.55395c","type":"template","z":"eb9e0150.98164","name":"Fine","field":"payload.status","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Everything's fine, no alert","output":"str","x":592.0142841339111,"y":377.005672454834,"wires":[["8a4543dc.ae1f6"]],"l":false},{"id":"8a4543dc.ae1f6","type":"rbe","z":"eb9e0150.98164","name":"Report be Exception","func":"rbe","gap":"","start":"","inout":"out","property":"payload.status","x":652.2925872802734,"y":221.14203643798828,"wires":[["4fe54e44.4ec14","ae480121.7d448"]],"l":false},{"id":"4fe54e44.4ec14","type":"debug","z":"eb9e0150.98164","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.status","targetType":"msg","x":765.8351078033447,"y":220.96585273742676,"wires":[],"l":false},{"id":"ae480121.7d448","type":"ui_text","z":"eb9e0150.98164","group":"f5f1414e.9c5d3","order":0,"width":0,"height":0,"name":"","label":"Status","format":"{{msg.payload.status}}","layout":"row-spread","x":780.8323106765747,"y":274.0994281768799,"wires":[],"l":false},{"id":"8d51020d.0bb81","type":"ui_gauge","z":"eb9e0150.98164","name":"","group":"f5f1414e.9c5d3","order":1,"width":0,"height":0,"gtype":"gage","title":"Temperature","label":"F","format":"{{msg.payload.tempF}}","min":"32","max":"212","colors":["#00b500","#e6e600","#ca3838"],"seg1":"150","seg2":"175","x":414.8351821899414,"y":326.04544162750244,"wires":[],"l":false},{"id":"dff48aa2.c6ed78","type":"ui_gauge","z":"eb9e0150.98164","name":"","group":"f5f1414e.9c5d3","order":2,"width":0,"height":0,"gtype":"gage","title":"Humidity","label":"%","format":"{{msg.payload.humidity}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"20","seg2":"20","x":415.83514976501465,"y":382.039758682251,"wires":[],"l":false},{"id":"668bd450.5f695c","type":"function","z":"eb9e0150.98164","name":"getTemp","func":"msg.payload = msg.payload.tempF; \nmsg.topic = msg.deviceId + \" temp\"; \n\nreturn msg;","outputs":1,"noerr":0,"x":423.82666778564453,"y":478.9459743499756,"wires":[["c6df3bdd.ed1758"]],"l":false},{"id":"c6df3bdd.ed1758","type":"ui_chart","z":"eb9e0150.98164","name":"","group":"e265d07c.8b433","order":0,"width":"6","height":"6","label":"Temp","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"bezier","nodata":"","dot":false,"ymin":"0","ymax":"240","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":555.8295135498047,"y":477.57666778564453,"wires":[[]],"l":false},{"id":"f157c0dc.e95ca","type":"ibmiot","z":"","name":"Hay Bale IoT Platform","keepalive":"60","serverName":"2f5the.messaging.internetofthings.ibmcloud.com","cleansession":true,"appId":"","shared":false},{"id":"f5f1414e.9c5d3","type":"ui_group","name":"Group 1","tab":"cb2c997e.eff6d8","order":1,"disp":true,"width":6},{"id":"e265d07c.8b433","type":"ui_group","z":"","name":"Recent History","tab":"cb2c997e.eff6d8","order":2,"disp":true,"width":"6","collapse":false},{"id":"cb2c997e.eff6d8","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]