PLC alerting with SIGNL4
PLC's (programmable logic controllers) are used to monitor and control industrial devices like machines, robots or assembly lines.
In this sample setup use Node-RED and a simple PLC simulator. In Node-RED, configure the S7 node to connect to the PLC and also configure the required S7 variables there. Then, use the SIGNL4 node for alerting (and for resolving the alerts).
[{"id":"1af4dd7b.795d73","type":"tab","label":"PLC S7 to SIGNL4","disabled":false,"info":""},{"id":"a50d6a9a.c36128","type":"s7 in","z":"1af4dd7b.795d73","endpoint":"2aded6ca.07463a","mode":"all-split","variable":"DB221","diff":true,"name":"","x":190,"y":200,"wires":[["dbbfd90f.1ffa88","51abe94f.4d6ee8"]]},{"id":"dbbfd90f.1ffa88","type":"debug","z":"1af4dd7b.795d73","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":410,"y":160,"wires":[]},{"id":"eddfd2c4.8aec2","type":"SIGNL4","z":"1af4dd7b.795d73","name":"SIGNL4 Alerting","teamSecret":"","alertSubject":"SIGNL4 Alert","alertBody":"SPS S7 Issue","alertS4Service":"","alertS4Location":"","alertS4AlertingScenario":"single_ack","alertS4Filtering":"false","alertS4ExternalID":"1","x":680,"y":260,"wires":[[]]},{"id":"80091b1b.5ce328","type":"SIGNL4 Resolve","z":"1af4dd7b.795d73","name":"SIGNL4 Resolve","teamSecret":"","alertS4ExternalID":"1","x":690,"y":340,"wires":[[]]},{"id":"8e6abe0b.fed3d","type":"switch","z":"1af4dd7b.795d73","name":"","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"jsonata"},{"t":"eq","v":"false","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":2,"x":490,"y":300,"wires":[["eddfd2c4.8aec2"],["80091b1b.5ce328"]]},{"id":"51abe94f.4d6ee8","type":"function","z":"1af4dd7b.795d73","name":"Format Alert","func":"\nvar newMsg = {\n topic: msg.topic,\n status: msg.payload,\n body: 'Address: ' + msg.topic,\n payload: {}\n}\n\nnewMsg.payload['Body'] = 'Address: ' + msg.topic;\nnewMsg.payload['Subject'] = \"SPS S7 Alert\"\nnewMsg.payload['X-S4-ExternalID'] = msg.topic;\n\nreturn newMsg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":310,"y":300,"wires":[["8e6abe0b.fed3d"]]},{"id":"2aded6ca.07463a","type":"s7 endpoint","z":"","transport":"iso-on-tcp","address":"127.0.0.1","port":"102","rack":"0","slot":"2","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapter":"","busaddr":"2","cycletime":"1000","timeout":"2000","name":"","vartable":[{"addr":"DB221,X0.1","name":"DB221"}]}]