Hi together,
I'm using HTTPMOD to successfully extract several values from my Enphase Envoy solarcontroller. I am struggling with the creating a "smart" regex to derive the actual production in a uniform way: it displays in W when the value <= 999 W and switches to kW when above: x.xx kW
The webpage source:
<td>Currently generating</td> <td> 671 W</td></tr>
or alternatively:
<td>Currently generating</td> <td> 1.72 kW</td></tr>
I would like to use a single regex/reading that always returns the Watts, I tried something with looking ahead and replacing but my knowledge does not suffice. I try to avoid using multiple regexes/readings to identify the W and kW separately.
This is what I basically started with:
<td>Currently generating</td>[^0-9]+([0-9\.]+.*W)
I hope you can push me a little in the right direction.
KR,
Edwin