diff --git a/docs/manual.md b/docs/manual.md index a9c14e8..c01c094 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -38,6 +38,7 @@ description: Manual - [Temperature Sensor](#temperature-sensor) - [Zero-Cross Detection](#zero-cross-detection) - [Compatibility with EV box like OpenEVSE](#compatibility-with-ev-box-like-openevse) + - [PID Tuning](#pid-tuning) - [Help and support](#help-and-support) ## Quick Start @@ -581,6 +582,38 @@ You can use this value to inject in the EV box in order to prioritize EV chargin This is usually acceptable to give the EV box a priority over the water tank, because the water tank only need a small amount of routed energy to start heating, while the EV usually requires a threshold to start charging. So the router will take whatever is not used by the EV box. +### PID Tuning + +The back config page `http:///config` has a PID tuning section which allows you to tune the PID, if you know what you are doing. +You can change the PID calibration at runtime and teh effect will appear immediately. + +When `DEBUG`mdoe is activated, a WebSocket endpoint is available at `/ws/debug/pid` and will stream all the PID data in real time in a `CSV` format when automatic dimmer control is activated. +You can quickly show then and process then in `bash` with `websocat` by typing for example: + +```bash +❯ websocat ws://192.168.125.123/ws/debug/pid +pMode,dMode,icMode,rev,setpoint,kp,ki,kd,outMin,outMax,input,output,error,pTerm,iTerm,dTerm,sum +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,630.37,0.00,-630.37,-189.11,0.00,-63.04,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,631.60,0.00,-631.60,-189.48,0.00,-0.12,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,643.14,0.00,-643.14,-192.94,0.00,-1.15,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,655.29,0.00,-655.29,-196.59,0.00,-1.21,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,641.70,0.00,-641.70,-192.51,0.00,1.36,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,626.32,0.00,-626.32,-187.90,0.00,1.54,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,632.62,0.00,-632.62,-189.79,0.00,-0.63,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,623.50,0.00,-623.50,-187.05,0.00,0.91,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,625.54,0.00,-625.54,-187.66,0.00,-0.20,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,629.77,0.00,-629.77,-188.93,0.00,-0.42,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,627.03,0.00,-627.03,-188.11,0.00,0.27,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,630.68,0.00,-630.68,-189.20,0.00,-0.36,0.00 +1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,628.52,0.00,-628.52,-188.55,0.00,0.22,0.00 +``` + +You can also stream this data directly to a command-line tool that will plot in real time the graphs. +Example of such tools: + +- https://github.com/keithknott26/datadash +- https://github.com/cactusdynamics/wesplot + ## Help and support - **Facebook Group**: [https://www.facebook.com/groups/yasolr](https://www.facebook.com/groups/yasolr) @@ -588,3 +621,4 @@ So the router will take whatever is not used by the EV box. - **GitHub Discussions**: [https://github.com/mathieucarbou/YaSolR-OSS/discussions](https://github.com/mathieucarbou/YaSolR-OSS/discussions) - **GitHub Issues**: [https://github.com/mathieucarbou/YaSolR-OSS/issues](https://github.com/mathieucarbou/YaSolR-OSS/issues) +```