IrmsMAoffset parameter
lechacal opened this issue · 2 comments
This is concerning the line below in the file /config/config.yml
IrmsMAoffset: -240 # Indicates we're subtracting about 240 mA from the readings...
In the current state this is just subtracting 240 to all channels regardless. At the time this github repo was edited the RPICT card must have output Irms in milliAmpere. Now RPICT cards output in Ampere so this parameter correction subtract a large value (240 here) to anything regardless (voltages, powers, currents etc).
The implementation of this parameter as a global correction is highly questionable. Not all values need the same correction (if correction is needed).
"Seems like the device is slightly out".
All RPICT card are sold un-calibrated. Which means that calibration values are good enough out of factory but if more accurate reading are needed then it is recommended to perform a calibration and change the calibration value in the RPICT card. This is the correct way to apply correction. The calibration guide is here below.
http://lechacal.com/wiki/index.php?title=Calibration_VCAL_ICAL_PHASECAL
Post acquisition corrections are perfectly valid of course. However we would rather recommend a per field correction here as all channels are not the same. Maybe a correction in the form of a*x + b might be better here.
However we are confident if the calibration in the RPICT is done correctly there is no need for further corrections.
Our recommendation when using the docker.
1/ Make sure to disable the IrmsMAoffset by setting it to 0.0.
2/ Follow the correct calibration protocol for the RPICT cards.
Maybe this parameters should be set as 0.0 by default to start with. Then it should either be removed or expanded for application to each field.
It appears the changing
IrmsMAoffset: -240 # Indicates we're subtracting about 240 mA from the readings...
value to 0 or 0.0 has no effect
I've deleted the containers after and re established them with no effect.
I even uncommented the build parameter, still no effect
root@spectrix:~/Projects/RPICT(16:52:18)$ mosquitto_sub -h localhost -u mora -P '**********' -t 'homeassistant/#'
-229
-239.52
-239.52
-239.52
-239.52
-231.75
-239.51
-175.98000000000002
-239.5
-239.74
-239.76
-239.76
-185.52
-152.79000000000002
-239.74
-238.76
-239.76
-231.62
-239.76
-239.76
-239.76
-239.76
-239.81
-239.82
-239.63
-239.68
-239.68
-76.1
-239.68
-239.39
-239.71
-238.98
-239.65
-238.13
-238.07
-238.53
I was able to rebuild it with some modifications. Now it is excepting the 0 parameter
root@spectrix:~/Projects/RPICT(16:52:18)$ mosquitto_sub -h localhost -u mora -P '**********' -t 'homeassistant/#'
11
0.47
0.48
0.48
0.48
8.43
0.49
71.31
0.5
0.24
0.24
0.26
10.5
88.1
0.28
1.1
0.24
8.31
0.24
0.24
0.24
0.24
0.24
0.21
0.32
0.35
0.26
1.17
0.37
0.68
0.35
1.08
0.31
1.62
1.94
1.54
1.93
1.94
1.97
1.95
1.96
Spoke too soon. It automatically rebuild the image with the default -240 value. Not sure why it is doing that. It is happening with no user intervention.
root@spectrix:~/Projects/RPICT(16:52:18)$ mosquitto_sub -h localhost -u mora -P '**********' -t 'homeassistant/#'
11
0.48
0.48
0.48
0.48
8.49
0.5
76.38
0.49
0.26
0.28
0.24
52.72
86.67
0.26
1.07
0.26
8.57
0.24
0.3
0.24
0.24
0.31
0.22
0.29
0.26
0.34
1.24
0.37
0.7
0.34
1.08
0.37
1.5
1.95
1.59
1.94
1.96
1.96
1.94
1.95
{
"name": "NodeID",
"unit_of_measurement": "",
"state_topic": "homeassistant/sensor/lechacal1_NodeID",
"icon": "mdi:"
}
{
"name": "MP1",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP1",
"icon": "mdi:"
}
{
"name": "MP2",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP2",
"icon": "mdi:"
}
{
"name": "MP3",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP3",
"icon": "mdi:"
}
{
"name": "MP4",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP4",
"icon": "mdi:"
}
{
"name": "MP5",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP5",
"icon": "mdi:"
}
{
"name": "MP6",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP6",
"icon": "mdi:"
}
{
"name": "MP7",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP7",
"icon": "mdi:"
}
{
"name": "MP8",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_MP8",
"icon": "mdi:"
}
{
"name": "S1P1",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P1",
"icon": "mdi:"
}
{
"name": "S1P2",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P2",
"icon": "mdi:"
}
{
"name": "S1P3",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P3",
"icon": "mdi:"
}
{
"name": "S1P4",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P4",
"icon": "mdi:"
}
{
"name": "S1P5",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P5",
"icon": "mdi:"
}
{
"name": "S1P6",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P6",
"icon": "mdi:"
}
{
"name": "S1P7",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P7",
"icon": "mdi:"
}
{
"name": "S1P8",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S1P8",
"icon": "mdi:"
}
{
"name": "S2P1",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P1",
"icon": "mdi:"
}
{
"name": "S2P2",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P2",
"icon": "mdi:"
}
{
"name": "S2P3",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P3",
"icon": "mdi:"
}
{
"name": "S2P4",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P4",
"icon": "mdi:"
}
{
"name": "S2P5",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P5",
"icon": "mdi:"
}
{
"name": "S2P6",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P6",
"icon": "mdi:"
}
{
"name": "S2P7",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P7",
"icon": "mdi:"
}
{
"name": "S2P8",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S2P8",
"icon": "mdi:"
}
{
"name": "S3P1",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P1",
"icon": "mdi:"
}
{
"name": "S3P2",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P2",
"icon": "mdi:"
}
{
"name": "S3P3",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P3",
"icon": "mdi:"
}
{
"name": "S3P4",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P4",
"icon": "mdi:"
}
{
"name": "S3P5",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P5",
"icon": "mdi:"
}
{
"name": "S3P6",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P6",
"icon": "mdi:"
}
{
"name": "S3P7",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P7",
"icon": "mdi:"
}
{
"name": "S3P8",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S3P8",
"icon": "mdi:"
}
{
"name": "S4P1",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P1",
"icon": "mdi:"
}
{
"name": "S4P2",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P2",
"icon": "mdi:"
}
{
"name": "S4P3",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P3",
"icon": "mdi:"
}
{
"name": "S4P4",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P4",
"icon": "mdi:"
}
{
"name": "S4P5",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P5",
"icon": "mdi:"
}
{
"name": "S4P6",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P6",
"icon": "mdi:"
}
{
"name": "S4P7",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P7",
"icon": "mdi:"
}
{
"name": "S4P8",
"unit_of_measurement": "Estimated Power",
"state_topic": "homeassistant/sensor/lechacal1_S4P8",
"icon": "mdi:"
}
-229
-239.52
-239.52
-239.52
-239.52
-231.48
-239.49
-163.51
-239.51
-239.74
-239.76
-239.76
-186.87
-153.5
-239.76
-238.91
-239.72
-231.5
-239.76
-239.76
-239.76
-239.74
-239.74
-239.78
-239.55
-239.65
-239.61
-238.68
-239.66
-239.33
-239.68
-238.95
-239.66
-238.42
-238.05
-238.34
-238.06
-238.05
-238.04
-238.05
-238.05