Antminer S9 Monitoring
Monitoring of Antminer S9 running BrainsOS+. Flow uses CGMiner API and exposes the data for further processing using MQTT.
[{"id":"414113e0.15605c","type":"tab","label":"Antminer","disabled":false,"info":""},{"id":"882f2f60.3761d","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":380,"y":80,"wires":[["e436eb9e.f86e38","3c121af0.958596"]]},{"id":"414767fe.e7dae8","type":"debug","z":"414113e0.15605c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":670,"y":60,"wires":[]},{"id":"4be3959b.92353c","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"{\"command\":\"fans\"}","payloadType":"str","x":160,"y":260,"wires":[["882f2f60.3761d"]]},{"id":"fe35853f.46b298","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":380,"y":440,"wires":[["8bab781c.7a8c98","46e481bf.07a0b","b5168f7.4b0607","3ef17c13.b6c0a4","47e3115d.50211","c1f00c56.ccd3"]]},{"id":"22fc3eea.d1d1f2","type":"debug","z":"414113e0.15605c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1330,"y":240,"wires":[]},{"id":"37c9afd6.c92b2","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"6","topic":"","payload":"{\"command\":\"temps\"}","payloadType":"str","x":170,"y":520,"wires":[["fe35853f.46b298"]]},{"id":"c1c44974.05a758","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":320,"y":980,"wires":[["b6699a76.98d828","fd9d8b10.f399e8","2ec7faef.1a59d6","392cec37.72a194","6f616cc3.6563e4","27e83b95.f9ce54"]]},{"id":"740d5f0a.6c3a5","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"{\"command\":\"devdetails\"}","payloadType":"str","x":110,"y":980,"wires":[["c1c44974.05a758"]]},{"id":"fe01d0b7.14137","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":380,"y":1460,"wires":[[]]},{"id":"dc2c079e.a1b4a8","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"devs\"}","payloadType":"str","x":170,"y":1460,"wires":[["fe01d0b7.14137"]]},{"id":"151df511.31568b","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":1040,"y":1120,"wires":[["58c5122e.d796cc","332c43d8.8b4fac"]]},{"id":"48a0ec8f.401154","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"3","topic":"","payload":"{\"command\":\"summary\"}","payloadType":"str","x":820,"y":1120,"wires":[["151df511.31568b"]]},{"id":"de1ec4a1.9200a8","type":"cgminer","z":"414113e0.15605c","name":"CGMiner","ip":"192.168.15.36","port":"4028","timeout":"5000","x":380,"y":1540,"wires":[["6ffcb197.e2c5d"]]},{"id":"d88604d2.84d7f8","type":"debug","z":"414113e0.15605c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1270,"y":760,"wires":[]},{"id":"bd912176.5633d","type":"inject","z":"414113e0.15605c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"{\"command\":\"tunerstatus\"}","payloadType":"str","x":130,"y":1640,"wires":[["de1ec4a1.9200a8"]]},{"id":"bf317211.706c7","type":"mqtt out","z":"414113e0.15605c","name":"FAN0 RPM","topic":"/antminer/fan0/rpm","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":930,"y":140,"wires":[]},{"id":"e436eb9e.f86e38","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.FANS[0].RPM","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":160,"wires":[["bf317211.706c7"]]},{"id":"3c121af0.958596","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.FANS[1].RPM","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":200,"wires":[["daba4e1a.f8dc1","414767fe.e7dae8"]]},{"id":"daba4e1a.f8dc1","type":"mqtt out","z":"414113e0.15605c","name":"FAN1 RPM","topic":"/antminer/fan1/rpm","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":930,"y":200,"wires":[]},{"id":"8bab781c.7a8c98","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[0].Chip","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":440,"wires":[["2809ae83.17b7b2"]]},{"id":"2809ae83.17b7b2","type":"mqtt out","z":"414113e0.15605c","name":"Board 0 Temp Chip","topic":"/antminer/board0/temp/chip","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":910,"y":440,"wires":[]},{"id":"46e481bf.07a0b","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[0].Board","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":480,"wires":[["717976b8.60c178"]]},{"id":"717976b8.60c178","type":"mqtt out","z":"414113e0.15605c","name":"Board 0 Temp Board","topic":"/antminer/board0/temp/board","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":920,"y":500,"wires":[]},{"id":"b5168f7.4b0607","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[1].Chip","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":580,"wires":[["dc777168.5a169"]]},{"id":"dc777168.5a169","type":"mqtt out","z":"414113e0.15605c","name":"Board 1 Temp Chip","topic":"/antminer/board1/temp/chip","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":910,"y":580,"wires":[]},{"id":"3ef17c13.b6c0a4","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[1].Board","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":620,"wires":[["fbedc032.db8a4"]]},{"id":"fbedc032.db8a4","type":"mqtt out","z":"414113e0.15605c","name":"Board 1 Temp Board","topic":"/antminer/board1/temp/board","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":920,"y":640,"wires":[]},{"id":"47e3115d.50211","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[2].Chip","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":700,"wires":[["ad5409f2.3dd778"]]},{"id":"ad5409f2.3dd778","type":"mqtt out","z":"414113e0.15605c","name":"Board 2 Temp Chip","topic":"/antminer/board2/temp/chip","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":910,"y":700,"wires":[]},{"id":"c1f00c56.ccd3","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TEMPS[2].Board","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":740,"wires":[["cfbe7746.64ca88"]]},{"id":"cfbe7746.64ca88","type":"mqtt out","z":"414113e0.15605c","name":"Board 2 Temp Board","topic":"/antminer/board2/temp/board","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":920,"y":760,"wires":[]},{"id":"6ffcb197.e2c5d","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TUNERSTATUS[0].ApproximateMinerPowerConsumption","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1620,"wires":[["bed9e0b2.44979"]]},{"id":"bed9e0b2.44979","type":"mqtt out","z":"414113e0.15605c","name":"Power TOTAL","topic":"/antminer/power/total","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":880,"y":1620,"wires":[]},{"id":"58c5122e.d796cc","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.SUMMARY[0][\"MHS 5s\"]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":960,"wires":[["3427c311.cba45c"]]},{"id":"3427c311.cba45c","type":"function","z":"414113e0.15605c","name":"","func":"var th=msg.payload / 1000000;\n\nmsg.payload = th\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":880,"wires":[["5f7feb49.4498d4"]]},{"id":"5f7feb49.4498d4","type":"mqtt out","z":"414113e0.15605c","name":"Total HASHRATE","topic":"/antminer/hashrate/total","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":990,"y":880,"wires":[]},{"id":"b6699a76.98d828","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[0].Voltage","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1080,"wires":[["438a934f.cc5e2c"]]},{"id":"438a934f.cc5e2c","type":"mqtt out","z":"414113e0.15605c","name":"Board 0 Voltage","topic":"/antminer/board0/voltage","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":560,"y":1080,"wires":[]},{"id":"fd9d8b10.f399e8","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[0].Frequency","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1120,"wires":[["6fb54fad.b45a7"]]},{"id":"6fb54fad.b45a7","type":"function","z":"414113e0.15605c","name":"","func":"var th=msg.payload / 1000000;\n\nmsg.payload = th\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":1120,"wires":[["5c56a628.996f48"]]},{"id":"5c56a628.996f48","type":"mqtt out","z":"414113e0.15605c","name":"Board 0 Freq","topic":"/antminer/board0/freq","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":550,"y":1120,"wires":[]},{"id":"2ec7faef.1a59d6","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[1].Voltage","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1160,"wires":[["cbee0a3.882fdf8"]]},{"id":"cbee0a3.882fdf8","type":"mqtt out","z":"414113e0.15605c","name":"Board 1 Voltage","topic":"/antminer/board1/voltage","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":560,"y":1160,"wires":[]},{"id":"392cec37.72a194","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[1].Frequency","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1200,"wires":[["a0b74f2a.a9fba"]]},{"id":"a0b74f2a.a9fba","type":"function","z":"414113e0.15605c","name":"","func":"var th=msg.payload / 1000000;\n\nmsg.payload = th\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":1200,"wires":[["aebc466e.a096d8"]]},{"id":"aebc466e.a096d8","type":"mqtt out","z":"414113e0.15605c","name":"Board 1 Freq","topic":"/antminer/board1/freq","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":550,"y":1200,"wires":[]},{"id":"6f616cc3.6563e4","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[2].Voltage","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1240,"wires":[["8219fa88.0747b8"]]},{"id":"8219fa88.0747b8","type":"mqtt out","z":"414113e0.15605c","name":"Board 2 Voltage","topic":"/antminer/board2/voltage","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":560,"y":1240,"wires":[]},{"id":"27e83b95.f9ce54","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DEVDETAILS[2].Frequency","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1280,"wires":[["5779c7e5.b92e38"]]},{"id":"5779c7e5.b92e38","type":"function","z":"414113e0.15605c","name":"","func":"var th=msg.payload / 1000000;\n\nmsg.payload = th\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":1280,"wires":[["1ce9b8d9.d41027"]]},{"id":"1ce9b8d9.d41027","type":"mqtt out","z":"414113e0.15605c","name":"Board 2 Freq","topic":"/antminer/board2/freq","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":550,"y":1280,"wires":[]},{"id":"332c43d8.8b4fac","type":"change","z":"414113e0.15605c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.SUMMARY[0][\"Pool Rejected%\"]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":1000,"wires":[["8c3a8fee.7c09a"]]},{"id":"8c3a8fee.7c09a","type":"mqtt out","z":"414113e0.15605c","name":"Rejection Rate","topic":"/antminer/rejection_rate","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b560fba20241232d","x":1000,"y":1000,"wires":[]},{"id":"b560fba20241232d","type":"mqtt-broker","name":"","broker":"192.168.254.183","port":"1883","clientid":"","usetls":false,"protocolVersion":"3","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]