Replies: 6 comments 13 replies
-
Try to set PidUpdateSecs to 0 and TelePeriod to your requested time. From the source code: |
Beta Was this translation helpful? Give feedback.
-
Anyway, if PidUpddateSecs=0 Pid should run continuously (=every program cycle). In the shutter is driven. The time for this is specified in TelePeriod. So that's the PID Algorithm
is decoupled from the shutter. Read along: |
Beta Was this translation helpful? Give feedback.
-
In my opinion a decoupling from Shutter would be necessary, which could be achieved with very less effort. Decoupling means not even the teleperiod could effect any output on shutter. A temporary total decoupling is possibly with: PidAutoAuto mode 1 or 0 (for manual).This can be used to enable or disable the control (1=enable auto mode, 0=disabled, manual mode). When in manual mode the output is set the value defined for PidManualPower PidManualPowerPower output when in manual mode or fallback mode if too long elapses between process values. So you can turn off the controller totally. |
Beta Was this translation helpful? Give feedback.
-
Just implement your own command. This is not witchcraft. Or use an existing command like
There you simply evaluate the parameter and control either the original value (0 and 1) or your variable. |
Beta Was this translation helpful? Give feedback.
-
I would like to run this PID on a ShellyEM to perform power control. For this you would need to execute the PID as quickly as possible. The ideal would be to at least evaluate the power value at a sample rate between 10 or 20ms. Would this be possible? Thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
I managed a similar task with a pure Tasmota solution without PID. Maybe these ideas will help. |
Beta Was this translation helpful? Give feedback.
-
If you plan to use the PID controller with #define PID_SHUTTER enabled, the code will update the shutter in every second. Thus makes all the shutter command unusable.
After a reboot it should make a full close to init it properly. Or any other case a shutter setting is needed to the valve it needs a reflash now.
In my opinion this should be a variable.
#define PID_SHUTTER 1 // Number of the shutter here. Otherwise leave this commented out
If so, 0 could mean no shutter command should be issued, any other int should work as now.
It needs 1 bool variable to hold it and an conditional of that variable is 0 or not.
Beta Was this translation helpful? Give feedback.
All reactions