Argon One RPi 4 Case Script

I’ve implemented the blueprint with automations for different speeds at different temperature levels. I believe it is working like it should. I don’t have a fan speed indicator other than hearing the pitch change. Nice job!

I’m working on an addon for this. I figured I’d post my initial stuff here and make a thread over the weekend after I review again. This is a self-contained addon which can be installed and configured through the Supervisor panel.

Install
Supervisor-> Add-on Store -> … button (in top left)-> Repositories. Add this repository:

Configure
Choose C or F. (F if you’re F’in awesome, or C if you’re just Cool)
Set LowRange to be the minimum temp to turn on at 33%. Below this is off.
Set MediumRange to be the divider between 33 and 66%.
Set HighRange to be the maximum before 100% fan.

Set Protection Mode to off. This is required because it directly accesses the /dev/ folder to modify fan speed.

Enable I2C https://www.home-assistant.io/hassio/enable_i2c/ and then you’re done.

image


1 Like

Thank you for this, but as I can see now my Pi for Home Assistant don‘t need it because the temperature is always at 32-34 degrees Celsius. So the fan hasn‘t to be turned on.

I am more interested in bringing the Power button to life. Is this also possible with this?

I will look into the power button. But those initial values are for Farenheit, not Celsius. You should adjust them as such. You don’t want 70C at any time but 70F is awesome.

Thank you!

And yes, I know the difference between F and C. :slight_smile:

1 Like

Find Argon One Active Cooling here Argon One Active Cooling Addon

I’m going to look into power button settings now, @carsten_h. I never had luck with trying to get the power to be always-on in the past, but we shall see.

I added a bit of support for double-tap power button to my other thread for Argon One Active Cooling Addon. No support for single-press. But you can restart HA with a double-tap if you like.

Thank you very much. I didn’t thought it would be so easy. I will put shutdown on double tap, because that is what I need.
The best would it when this shutdown also would switch off the power completely, so that the red LED in front will be switched off. You can see that Home Assistant is shut down when the Ethernet port LED are switched off, but it’s easier when the power is completely off.

For shutdown, you can hold the button for 5 seconds

Is this a normal shutdown so everything will stop normally or is it a hard shutdown?

1 Like

That’s a hard shutdown. I use it a lot. EXT4 is a journaling filesystem which should handle a hard shutdown just fine. You might experience loss of recent transactions which haven’t made it to the hard disk though. If you’re using an SDcard, I recommend USB or hard disk because SDs are very bad and there’s a lot of fakes which will corrupt themselves.

1 Like

I am using an USB SSD, there is no SD-card in this Pi.

1 Like

@adamoutler single-press is hard. I’ve tried to add it to my integration, but I had no luck. Try using gpiozero (https://gpiozero.readthedocs.io/en/stable/), maybe it will be better and will allow the single-press event.

1 Like

This case uses the built-in raspberry pi i2c bus. You have to enable the i2c bus before using it. I made some tools if you’d like to try them. I’ll create a thread soon.

Nice! I had automations set up to handle this. Now I’ve disabled the automations and I get the log feedback from your app. I like it. Well done!

1 Like

I have this case:

https://www.argon40.com/argon-one-raspberry-pi-4-case.html

I just want to set it so when there’s a power outage, HA starts up automatically. Is there a way to do this via HA?

If you open the bottom, there should be on the left front side a jumper. When you put it to the right position (Always ON, Pin 2-3), it should start automatically when power is back.

1 Like

Nice, this worked great for me! Thank you!

Does anyone knows if there is a sensor for this in HA to check if the fan is running and display in your Lovelace UI?

1 Like

That can be done. Relatively, it would be an expensive operation to create the sensor because it would require an additional process to be created and an external binary to be run each time. After initialization, this project runs entirely in bash and only calls an external binary to adjust the fan speed when required.

I will look into it. It would be a floating sensor at the top of your Lovelace, not attached to a device. It would require, at a minimum, calling an external binary such as curl to perform the data transfer. I’d like to look at using NetCat though because it’s included in the base image. How often would you like it updated, btw?

Getting the temp, though, is here: New Addon: Raspbery Pi Temp Sensor!

Perfect! This worked. Thank you!