Argon One RPi 4 Case Script

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!

Hi there, is there any way to check if the i2c works?
What i did, first i installed the blueprint, after that the add-on en then the procedure for installing the neccesary file for the i2c. But it wonā€™t work here, not a single movement in my fan, trying to work out what could possibly went wrong.

Found it, after finding an article of several Pi4B users with similar problems. On the original ā€œenable i2cā€ page they mention to write the rpi-i2c.conf file with one rule. But the Pi4B needs an extra rule, put in there.

i2c-bcm2708
i2c-dev

For those who want to trade-in there Pi3 to a Pi4, keep in mind that the 8Gb cannot use the GPIO (yet)
At the moment it is only capable to work on 64bit software and no GPIO, maybe in future applications they wil make it work again, for now 4Gb is the upper limit for this.

@adamoutler, thanks for this app, really happy with this.

Sander Ekeler

I wrote part of the i2c page on Home Assistant. Could you link to the article so that I can do some research? I have plenty of Pi4ā€™s and I never needed that.

1 Like

Sure, here is where i found it:
BTW, half way someone say it wont work when the file is written by usb and you need to use linux to create it. My personal expirience, i just connected the argon usb to my windows computer and it turned out fine.

Iā€™m using different ones and it seems to work great on several RPis. [Add-on] HassOS I2C Configurator

dtparam=i2c_vc=on
dtparam=i2c_arm=on

No need to add additional mods

That is very old info. It should be working fine with the addon I mentioned above.