Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 720

RegExp Index Issues

$
0
0
It's official - RegExp is driving me mad. I cannot get the index to to work when parsing the string, even though RainRegExp says it's fine.

The debug log in Rainmeter never shows the WebParser fetching data for this skin.

The WebParser:

Code:

[MeasurePowerwallStats]Measure=WebParserhttp://internal.site/aggregatesUpdateRate=1RegExp="(?siU)"site".*instant_power": (.*),.*"battery".*instant_power": (.*),.*"load".*instant_power": (.*),.*"solar".*instant_power": (.*),"
The output from the /aggregates URL:

Code:

{"site": {"last_communication_time": "2024-04-14T20:33:26.622161278+01:00", "instant_power": 2323.889892578125, "instant_reactive_power": -1914.050048828125, "instant_apparent_power": 3010.6563773113858, "frequency": 49.95000076293945, "energy_exported": 510477.76861479547, "energy_imported": 61261928.262598604, "instant_average_voltage": 249.6699981689453, "instant_average_current": 0, "i_a_current": 0, "i_b_current": 0, "i_c_current": 0, "last_phase_voltage_communication_time": "0001-01-01T00:00:00Z", "last_phase_power_communication_time": "0001-01-01T00:00:00Z", "last_phase_energy_communication_time": "0001-01-01T00:00:00Z", "timeout": 1500000000, "num_meters_aggregated": 1, "instant_total_current": 0}, "battery": {"last_communication_time": "2024-04-14T20:33:26.686884+01:00", "instant_power": 0, "instant_reactive_power": 350.00000000000006, "instant_apparent_power": 350.00000000000006, "frequency": 49.976, "energy_exported": 8441345, "energy_imported": 9591727, "instant_average_voltage": 249.5, "instant_average_current": -0.30000000000000004, "i_a_current": 0, "i_b_current": 0, "i_c_current": 0, "last_phase_voltage_communication_time": "0001-01-01T00:00:00Z", "last_phase_power_communication_time": "0001-01-01T00:00:00Z", "last_phase_energy_communication_time": "0001-01-01T00:00:00Z", "timeout": 1500000000, "num_meters_aggregated": 1, "instant_total_current": -0.30000000000000004}, "load": {"last_communication_time": "2024-04-14T20:33:26.622161278+01:00", "instant_power": 2286.527063243744, "instant_reactive_power": -1466.1998038447596, "instant_apparent_power": 2716.237816491861, "frequency": 49.95000076293945, "energy_exported": 0, "energy_imported": 96829884.66837211, "instant_average_voltage": 249.6699981689453, "instant_average_current": 9.158197140276782, "i_a_current": 0, "i_b_current": 0, "i_c_current": 0, "last_phase_voltage_communication_time": "0001-01-01T00:00:00Z", "last_phase_power_communication_time": "0001-01-01T00:00:00Z", "last_phase_energy_communication_time": "0001-01-01T00:00:00Z", "timeout": 1500000000, "instant_total_current": 9.158197140276782}, "solar": {"last_communication_time": "2024-04-14T20:33:26.663190601+01:00", "instant_power": 0.4399999976158142, "instant_reactive_power": 114.41000366210938, "instant_apparent_power": 114.41084973883282, "frequency": 49.95000076293945, "energy_exported": 37285848.73599931, "energy_imported": 57032.56161101488, "instant_average_voltage": 249.97000122070312, "instant_average_current": 0, "i_a_current": 0, "i_b_current": 0, "i_c_current": 0, "last_phase_voltage_communication_time": "0001-01-01T00:00:00Z", "last_phase_power_communication_time": "0001-01-01T00:00:00Z", "last_phase_energy_communication_time": "0001-01-01T00:00:00Z", "timeout": 1500000000, "num_meters_aggregated": 1, "instant_total_current": 0}}
RainRegExp outputs 4 string indexes and their values as expected, but the Rainmeter skin displays all zeros as if the indexes aren't functioning.

What am I doing wrong? I'm running out of hair :/

Statistics: Posted by spoonwzd — April 14th, 2024, 7:38 pm — Replies 5 — Views 114



Viewing all articles
Browse latest Browse all 720

Trending Articles