Error on installing a script for case fan control and power button from command line

I have the same config.
image

the problem is RPI.GPIO isn’ that good at reading updates of GPIO.
I’ll try to write something, but not sure if I’ll be able to change anything (I’m also planning to use PRI.GPIO). I think gpiozero could be better, but can’t tell without trying :slight_smile:

I was able to detect double-tap.
code in my repo has that change. Please test if possible. If installing using HACS you must pick the master branch

automation:
  - alias: "Argon40 button double-tap"
    trigger:
      platform: event
      event_type: argon40_event
      event_data:
        action: double-tap
    action:
      - service: persistent_notification.create
        data:
          title: "Argon 40"
          message: "Button was double-tapped"

or

Thanks! Tested it and it works indeed :slight_smile:

How’s the progress so far? My Argon One case coming this week…

The worst part is enabling I2C, the rest is easy.
If you have the new case then you will be able to enable the always-on feature (using set-mode service)

The next step is the config flow. I’m working on this right now.

Thank you so much for all your hard work.

Got I2C enabled! I can hear the fan running now, haven’t done any automation for it yet.

It’s a mix between all these:


this:

and finally this:

So this is what I did:
Format a USB stick with FAT32/EXT4/NTFS and name it CONFIG (in all capitals)

In the root of the USB drive add a folder called modules

Inside that folder add a text file called rpi-i2c.conf with the following contents:

i2c-bcm2708
i2c-dev

If you are using a Windows machine make sure it does not save as rpi-i2c.conf.txt

In the root of the USB drive add a file called config.txt with the following contents:

dtparam=i2c1=on
dtparam=i2c_arm=on

If you are using a Windows machine make sure it does not save as config.txt.txt

Insert the USB drive into your Raspberry Pi.
Now go to your Home Assistant web interface, in the sidebar click Supervisor > System.

Now click Import from USB .

Reboot Host, don’t take out the USB, leave it plugged in the whole process. Note I did a Host Reboot and not reboot HA.

Thank you so much @Misiu working great with Node-Red:

2 Likes

Double-tap also confirm working, the fan is actually quite noisy no matter what speed you set. Very difficult to notice the difference sound between fan speeds, but you could feel the difference in the amount of air that comes out of the case. Since it’s pretty noisy, I’ve set the fan to switch off below 45 deg Celcius.

The double-tap sure makes things a little bit more convenient:
Screenshot 2020-08-10 at 1.55.41 PM

1 Like

Hi, I also have difficulties enabling i2c for my argon one case.
I’m using a raspberry pi 3 with HassOS 4.12
Creating a usb stick with the necessary files and structure does not seem to do anything at all. Also trying to add files with CLI does not seem to work (CLI idea from this source: https://github.com/Misiu/argon40/issues/1).

Is there another option to enable i2c?

Edit:
For some reason it is working now. However, the fan starts spinning when home assistant is loaded and does not turn off. I have the temperature setpoint for the fan at 50 degrees Celsius but the CPU temperature shows around 40 degrees Celsius. The fan should not turn on.

Anyhow, for now if have controlled the fan manually by setting the speed to 0.

I cant get this thing to work…

  • I have a new Rasp PI4 (64 bit) + the new Argon case.
  • I have followed the instruction here: https://github.com/Misiu/argon40
  • I cannot find it when trying to add this integration (configuration -> integration -> + sign) .
  • I came across this thread and tried to enable i2c following this: https://www.home-assistant.io/hassio/enable_i2c/ which was hard since my mac doesn’t recognize the sdcard and I had to use an old win pc.
  • Rebooted twice and still nothing…

Same here , I tried all methods on this thread , I started looking at hidden chars in my filed ( made sure \r\n for new line just \n ) , even changed Pi4 4GB board itsef ! still the same
I see the official page is pointing at editing the SD card in a new way to enable i2c ( not using the USB memeory stick method that olso didn’t work for me) … still the same result

I think I am going to OpenHub …

I have this thought , I just switch off the fan by keep pressing the button but I can’t switch on the fan with same method , so I had this thought , what GPIO or how many GPIO does this it use , please not am not that expert and I just installed the Argo40 from HASC without the IC2 usb method installation.

I have Pi 4 4GB, ArgonOne m.2 Case with Kingston A400 240GB m.2 Sata SSD
What I did:

a) editing config.txt in root of SSD:
dtparam=i2c_arm=on

b) creating Folder CONFIG in root
c) creating folder modules in Folder CONFIG
d) creating file rpi-i2c.conf in Folder modules
Content of file, 2 lines:
i2c-dev
i2c-bcm2835

Why i2c-bcm2835 ?
I installed the Argon software on a pi4 in Argon One Case using the bash script.
I2C was disabled before i did this.
After running the script i noticed that 2 modules where new, when using the command
lsmod in terminal:

Module Size Used by
i2c_dev 20480 2
i2c_bcm2835 16384 1
etc.

So i decided to write both modules in CONFIG\modules\rpi-i2c.conf
(with dash instead of underline!)

After reboot:
e) Added the argon40 Folder to my (existing) custom_components - folder.
f) Added
argon40:
to configuration.yaml

After two reboots it was working.
I could set fan speed with automations (like shown in the example)

Maybe that helps.

1 Like

Previously I tried with Home Assistant 64bit and it does not work. I’m running on 32 bit with Rasp Pi4

I’ll be preparing a new dev environment soon, so I can check both 32 and 64-bit versions.
GPIO’s did work on 64-bit version?

On 64 bit it didn’t work for me.

I am using here an Argon One case with a Pi 4 4GB and HassOS 5.5 64bit from a SSD attached to USB. The GPIOs are working without a problem. The fan is switched on at too high temperatures and the system shuts down when the button is pressed two times (slowly after another, not fast!).

Can you share your node red config for this… I’m new to it all and would like to see how you have done it.

Thanks

Steve

For double-tap:

[
    {
        "id": "4940cb52.380b64",
        "type": "server-events",
        "z": "7068ac6f.469094",
        "name": "Argon40",
        "server": "e29894fd.1104d8",
        "event_type": "argon40_event",
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "x": 160,
        "y": 900,
        "wires": [
            [
                "15deb283.8f426d"
            ]
        ]
    },
    {
        "id": "15deb283.8f426d",
        "type": "switch",
        "z": "7068ac6f.469094",
        "name": "Double Tap",
        "property": "payload.event.action",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "double-tap",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 350,
        "y": 960,
        "wires": [
            [
                "3b325481.956c1c"
            ]
        ]
    },
    {
        "id": "3b325481.956c1c",
        "type": "api-call-service",
        "z": "7068ac6f.469094",
        "name": "Host Reboot",
        "server": "e29894fd.1104d8",
        "version": 1,
        "debugenabled": true,
        "service_domain": "hassio",
        "service": "host_reboot",
        "entityId": "",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "payload",
        "output_location_type": "msg",
        "mustacheAltTags": false,
        "x": 570,
        "y": 1020,
        "wires": [
            []
        ]
    },
    {
        "id": "e29894fd.1104d8",
        "type": "server",
        "name": "Home Assistant",
        "addon": true
    }
]

The above node-red flow works very well. I have been using for 6 months now. I have tried to change the original flow that someone posted to include a sensor that reports from HA the current fan speed. Unfortunately my knowledge is limited. Can anyone help? I can repost the node-red flow export if required

Cheers

Hey guys, I made 2- addons to simplify things. No automations, no Node Red, just 1 addon that enables I2C, and another one that controls the fan.

Enable I2C
You can run this once and then delete it. It’s done.

Argon One Active Cooling Addon
Everything is set in the configuration for first operation, but you can modify the temp values if you want.
image

3 Likes