Flexible PID via Home Assistant #177
Replies: 3 comments 9 replies
-
That is really interesting. I have achieved similarly tight controls as well. The problem I found was not so much the feedback controls but the fact that I am second guessing the operation of the a/c unit itself. Generally it was just turning the compressor on or off (well, seemed to be in my case) so setting a more fine tuned target temperature did not really control what it did. This meant the output of my control was either "high" or "low" enough to make it turn the compressor on or off. If I had any way to control the actual compessor directly I am sure I could have done even better. So impressed you managed it, well done. |
Beta Was this translation helpful? Give feedback.
-
I think it's a good idea, but it wasn't supported when I wrote this. I'm also not sure if my own unit supports it correctly. IMO it'd be simpler to set the demand either manually or via a simple function of the temperature, then let the PID do its thing. I might look into this eventually, but no guarantee. Feel free to experiment on your side and share the results. Edit: if I were you, I'd try to run each unit via their own script with their own PID parameters, but set the same overall target. Thai way at equilibrium, I think each unit would contribute optimally to the total heating according to how effective they are. |
Beta Was this translation helpful? Give feedback.
-
very interesting, but quite noob at python. how do you change the target temperature of 22.5 ? |
Beta Was this translation helpful? Give feedback.
-
The auto mode included in the firmware is very convenient, but maybe like me you'd like to have more flexibility.
e.g. have easy to adjust and familiar P, I, D parameters to fine-tune your heat pump to your specific situation, use another thermometer as the reference, etc.
That's why I wrote a prototype python PID script that uses pyscript from HACS to control my Daikin target temperature.
This script uses the value of the ble sensor as its temperature target.
It's tedious to adjust the PID parameters, but once tuned it oscillates slowly around the target temperature and reacts to sudden changes very well (sun showing up, oven turning on, etc.).
See here with a target of 22.5 on the ble sensor.
I'm sharing here in the hope that it might be of use to others.
See https://hacs-pyscript.readthedocs.io/en/latest/installation.html to install and configure pyscript. Don't forget to reboot the system that Home Assistant is running on afterwards.
You can find my script here: https://gist.github.com/JeanOlivier/08ebf167e77b14a6b28f1d75bd67bb18#file-daikin_pid-py
It should be fairly self explanatory if you understand python. Just configure the header according to your needs.
Beta Was this translation helpful? Give feedback.
All reactions