[
{
"id": "b4cebfd261883356",
"type": "tab",
"label": "Flow 7",
"disabled": false,
"info": "",
"env":
},
{
"id": "fbbb78df6cc07468",
"type": "ibmiot out",
"z": "b4cebfd261883356",
"authentication": "apiKey",
"apiKey": "6d8be82fde335a13",
"outputType": "cmd",
"deviceId": "12345",
"deviceType": "streetlight",
"eventCommandType": "test",
"format": "String",
"data": "Data",
"qos": 0,
"name": "IBM IoT",
"service": "registered",
"x": 1100,
"y": 160,
"wires":
},
{
"id": "19be0692cdfa0d82",
"type": "ui_button",
"z": "b4cebfd261883356",
"name": "",
"group": "b7771ab55bf3a9e9",
"order": 1,
"width": 6,
"height": 1,
"passthru": false,
"label": "Motor ON",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "on",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 160,
"y": 300,
"wires": [
[
"f153cef746832e9c",
"a10d8fbaaa72435e"
]
]
},
{
"id": "f4c4d826f47fe047",
"type": "ui_button",
"z": "b4cebfd261883356",
"name": "",
"group": "b7771ab55bf3a9e9",
"order": 3,
"width": 6,
"height": 1,
"passthru": false,
"label": "Motor OFF",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "off",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 190,
"y": 340,
"wires": [
[
"f153cef746832e9c",
"a10d8fbaaa72435e"
]
]
},
{
"id": "f153cef746832e9c",
"type": "debug",
"z": "b4cebfd261883356",
"name": "debug 12",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 360,
"y": 300,
"wires":
},
{
"id": "a10d8fbaaa72435e",
"type": "ibmiot out",
"z": "b4cebfd261883356",
"authentication": "apiKey",
"apiKey": "6d8be82fde335a13",
"outputType": "cmd",
"deviceId": "12345",
"deviceType": "Relay",
"eventCommandType": "test",
"format": "String",
"data": "Data",
"qos": 0,
"name": "IBM IoT",
"service": "registered",
"x": 580,
"y": 340,
"wires":
},
{
"id": "4653cc0a16b48f37",
"type": "ibmiot in",
"z": "b4cebfd261883356",
"authentication": "apiKey",
"apiKey": "6d8be82fde335a13",
"inputType": "evt",
"logicalInterface": "",
"ruleId": "",
"deviceId": "12345",
"applicationId": "",
"deviceType": "Relay",
"eventType": "+",
"commandType": "",
"format": "json",
"name": "IBM IoT",
"service": "registered",
"allDevices": "",
"allApplications": "",
"allDeviceTypes": "",
"allLogicalInterfaces": "",
"allEvents": true,
"allCommands": "",
"allFormats": "",
"qos": 0,
"x": 170,
"y": 120,
"wires": [
[
"9d6c07e5afd023a7",
"208caa2c346590f7"
]
]
},
{
"id": "9d6c07e5afd023a7",
"type": "debug",
"z": "b4cebfd261883356",
"name": "debug 13",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 500,
"y": 140,
"wires":
},
{
"id": "208caa2c346590f7",
"type": "function",
"z": "b4cebfd261883356",
"name": "motor bill",
"func": "msg.payload=msg.payload.motorbill\nif(msg.payload==0){\n\n msg.payload="The motor is switched on!"+"->Billing started";\n}\nelse{\n\n msg.payload="The motor is switched off!"+"->Elapsed motor bill is:"+msg.payload+"$";\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 320,
"y": 200,
"wires": [
[
"6507a4e5c5e4e715"
]
]
},
{
"id": "6507a4e5c5e4e715",
"type": "ui_text",
"z": "b4cebfd261883356",
"group": "b7771ab55bf3a9e9",
"order": 3299,
"width": 0,
"height": 0,
"name": "",
"label": "Motor Bill",
"format": "{{msg.payload}}",
"layout": "col-center",
"className": "",
"x": 580,
"y": 240,
"wires":
},
{
"id": "6d8be82fde335a13",
"type": "ibmiot",
"name": "",
"keepalive": "60",
"serverName": "",
"cleansession": true,
"appId": "",
"shared": false
},
{
"id": "b7771ab55bf3a9e9",
"type": "ui_group",
"name": "Motor Switch and Bill",
"tab": "fac361559fed2381",
"order": 1,
"disp": true,
"width": "22",
"collapse": false,
"className": ""
},
{
"id": "fac361559fed2381",
"type": "ui_tab",
"name": "Smart Water Billing System",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Welcome to the forum.
I can't import your flow.
Can I suggest you read this and try re-posting it.
https://discourse.nodered.org/t/how-to-post-code-or-flows/69516
Also could you explain what your Project does so that other people can determine if they want to use it?
Could you also list if your project needs any non-standard nodes that a user will need to install?