Odroid n2+ fan control?

How can I control the fan like an entity and use the CPU temp and an entity? Basically using automations to control the fan. Just to make home assistant control the fan for the home assistant u know?

Don’t know, but HA Blue uses an Odroid N2+ without the fan attachment, and given that’s kind of the official hardware for HA, I doubt you need one if its just HA you’re running.

Normally ya but it’s a hot environment, so I mean better safe than sorry.

1 Like

Is there a way I can access the fan from the home assistant

And the temperature from the home assistant?

Use System Monitor integration to get the CPU temperature-

sensor:
  - platform: systemmonitor
    resources:
      - type: processor_temperature

For controlling the fan manually, as of now, no way.
You can for now use an external fan and use Zigbee/WiFi plug to control them based on the CPU temperature.

trigger:
  - platform: homeassistant
    event: start
  - platform: numeric_state
    entity_id: sensor.processor_temperature
    above: '37'
  - platform: numeric_state
    entity_id: sensor.processor_temperature
    below: '35'

condition: []

action:
- choose:
    - conditions:
      - condition: numeric_state
        entity_id: sensor.processor_temperature
        above: '37'
      sequence:
      - service: switch.turn_on
        target:
          entity_id: switch.cooling_fan
    - conditions:
      - condition: numeric_state
        entity_id: sensor.processor_temperature
        below: '35'
      sequence:
      - service: switch.turn_off
        target:
          entity_id: switch.cooling_fan
1 Like

Would this run in docker if I installed like a real operating system and ran it virtually? Jw

I run HA in docker in armbian on an Odroid N2+ (HA Blue) and system monitor gives the cpu temp just fine. It is pretty cool too, around 35 celsius. It sits inside a cabinet with room temp around 22-23. Even the eMMC flash drive has it’s own temperature sensor and runs around 36 C.

Ya but mine is in a locked cabinet with very little air flow and I already have the fan :man_shrugging:

Thank you for this automation! It helped me to understand the syntax of this logic operation. I have a similar automation that follows this pattern.
With this logic, I found that if I manually turn “off” switch.cooling_fan from the Lovelace card, the automation will not restart the threshold sequence and the switch remains “off” independent of the current sensor.processor_temperature value (which keeps rising based on CPU load). I think that this is because the trigger occurs only when the “above” threshold is crossed. The manual switch state change must cause a new trigger before the action is processed again. This is a little surprising because the conditional is “above” and not “transitions to above” or some such.
In my case the switch is an rpi4 gpio port.
I resolved it by adding a new trigger:

    - platform: state
      entity_id: switch.cooling_fan
      from: "on"
      to: "off"

Now if the temperature is above the threshold when the the switch is manually turned off, it immediately turns back on.

The opposite test case where the switch is manually turned “on” if already “off” may have a similar result.

In my case I want to turn the fan on and make sure that it stays on. I never turn it off.
(there is likely a better way to accomplish this “always on” goal. Improvements are welcome :))

ya that was exactly my issue. for some reason also, some devices that are connected via ethernet, such as an ecowitt gateway, do not register as updating sometimes, and i have no idea why. also some tuya devices. using conditional variables with a 60 second loop to trigger it conditionally is a good safeguard to ensure that small hickups dont mess things up. i was using it to try to turn on and off air conditioning and it would just stick in the on or off position sometimes for no reason. i suspect that it has something to do with the fact that all the ecowitt sensors come up as one device and none of them are the main state their all just attributes. another solution is to use a template or a sensor set in configuration to make another entity that is equivalent to the devices attribute and use that as a trigger for state change but occasionally i have issues with that as well for some reason. this is the only way its 100% reliable unfortunately.

also, you can use helpers as the device that acts as a condition so you can change it on the fly or make it change based on external conditions like the humidity or outside temperature or whatever, like if you just stick a temperature sensor outside you can make it change the number of the helper based on what the temperature is outside to raise it if its hotter outside or lower it if its cooler. or whatever.

New to Home Assistant (HA). Just installed Ver 2022.12.8. I have an Odroid N2+ and KKSB_N2_case with fan. How do I configure the fan to run? I see no mention in any Odroid documents and none in HA.

Being new and the new release, i thought this feature was already in HA…?

Thank you in advance for your help.

Did anyone have success getting the N2+ Fan to operate internally? I’m considering retiring my unit but it would be great to get it working from its internal connector

Nope. For some reason this isn’t an available feature. I mean I would like it to be because of all the crap I run probably being hard on it but I never got a response that explained how to so I use a HVAC inline fan connected to a z wave switch and mainly just leave it on constantly.

Cool, yeah I’ll probably be doing the same. Shame as it must be possible

Since the Netherlands was experiencing another (mini) heat wave, with temperatures reaching +30°C, and I was faced with the long-lasting challenge of getting my standard 80x80x10.8mm cooling fan, which I had bolted to my ODROID-N2+ a long time ago, to work.

Initially, there was no support for it in home assistant, but in 2022, I saw pull requests that aimed to fix that, at least for setting temp triggers. Unfortunately, in my case, I still couldn’t get the fan to work.

Despite never having seen the fan turn on myself, I found out that people on the forum had resorted to using external power sources, such as a USB port, or had simply given up :grinning:

After some research, I managed to get the fan to spin at full speed, which was fine for me. However, it did require mounting /sys as read-write to set the state of cooling_device0 (which represented the cooling fan) and setting the right value (on).

Now, the fan connected to the ODROID N2+ board is happily spinning and cooling my system.

The question remains: how can this be made persistent, or is there another way? There is a lot of information on this topic, but none of it is conclusive. The ODROID wiki gave me the right pointers (odroid-xu4:application_note:manually_control_the_fan [ODROID Wiki]).

Commands used (via terminal/SSH) (at own risks):

sudo mount -o remount,rw sysfs /sys
echo 1 > /sys/devices/virtual/thermal/cooling_device0/cur_state

Sounds like it’s going to create problems in later updates if I do that. This seems like something that should’ve been solved before they made it the default platform for their operating system. They can say it isn’t necessary all they want but that’s a statement that’s situationally dependant.

1 Like

I understand, for now, I just live with how it behaves (which is a fixed threshold).