FHEM Forum

FHEM - Hausautomations-Systeme => EnOcean => Thema gestartet von: tomaszG am 03 Oktober 2019, 16:33:50

Titel: Setting PID20 parameters with EnOcean Valves
Beitrag von: tomaszG am 03 Oktober 2019, 16:33:50
Dear all,

Sorry for the language but German is difficult so I hope my English will be fine.
I use FHEM with a number of EnOcean valves: https://www.enocean-alliance.org/product/hora_smartdrive_mx/
Here is an example of config for this device

define EnO_019A9D70 EnOcean 019A9D70
setuuid EnO_019A9D70 5c6e8005-f33f-5073-a64a-9517742096ec5ff8
attr EnO_019A9D70 IODev TCM_ESP3_0
attr EnO_019A9D70 manufID 7FF
attr EnO_019A9D70 room EnOcean
attr EnO_019A9D70 subType 4BS


I have seen that the valve automatically uses the PID20 module to override local control of the valves. This is good as it offers much more options than the default local PID.
My goal is to set up the PID20 such that it does not send updated position to the valve for variations below 5 (instead of 1), in order to avoid too frequent noise.
I have seen it seems possible for a generic PID20 instance by using the parameter pidActorTreshold of the PID20, so I thought this should be the way.
Unfortunately, this parameter is not available in the valve in FHEM, and that seems confirmed by the reference since the EEP A5-20-04 do not list that attribute even though they list most PID20 related attributes.

I have then tried to create a PID20 instance myself for the device using the delta measurement of my valve, but this seems to fail as the PID20 does compute the value but they never seem to reach the valve. This method was somewhat cumbersome anyway.

Finally, I have discovered in https://wiki.fhem.de/wiki/PID20_-_Der_PID-Regler (https://wiki.fhem.de/wiki/PID20_-_Der_PID-Regler) that I could use the attribute event-on-change-reading of the PID20 and which seems available for the valve. the example below is given in the link

Zitatattr PID.FUBO event-on-change-reading actuation:1,actuationCalc:0.5,delta:0.2,desired,measured:0.2,p_d:0.1,p_i:1.0,p_p:1.0

I have tried to give

attr EnO_019A9D70 event-on-change-reading actuation:5

but this seems to freeze the valve. The reference states for the valve:
ZitatThe attr event-on-change-reading .* shut not by set.

Can someone please let me know if I am on the right track and how to use this attribute (or whatever other method)?

Thanks in advance,

Tomasz

Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: klaus.schauer am 03 Oktober 2019, 19:35:18
I have now added the attribute pidActorTreshold. The default value is 1. Please test the function with the developer version, see appendix.
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: tomaszG am 04 Oktober 2019, 10:16:23
Thanks for the reply. Working on it now
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: tomaszG am 04 Oktober 2019, 11:30:03
The pidActorTreshold is now indeed available, and I set it to 5, but it does not seem to have any effect.

The setpointCal, setpointSet and (most importanly) setpoint readings still change in steps of 1, 2 etc

see the excerpt of log below for the values :

Zitat2019-10-04_09:54:37 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_09:56:19 EnO_0196C6BD setpointSet: 41
2019-10-04_09:56:19 EnO_0196C6BD setpointCalc: 41.275
2019-10-04_09:58:01 EnO_0196C6BD setpointSet: 41
2019-10-04_09:58:01 EnO_0196C6BD setpointCalc: 41.325
2019-10-04_09:58:58 EnO_0196C6BD setpointSet: 46
2019-10-04_09:58:58 EnO_0196C6BD setpointCalc: 46
2019-10-04_09:59:40 EnO_0196C6BD setpointSet: 46
2019-10-04_09:59:40 EnO_0196C6BD setpointCalc: 45.025
2019-10-04_09:59:40 EnO_0196C6BD setpoint: 42
2019-10-04_09:59:40 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_09:59:40 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:01:22 EnO_0196C6BD setpointSet: 45
2019-10-04_10:01:22 EnO_0196C6BD setpointCalc: 45.05
2019-10-04_10:03:04 EnO_0196C6BD setpointSet: 45
2019-10-04_10:03:04 EnO_0196C6BD setpointCalc: 45.075
2019-10-04_10:04:42 EnO_0196C6BD setpointSet: 45
2019-10-04_10:04:42 EnO_0196C6BD setpointCalc: 46.125
2019-10-04_10:04:42 EnO_0196C6BD setpoint: 46
2019-10-04_10:04:42 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_10:04:42 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:06:24 EnO_0196C6BD setpointSet: 46
2019-10-04_10:06:24 EnO_0196C6BD setpointCalc: 46.175
2019-10-04_10:08:06 EnO_0196C6BD setpointSet: 46
2019-10-04_10:08:06 EnO_0196C6BD setpointCalc: 46.225
2019-10-04_10:09:45 EnO_0196C6BD setpointSet: 46
2019-10-04_10:09:45 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:09:45 EnO_0196C6BD setpoint: 45
2019-10-04_10:09:45 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_10:09:45 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:11:27 EnO_0196C6BD setpointSet: 44
2019-10-04_10:11:27 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:13:09 EnO_0196C6BD setpointSet: 44
2019-10-04_10:13:09 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:14:47 EnO_0196C6BD setpointSet: 44
2019-10-04_10:14:47 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:14:47 EnO_0196C6BD setpoint: 46
2019-10-04_10:14:47 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_10:14:47 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:16:29 EnO_0196C6BD setpointSet: 44
2019-10-04_10:16:29 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:18:11 EnO_0196C6BD setpointSet: 44
2019-10-04_10:18:11 EnO_0196C6BD setpointCalc: 44.225
2019-10-04_10:19:50 EnO_0196C6BD setpointSet: 39
2019-10-04_10:19:50 EnO_0196C6BD setpointCalc: 39.1
2019-10-04_10:19:50 EnO_0196C6BD setpoint: 43
2019-10-04_10:19:50 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_10:19:50 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:21:32 EnO_0196C6BD setpointSet: 39
2019-10-04_10:21:32 EnO_0196C6BD setpointCalc: 38.975
2019-10-04_10:23:14 EnO_0196C6BD setpointSet: 39
2019-10-04_10:23:14 EnO_0196C6BD setpointCalc: 38.85
2019-10-04_10:24:54 EnO_0196C6BD setpointSet: 43
2019-10-04_10:24:54 EnO_0196C6BD setpointCalc: 42.825
2019-10-04_10:24:54 EnO_0196C6BD setpoint: 39
2019-10-04_10:24:54 EnO_0196C6BD setpointTemp: 23.0
2019-10-04_10:24:54 EnO_0196C6BD operationMode: setpointTemp
2019-10-04_10:26:36 EnO_0196C6BD setpointSet: 43
2019-10-04_10:26:36 EnO_0196C6BD setpointCalc: 42.8

Is the information getting lost somehow ?

Tomasz
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: klaus.schauer am 06 Oktober 2019, 17:09:21
I have made a number of major changes. Please test the behavior of the PID controller extensively.
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: tomaszG am 09 Oktober 2019, 10:03:09
Hi,

I have deployed this and it does the job, changing the setPointSet only by steps of 5, it seems to also respect the saturations as well.
So, so far so good, we will keep evaluating and let you know

Tomasz
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: tomaszG am 13 Dezember 2019, 16:13:39
Hi all,

We have not encountered issues with this so far. Thanks a lot again. May I ask if this change has been included in the developper version online. I am wondering if I should keep my copy of the file each time I update or if I can go with the updated one ?

Best,

tomasz
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: klaus.schauer am 14 Dezember 2019, 09:05:52
The changes are included in the current online version.
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: cwagner am 16 Dezember 2019, 11:09:13
Da mich das von Tomasz angesprochene Detail auch bewegte, bin ich auf diesen Thread gestoßen. Ich finde im Repository allerdings nur eine 10_EnOcean.pm vom 14.10., in der könnten demnach ja die Änderung von Mitte Dezember bezüglich Handling von Threshold nicht drin sein, oder?

Herzliche Grüße

Christian
Titel: Antw:Setting PID20 parameters with EnOcean Valves
Beitrag von: klaus.schauer am 17 Dezember 2019, 06:17:36
Warum nicht, war ein Überschallupdate?