To see how to add new nodes to your pallet, check out my post here;
Do a search for ‘snmp’. There is only one result, install it.
Ok, now you can drag it over and start messing about, or you can import this example flow to get started;
Every 30 seconds I read the OID for power from my APC PDU (Americian Power Company, Power Distribution Rack). Since it returns an int, I divide by 10 to get watts in the Function Node.
The result then goes to my groov Data Store node for trending and alerting in groov.
(Note I am only reading the total, but have included both banks OID’s in case you have this exact model, I had a hard time finding the magic OID’s).
Just highlight the text below, copy it and import it using the three bar menu on the top right of your Node-RED install.
[{“id”:“26ed0118.d3b8de”,“type”:“snmp”,“z”:“7b200ffe.c26fd”,“host”:“192.168.1.78”,“community”:“public”,“version”:“1”,“oids”:“1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1”,“name”:“apc-pdu total load”,“x”:330,“y”:280,“wires”:[[“186c2482.f8ce5b”]]},{“id”:“21c54bd7.a40f34”,“type”:“inject”,“z”:“7b200ffe.c26fd”,“name”:“30 seconds”,“topic”:“”,“payload”:“”,“payloadType”:“date”,“repeat”:“30”,“crontab”:“”,“once”:false,“x”:110,“y”:280,“wires”:[[“26ed0118.d3b8de”]]},{“id”:“69ff7df7.10e2c4”,“type”:“snmp”,“z”:“7b200ffe.c26fd”,“host”:“192.168.1.78”,“community”:“public”,“version”:“1”,“oids”:“1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.2”,“name”:“apc-pdu bank 1 load”,“x”:340,“y”:340,“wires”:[]},{“id”:“91c810f8.6ffa28”,“type”:“snmp”,“z”:“7b200ffe.c26fd”,“host”:“192.168.1.78”,“community”:“public”,“version”:“1”,“oids”:“1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.3”,“name”:“apc-pdu bank 2 load”,“x”:340,“y”:400,“wires”:[]},{“id”:“cca95e14.b40028”,“type”:“groov-write-ds”,“z”:“7b200ffe.c26fd”,“dataStore”:“acbeaaf6.7eea68”,“tagName”:“apc-pdu-total”,“tableStartIndex”:“”,“value”:“”,“valueType”:“msg.payload”,“name”:“”,“x”:720,“y”:280,“wires”:[]},{“id”:“186c2482.f8ce5b”,“type”:“function”,“z”:“7b200ffe.c26fd”,“name”:“divide by 10”,“func”:“msg.payload = msg.payload[0].value/10;\nreturn msg;\n”,“outputs”:1,“noerr”:0,“x”:530,“y”:280,“wires”:[[“cca95e14.b40028”]]},{“id”:“acbeaaf6.7eea68”,“type”:“groov-data-store”,“z”:“”,“project”:“c76a7c03.5cf27”,“dsName”:“node-RED”},{“id”:“c76a7c03.5cf27”,“type”:“groov-project”,“z”:“”,“address”:“localhost”}]