adamoutler / HassOSArgonOneAddon

A Home Assistant Addon for Argon One Fan Control.
247 stars 32 forks source link

`Create a Fan Speed entity in Home Assistant` triggers safe mode #63

Open dimkin-eu opened 1 year ago

dimkin-eu commented 1 year ago

As https://github.com/adamoutler/HassOSArgonOneAddon/issues/61 is kind of closed I will create a new one.

Newly installed version 30a works well

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
curl: (7) Couldn't connect to server
[21:33:54] ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Detecting Layout of i2c, we expect to see "1a" here.
checking i2c port 1 at /dev/i2c-1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
found at /dev/i2c-1
I2C Port 1
Settings initialized. Argon One Detected. Beginning monitor..
Current Temperature 49 °C
2023-09-12_21:33:57: 49C - Level 1 - Fan 0% (OFF)

until one tries to enable the setting Create a Fan Speed entity in Home Assistant and fan goes wooooooo :(

/run.sh: /run.sh: socket: Permission denied
/run.sh: line 79: /dev/tcp/hassio/80: Permission denied
socket: Permission denied
/run.sh: line 79: /dev/tcp/hassio/80: Permission denied
Failed 79: exec 3<> /dev/tcp/hassio/80
Failed 79: exec 3<> /dev/tcp/hassio/80
Safe Mode Activated!
Safe Mode Activated!
/run.sh: line 80: 3: Bad file descriptor
/run.sh: line 80: 3: Bad file descriptor
Failed 80: echo -ne "POST /homeassistant/api/states/sensor.argon_one_addon_fan_speed HTTP/1.1\r\n" 1>&3
Failed 80: echo -ne "POST /homeassistant/api/states/sensor.argon_one_addon_fan_speed HTTP/1.1\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 81: 3: Bad file descriptor
/run.sh: line 81: 3: Bad file descriptor
Safe Mode Activated!
Failed 81: echo -ne "Connection: close\r\n" 1>&3
Failed 81: echo -ne "Connection: close\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 82: 3: Bad file descriptor
Failed 82: echo -ne "Authorization: Bearer ${SUPERVISOR_TOKEN}\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 82: 3: Bad file descriptor
Failed 82: echo -ne "Authorization: Bearer ${SUPERVISOR_TOKEN}\r\n" 1>&3
Safe Mode Activated!
Safe Mode Activated!
/run.sh: line 83: 3: Bad file descriptor
Failed 83: echo -ne "Content-Length: $(echo -ne "${reqBody}" | wc -c)\r\n" 1>&3
/run.sh: line 83: 3: Bad file descriptor
Failed 83: echo -ne "Content-Length: $(echo -ne "${reqBody}" | wc -c)\r\n" 1>&3
/run.sh: line 84: 3: Bad file descriptor
Safe Mode Activated!
Failed 84: echo -ne "\r\n" 1>&3
Safe Mode Activated!
Safe Mode Activated!
/run.sh: line 85: 3: Bad file descriptor
/run.sh: line 84: 3: Bad file descriptor
Failed 84: echo -ne "\r\n" 1>&3
Failed 85: echo -ne "${reqBody}" 1>&3
Safe Mode Activated!
/run.sh: line 55: 3: Bad file descriptor
Failed 86: timeout=5
Safe Mode Activated!
/run.sh: line 85: 3: Bad file descriptor
Failed 85: echo -ne "${reqBody}" 1>&3
Safe Mode Activated!
Safe Mode Activated!
/run.sh: line 55: 3: Bad file descriptor
Failed 86: timeout=5
Safe Mode Activated!

reverting the setting brings back silence

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
curl: (7) Couldn't connect to server
[21:41:52] ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Detecting Layout of i2c, we expect to see "1a" here.
checking i2c port 1 at /dev/i2c-1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
found at /dev/i2c-1
I2C Port 1
Settings initialized. Argon One Detected. Beginning monitor..
Current Temperature 45 °C
2023-09-12_21:41:53: 45C - Level 1 - Fan 0% (OFF)
...
Current Temperature 49 °C
Current Temperature 51 °C
2023-09-12_22:22:25: 51C - Level 2 - Fan 1% (Quiet Low)
Current Temperature 49 °C
2023-09-12_22:22:55: 49C - Level 1 - Fan 0% (OFF)
Current Temperature 50 °C
Current Temperature 49 °C
vit-um commented 1 year ago

Same problem

adamoutler commented 1 year ago

What OS is that? It says there's no stdin. Usually it will just be created.

adamoutler commented 1 year ago

Also which addon?

vit-um commented 1 year ago

Addon: ArgonOne Active Linear Cooling
OS: Debian GNU/Linux 12 (bookworm) Log:

/run.sh: line 65: 3: Bad file descriptor
/run.sh: line 53: 3: Bad file descriptor
Failed 66: timeout=5
Failed 65: echo -ne "${reqBody}" 1>&3
Safe Mode Activated!
Safe Mode Activated!
/run.sh: line 53: 3: Bad file descriptor
Failed 66: timeout=5
Safe Mode Activated!
Current Temperature = 47 °C
2023-09-17_07:37:42: 47C - Fan 0% | hex:(0x00)
/run.sh: socket: Permission denied
/run.sh: line 59: /dev/tcp/hassio/80: Permission denied
Failed 59: exec 3<> /dev/tcp/hassio/80
Safe Mode Activated!
/run.sh: line 60: 3: Bad file descriptor
Failed 60: echo -ne "POST /homeassistant/api/states/sensor.argon_one_addon_fan_speed HTTP/1.1\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 61: 3: Bad file descriptor
Failed 61: echo -ne "Connection: close\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 62: 3: Bad file descriptor
Failed 62: echo -ne "Authorization: Bearer ${SUPERVISOR_TOKEN}\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 63: 3: Bad file descriptor
Failed 63: echo -ne "Content-Length: $(echo -ne "${reqBody}" | wc -c)\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 64: 3: Bad file descriptor
Failed 64: echo -ne "\r\n" 1>&3
Safe Mode Activated!
/run.sh: line 65: 3: Bad file descriptor
Failed 65: echo -ne "${reqBody}" 1>&3
Safe Mode Activated!
/run.sh: line 53: 3: Bad file descriptor
Failed 66: timeout=5
Safe Mode Activated!

Addon: ArgonOne Active Linear Cooling
OS: Home Assistant OS 10.5 Log (OK, no errors):

-----------------------------------------------------------
 Add-on: ArgonOne Active Linear Cooling
 Actively keeping your Argon One cool.
-----------------------------------------------------------
 Add-on version: 30a
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.9.2
 Home Assistant Supervisor: 2023.09.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Detecting Layout of i2c, we expect to see "1a" here.
checking i2c port 0 at /dev/i2c-0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
not found on /dev/i2c-0
checking i2c port 1 at /dev/i2c-1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
found at /dev/i2c-1
I2C Port 1
Settings initialized. Argon One Detected. Beginning monitor..
Current Temperature = 44 °C
2023-09-17_07:40:08: 44C - Fan 0% | hex:(0x00)
Current Temperature = 41 °C
2023-09-17_07:40:38: 41C - Fan 0% | hex:(0x00)
Current Temperature = 40 °C
2023-09-17_07:41:08: 40C - Fan 0% | hex:(0x00)
Current Temperature = 43 °C
2023-09-17_07:41:38: 43C - Fan 0% | hex:(0x00)
Current Temperature = 42 °C
2023-09-17_07:42:08: 42C - Fan 0% | hex:(0x00)

Perhaps you can tell me how to create stdin manually for the first case?

dimkin-eu commented 1 year ago
Core Version
core-2023.9.2
Supervisor Version
supervisor-2023.09.2
Host
Operating System
Debian GNU/Linux 12 (bookworm)
Docker version
24.0.6
ArgonOne Active Cooling
Current version: 30a