Detection of bitcoin miners

Does anyone know if Sense can detect/identify bitcoin miners? I’m running several Antminer S9 units and, so far at least, they’re just clumped together as “always on”. I’ve tried rebooting them one at a time to cycle the power in hopes Sense will notice them but no luck so far. Is there a way I can manually identify them to Sense? It’s fairly easy to see them on the graph. Their power output is pretty stable but does vary slightly based on fan speeds, so power usage goes up and own a little as the ambient temperature changes. They have static IPs and are pingable if Sense can do something like that to determine when they’re on.

Sense looks at fast (sub-second) transitions to detect on and off signatures. That means there are probably 2 good reasons Sense won’t find your rigs.

  1. You’re probably not powering up and down every few hours or even every day.
  2. Even if you were doing that, modern power supply on-off transitions are hard to detect since they don’t offer up the same kinds of telltale transition physics-based features that Sense is looking for: Things like phase angle, RC/RL/RLC constants, etc.

You might want to try using some Kasa smart-plugs if you really want to know… I did that for my daughter’s gaming computer a while back, just to see what the load looked like.

Thanks for the reply!

  1. Yes, the miners used switched power supplies that are pretty clean. But the miners do have a very distinctive power-up graph because they take around 4 minutes to fully power up as they go through diagnostics on each ASIC and slowly bring the fans up to speed. The graph would vary slightly depending on the exact model of miner hardware but should be easy to detect. I could submit screen shot of a typical start up if Sense has a place to send that sort of thing.

  2. I checked the Kasa smart-plugs on Amazon but it looks like they only work with 120v gear. Bitcoin miners generally run on 240v. I use a PDU with IEC C14 connectors for each Antminer. Does anyone make a Sense-compatible 240v smart plug with C14 connectors? Or I supposed I could put a single smart-plug between the PDU and the power drop if there’s a smart-plug with NEMA 14-50 connectors, though I’d want to make sure it could handle a 32A circuit.

Maybe an easier option - what exactly does a smart-plug communicate to Sense? Is the protocol published? Maybe I could set up a Raspberry Pi or something to ping Sense over WiFi and pretend to be a smart-plug + miner?

A few comments here:

  • First off, I’m just another user giving my thoughts. Sense might have other ideas.

  • Second, it would be interesting to post the power/energy usage associated with the power-on of your (I assume) rack. You can post it right here using the upload arrow. But I wouldn’t expect Sense to get much from it, yet. The data scientists there are busy working on other, more common, hard power signature puzzles. You can read on the blog about their work on EVs and mini-splits, two devices that don’t easily fit the current detection paradigm…

  • I don’t think anyone makes a 240V Sense compatible smart-plug except for TP-Link. But you have to look at their Euro models for 240V, which actually have all the same innards as the US models except for the plug mezzanine adapter card. The EU HS110 model goes up to about 3800 Watts. Probably still not enough for you, even if you could figure out how to readapt…

  • As for emulating a TP-Link smart plug, the info to do it is floating around. First you would probably have to emulate one sufficiently to authenticate with the TP-Kasa App.

https://www.softscheck.com/en/reverse-engineering-tp-link-hs110/

  • Then you would need to develop responder code to regularly query the the power usage of your Antminers and respond quickly when the Sense monitor asks for status…
1 Like

Sounds to me like you have a bunch of miners and it’s the bunch that you want to monitor vs (necessarily) a single one. There’s a cheat solution here that will work like a charm and give you much better resolution and reliability than using smart plugs: Get another Sense and dedicate it to your 32A PDU circuit!

If you don’t have solar you could also put the spare Sense Solar CT’s on the Bitcoin PDU. Or, indeed, use a second Sense (with solar) to monitor 2 miner stacks.

Added bonus of using the second Sense Main CTs on your miner PDU: “Hey, who plugged a toaster into the miners?” (i.e. the main CTs get detection but the solar ones don’t).

Double added bonus: the cool graphs you can then produce for your breakeven projection when the miners will pay for the additional Sense!

Triple threat: factoring in the miner (Main CTs) electricity powered by your solar array (Solar CTs)

1 Like

Neat idea! I’ve been playing with this recently so could maybe give you some guiding info. The monitor sends out a UDP broadcast on port 9999 every 2 seconds or so to which all the TP-Links devices respond with their system info and energy usage data.

The payloads are JSON and encrypted (kinda more like obfuscated) using the scheme described in the blogpost @kevin1 linked to. I found and tweaked some code from Github and was able to both query the plugs for their info and also see Sense’s request for info. Here’s the example I started from: https://github.com/iqmeta/tplink-smartplug/blob/master/com.iqmeta.tplink-smartplug/Utils.cs#L59

I haven’t tried responding to requests coming from Sense since I currently have a support ticket in to disable the TP-Link integration (mine is messed up and I’m testing a theory). Could be fun to experiment with though once my support call and tests are finished.

I can share some code and sample requests and responses with you if you wanted to try going this route, but I’m not sure where you would get the info for the energy used for the miners though to include in the response. Also, you might end up on the data science team’s naughty list :laughing:

1 Like

@steevithak, if you plan on adding more Antminers, or such, you could consider buying Sense’s big brother for commercial buildings and data centers :wink: But I’m guessing the cost would be a couple of order of magnitude greater…

Looks to be a minimum layout of the equivalent of 4 Senses per year, ongoing.

Do orders of magnitude include time? :laughing:

@ramon,
Love your intrepid thoughts. It would be cool to have a PC/Mac or Arduino based responder/proxy that looks like an HS110 to the Sense, and configures like an HS110 to the Kasa app, but pulls data from other sources like:

  • Tesla chargers / Tesla API - the API does give instantaneous charging info
  • HVAC systems, especially 240V systems that have some means of reporting via API (both my Ecobees and NuHeat thermostats have similar APIs)
  • Some big computer-related power supplies and UPCs have power delivery reporting

Wishing you the best of luck with your endeavor - keep us informed. We may be willing to test.

Haha, personally I am just interested in reading this data to create custom views. I am working on combining Sense, Kasa, StreamLabs water, and Ecowitt sensors into a single dashboard.

I am willing to help anybody though that does want to try writing the data in the other direction by sharing what I’ve learned so far.

1 Like