Skip to content

Commit

Permalink
Merge pull request #69 from dimabutenko/main
Browse files Browse the repository at this point in the history
Add version for Argon One V3
  • Loading branch information
adamoutler authored Mar 10, 2024
2 parents b893c79 + 6e9bca4 commit 138a37d
Show file tree
Hide file tree
Showing 12 changed files with 398 additions and 0 deletions.
10 changes: 10 additions & 0 deletions argonOneV3Linear/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

| Version | Change |
| ------- | -------------------------------------------------------- |
| **30** | Fix for missing fanspeed indicator in HA |
| **29** | Detection for Argon One Neo |
| **27** | Faster fanspeed update |
| **27** | Faster fanspeed update |
| **26** | Fix fan speed indicator |
| **25** | Thanks byod0! New linear fan control addon! forked v24.0 |
37 changes: 37 additions & 0 deletions argonOneV3Linear/DOCS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Configuration

![image](https://raw.githubusercontent.com/adamoutler/HassOSArgonOneAddon/main/gitResources/linearsettings.png)

## Celsius or Fahrenheit

Choose Celsius or Fahrenheit.

- **Celsius or Fahrenheit** - Configures Celsius or Fahrenheit.

## Temperature Ranges

![image](https://raw.githubusercontent.com/adamoutler/HassOSArgonOneAddon/main/gitResources/argonlinear.png)

Set your fan ranges appropriately.

- **Minimum Temperature** Minimum Temperature to turn on. Anything
lower will turn off.
- **Maximum Temperature** The maximum temperature before 100% fan.

## Enable I2C

In order to enable i2C, you must follow one of the methods below.

### The easy way

[Addon](https://community.home-assistant.io/t/add-on-hassos-i2c-configurator/264167)

### The official way

[Official Guide](https://www.home-assistant.io/hassio/enable_i2c/)

## Support

Need support? Click [here](https://community.home-assistant.io/t/argon-one-active-cooling-addon/262598/8).
Try to be detailed about your feedback.
If you can't be detailed, then please be as obnoxious as you can be.
14 changes: 14 additions & 0 deletions argonOneV3Linear/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:9.1.7
# hadolint ignore=DL3006
FROM $BUILD_FROM

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV LANG C.UTF-8
WORKDIR /data

RUN apk add i2c-tools=4.2-r0 --no-cache;

COPY run.sh /
RUN chmod a+x /run.sh

CMD [ "/run.sh" ]
43 changes: 43 additions & 0 deletions argonOneV3Linear/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Active Linear Cooling

![image](https://raw.githubusercontent.com/adamoutler/HassOSArgonOneAddon/main/gitResources/activecooling.jpg)

This is an addon for Argon One V3 in Home Assistant.
It's essentially a script that runs in a docker container.
It enables and automates the Argon One V3 Active Cooling System with your specifications.
It smoothly increases the fan speed based on the temperature.

This Addon keeps your temperature within specified ranges.

![image](https://raw.githubusercontent.com/adamoutler/HassOSArgonOneAddon/main/gitResources/argonlinear.png)

- The addon manages fan speed from 0 to 100%
- Configure "Minimum temperature" to set the 1% speed.
- Configure "Maximum temperature" to set the 100% speed.
- The fan will be off until the minimum temperature is reached.

Mathematic formula applied:

```y = a*x + b
y is fan speed
x is instant temperature
a is gradient
b is origin when y=0
value_a=$((100/(tmaxi-tmini)))
value_b=$((-value_a*tmini))
fanPercent=$((value_a*value+value_b))
```

## Support

First, look in the Logs tab of the Addon's page in HA to see if i2c was set up properly,
or for any other errors.

Also, enable the "Log current temperature every 30 seconds" setting and look in the
logs to see what the speed is. The fan is noisy and you might not be able to hear
different speeds, but logging will verify any changes.

Need support? Click [here](https://community.home-assistant.io/t/argon-one-active-cooling-addon/262598/8).
Try to be detailed about your feedback.
If you can't be detailed, then please be as obnoxious as you can be.
61 changes: 61 additions & 0 deletions argonOneV3Linear/apparmor.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#include <tunables/global>

profile deskpipro flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>

capability,
file,

capability setgid,
capability setuid,

# S6-Overlay
/bin/** ix,
/usr/bin/** ix,
/usr/lib/bashio/** ix,
/etc/s6/** rix,
/run/s6/** rix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/init rix,
/var/run/** mrwkl,
/var/run/ mrwkl,
/dev/i2c-0 mrwkl,
/dev/i2c-1 mrwkl,
/dev/i2c-2 mrwkl,
/dev/i2c-3 mrwkl,
/dev/i2c-4 mrwkl,
/dev/i2c-5 mrwkl,
/dev/i2c-6 mrwkl,
/dev/i2c-7 mrwkl,
/dev/i2c-9 mrwkl,
/dev/i2c-10 mrwkl,
/dev/i2c-11 mrwkl,
/dev/i2c-12 mrwkl,
/dev/i2c-13 mrwkl,
/dev/i2c-14 mrwkl,
/dev/i2c-15 mrwkl,
/dev/i2c-16 mrwkl,
/dev/i2c-17 mrwkl,
/dev/i2c-18 mrwkl,
/dev/i2c-19 mrwkl,
/dev/i2c-20 mrwkl,
/dev/i2c-21 mrwkl,
/dev/i2c-22 mrwkl,
/dev/i2c-23 mrwkl,
/dev/i2c-24 mrwkl,
/dev/i2c-25 mrwkl,
/dev/i2c-26 mrwkl,

# Data access
/data/** rw,


# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
ptrace (trace,read) peer=docker-default,

# docker daemon confinement requires explict allow rule for signal
signal (receive) set=(kill,term) peer=/usr/bin/docker,

}
5 changes: 5 additions & 0 deletions argonOneV3Linear/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build_from:
aarch64: ghcr.io/hassio-addons/base/aarch64:9.1.7
armhf: ghcr.io/hassio-addons/base/armhf:9.1.7
armv7: ghcr.io/hassio-addons/base/armv7:9.1.7

60 changes: 60 additions & 0 deletions argonOneV3Linear/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: ArgonOne V3 Active Linear Cooling
version: 30a
slug: argon_one_v3_temp_linear
description: Actively keeping your ArgonOne V3 cool.
arch:
- armhf
- armv7
- aarch64
auth_api: true
homeassistant_api: true
hassio_role: homeassistant
hassio_api: true
devices:
- /dev/i2c-0
- /dev/i2c-1
- /dev/i2c-2
- /dev/i2c-3
- /dev/i2c-4
- /dev/i2c-5
- /dev/i2c-6
- /dev/i2c-7
- /dev/i2c-8
- /dev/i2c-9
- /dev/i2c-10
- /dev/i2c-11
- /dev/i2c-12
- /dev/i2c-13
- /dev/i2c-14
- /dev/i2c-15
- /dev/i2c-16
- /dev/i2c-17
- /dev/i2c-18
- /dev/i2c-19
- /dev/i2c-20
- /dev/i2c-21
- /dev/i2c-22
- /dev/i2c-23
- /dev/i2c-24
- /dev/i2c-25
- /dev/i2c-26
url: https://community.home-assistant.io/t/argon-one-active-cooling-addon/262598/
map:
- config
- ssl
- addons
- backup
- share
- media
options:
Celsius or Fahrenheit: F
Minimum Temperature: 130
Maximum Temperature: 150
Create a Fan Speed entity in Home Assistant: false
Log current temperature every 30 seconds: true
schema:
Celsius or Fahrenheit: list(C|F)
Minimum Temperature: int(0,255)
Maximum Temperature: int(0,255)
Create a Fan Speed entity in Home Assistant: bool
Log current temperature every 30 seconds: bool
Binary file added argonOneV3Linear/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added argonOneV3Linear/icon.xcf
Binary file not shown.
Binary file added argonOneV3Linear/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added argonOneV3Linear/logo.xcf
Binary file not shown.
Loading

0 comments on commit 138a37d

Please sign in to comment.