soloam / ha-pid-controller

PID Controller to Home Assistant
MIT License
97 stars 12 forks source link

PID controller doesn't do anything after tuning #5

Closed RubenKelevra closed 2 years ago

RubenKelevra commented 2 years ago

I'm trying to use the PID controller to control the fan speed of my air cleaner.

So the output is 0 to 3.

The input is a particle sensor in the same room.

I've followed the tuning instructions and came out with 0.2 over swing on the input and a delay of around 60 seconds.

But configuring these values will result in a 0 on the output all the time.

My settings:

IMG_20220209_011242

The status of the controller:

Screenshot_2022-02-09-01-12-00-352_io homeassistant companion android

In the last 2 hours you can see the output of the controller at 0 while the setpoint of 12 was exceeded over long durations:

IMG_20220209_011126

Did I miss something? 🤔

soloam commented 2 years ago

From what I see your source at the moment is "33,42" and you are targeting "17"! The PID by default will raise the value, so if your ideia is to use the pid to take the value from "33,42" to "17" set the option "invert" to true.

A better way to tune the PID is to use "input_number" to change the values on the fly.

RubenKelevra commented 2 years ago

Well invert is on.

But I saw your fix for invert PID and since I've installed this version it works as expected.

Thanks for the fast fix :)