I’ve done a simple flow to interface a PIR, its been working great on a PiZeroW for quite some time. Today I went to add the flow to a Pi2 system. I exported the flow on the PiZeroW and imported it into the Pi2. Problem is it doesn’t work when deployed. Running the latest Raspbian with: python-rpi.gpio is version (0.6.3~stretch-1).
The pin numbers are the same and I’ve verified the hardware works by hooking up a meter to the PIR output pin 0 volts when idle, 3.3V on detect.
Here is my flow, exorted from the Pi2 system:
[
{
“id”: “167e391a.96b117”,
“type”: “debug”,
“z”: “4b76ad62.77a454”,
“name”: “”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “true”,
“x”: 1010,
“y”: 100,
“wires”: []
},
{
“id”: “8ae1a316.ac03a”,
“type”: “rbe”,
“z”: “4b76ad62.77a454”,
“name”: “”,
“func”: “rbe”,
“gap”: “”,
“start”: “”,
“inout”: “out”,
“property”: “payload”,
“x”: 260,
“y”: 180,
“wires”: [
[
“ec0261ae.24e84”
]
]
},
{
“id”: “7dd4fa25.9ce844”,
“type”: “mqtt out”,
“z”: “4b76ad62.77a454”,
“name”: “PiCam PIR sensor”,
“topic”: “AI/PiCam_PIR”,
“qos”: “0”,
“retain”: “”,
“broker”: “8cadb95d.3521d8”,
“x”: 1090,
“y”: 160,
“wires”: []
},
{
“id”: “52b13145.efa49”,
“type”: “change”,
“z”: “4b76ad62.77a454”,
“name”: “”,
“rules”: [
{
“t”: “set”,
“p”: “payload”,
“pt”: “msg”,
“to”: “Motion”,
“tot”: “str”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 780,
“y”: 160,
“wires”: [
[
“167e391a.96b117”,
“7dd4fa25.9ce844”
]
]
},
{
“id”: “82f3461.35263b8”,
“type”: “change”,
“z”: “4b76ad62.77a454”,
“name”: “”,
“rules”: [
{
“t”: “set”,
“p”: “payload”,
“pt”: “msg”,
“to”: “Stopped”,
“tot”: “str”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 780,
“y”: 200,
“wires”: [
[
“167e391a.96b117”,
“7dd4fa25.9ce844”
]
]
},
{
“id”: “ec0261ae.24e84”,
“type”: “trigger”,
“z”: “4b76ad62.77a454”,
“op1”: “1”,
“op2”: “0”,
“op1type”: “num”,
“op2type”: “num”,
“duration”: “5”,
“extend”: true,
“units”: “s”,
“reset”: “”,
“bytopic”: “all”,
“name”: “”,
“x”: 420,
“y”: 180,
“wires”: [
[
“b57484f.9f74978”
]
]
},
{
“id”: “b57484f.9f74978”,
“type”: “switch”,
“z”: “4b76ad62.77a454”,
“name”: “”,
“property”: “payload”,
“propertyType”: “msg”,
“rules”: [
{
“t”: “eq”,
“v”: “1”,
“vt”: “num”
},
{
“t”: “eq”,
“v”: “0”,
“vt”: “num”
}
],
“checkall”: “true”,
“repair”: false,
“outputs”: 2,
“x”: 590,
“y”: 180,
“wires”: [
[
“52b13145.efa49”
],
[
“82f3461.35263b8”
]
]
},
{
“id”: “10eaae18.22a1e2”,
“type”: “rpi-gpio in”,
“z”: “4b76ad62.77a454”,
“name”: “PiCam PIR”,
“pin”: “7”,
“intype”: “tri”,
“debounce”: “25”,
“read”: true,
“x”: 100,
“y”: 180,
“wires”: [
[
“8ae1a316.ac03a”
]
]
},
{
“id”: “8cadb95d.3521d8”,
“type”: “mqtt-broker”,
“z”: “”,
“name”: “localhost:1883”,
“broker”: “localhost”,
“port”: “1883”,
“clientid”: “”,
“usetls”: false,
“compatmode”: true,
“keepalive”: “60”,
“cleansession”: true,
“birthTopic”: “”,
“birthQos”: “0”,
“birthRetain”: “false”,
“birthPayload”: “”,
“closeTopic”: “”,
“closePayload”: “”,
“willTopic”: “”,
“willQos”: “0”,
“willRetain”: “false”,
“willPayload”: “”
}
]
I was not expecting any issues here