Table of Contents
Introduction
As mentioned on previous post Elphapex DG Home 1 has three different power modes:
- Normal
- Powersave
- Overclock
I did some experimenting on changing the modes based on electricity prices. Throughout the summer the ASIC miner has been outside on really small shed. Typically during summer in Finland the electricity SPOT price – which various based on supply and demand – is really low. This is why I just kept the box running 24×7 in full overclock mode.
Problem
Now that we are on Autumn and weather is still relatively warm so I don’t need extra warming inside – which the miner provides during winter months – so I’ve kept the box outside. That being said, within last few weeks the SPOT price has varied a lot going from minus prices to over 30c/kWh. Switching power mode manually through Windows application is tedious and ineffective.
Solution
I didn’t have motivation to start reverse-engineering on how the Elphapex application changes the modes which I could have done by listening the TCP/IP packets between the Windows VM running the app and the box itself with tcpdump, for example. Instead some courageous soul named “Anonymous” provided what is needed on previous posts comment section.

Now I have what I need to both read the state and change it. I created two python scripts available on my github repo:
- miner_modes.py – accepts flags –powersavemode –overclockmode –normalmode –getmode
- publish_miner_mode.py – Puglishes current mode on MQTT broker as miner/workmode
Above is pretty self explaining. I can set and read the mode with first script and second publishes the mode on MQTT Broker. Then on my Home Assistant instance I have a sensor reading the status from MQTT Broker which I can have on my HA dashboard:

I have automated the switch between modes on HA Automations based on electricity price:

When the price goes above 30c/kWh automation shuts down the box and then turns it back on when price drops. Obviously I needed to do additional changes also on sensors.yaml and mqtt.yaml but details on these are beyond the scope of this blog post.
Conclusion
This approach was my initial idea even before I acquired any mining box and I knew it was possible to do on some ASIC miners which have documented API calls unlike Elphapex has. But with some reverse engineering and help from the community all this was in the end doable with Elphapex DG Home 1 as well.

If you check above you can see the electricity consumption for the miner various per hour. The highest it is when electricity is below 10c/kWh while running on overclock mode, lowest when price is above 20c/kWh when running on powersave mode and in between when running on normal mode. Today we haven’t had price going over 30c/kWh and that is not very often when it happens, but would it happen the miner gets the shut down.
I’m extremely satisfied on the implementation and the fact that I don’t need to raise a finger to change the modes not mention to run Windows VM on my MacBook just to change the modes.
![]() | ![]() | ![]() |