Skip to content

Commit

Permalink
Update to mathieucarbou/MycilaJSY @ 12.0.0 which adds support for JSY…
Browse files Browse the repository at this point in the history
…-MK-193
  • Loading branch information
mathieucarbou committed Nov 21, 2024
1 parent 52c0be3 commit 79bdb30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ lib_deps =
mathieucarbou/MycilaESPConnect @ 7.0.0
mathieucarbou/MycilaEasyDisplay @ 3.0.2
mathieucarbou/MycilaHADiscovery @ 6.0.1
mathieucarbou/MycilaJSY @ 11.1.4
mathieucarbou/MycilaJSY @ 12.0.0
mathieucarbou/MycilaLogger @ 3.2.1
mathieucarbou/MycilaMQTT @ 6.0.2
mathieucarbou/MycilaNTP @ 6.0.3
Expand Down
11 changes: 6 additions & 5 deletions src/init/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Mycila::Task initEventsTask("Init Events", [](void* params) {
.current = jsy.data.single().current,
.energy = jsy.data.single().activeEnergyImported,
.energyReturned = jsy.data.single().activeEnergyReturned,
.frequency = jsy.data.frequency,
.frequency = jsy.data.single().frequency,
.power = jsy.data.single().activePower,
.powerFactor = jsy.data.single().powerFactor,
.voltage = jsy.data.single().voltage,
Expand All @@ -361,7 +361,7 @@ Mycila::Task initEventsTask("Init Events", [](void* params) {
.current = jsy.data.channel2().current,
.energy = jsy.data.channel2().activeEnergyImported,
.energyReturned = jsy.data.channel2().activeEnergyReturned,
.frequency = jsy.data.frequency,
.frequency = jsy.data.aggregate.frequency,
.power = jsy.data.channel2().activePower,
.powerFactor = jsy.data.channel2().powerFactor,
.voltage = jsy.data.channel2().voltage,
Expand All @@ -374,7 +374,7 @@ Mycila::Task initEventsTask("Init Events", [](void* params) {
.current = jsy.data.aggregate.current,
.energy = jsy.data.aggregate.activeEnergyImported,
.energyReturned = jsy.data.aggregate.activeEnergyReturned,
.frequency = jsy.data.frequency,
.frequency = jsy.data.aggregate.frequency,
.power = jsy.data.aggregate.activePower,
.powerFactor = jsy.data.aggregate.powerFactor,
.voltage = jsy.data.aggregate.voltage,
Expand Down Expand Up @@ -435,13 +435,14 @@ Mycila::Task initEventsTask("Init Events", [](void* params) {
});
break;

case MYCILA_JSY_MK_193:
case MYCILA_JSY_MK_194:
grid.remoteMetrics().update({
.apparentPower = doc["channel2"]["apparent_power"].as<float>(),
.current = doc["channel2"]["current"].as<float>(),
.energy = doc["channel2"]["active_energy_imported"].as<float>(),
.energyReturned = doc["channel2"]["active_energy_returned"].as<float>(),
.frequency = doc["frequency"].as<float>(),
.frequency = doc["aggregate"]["frequency"].as<float>(),
.power = doc["channel2"]["active_power"].as<float>(),
.powerFactor = doc["channel2"]["power_factor"].as<float>(),
.voltage = doc["channel2"]["voltage"].as<float>(),
Expand All @@ -454,7 +455,7 @@ Mycila::Task initEventsTask("Init Events", [](void* params) {
.current = doc["aggregate"]["current"].as<float>(),
.energy = doc["aggregate"]["active_energy_imported"].as<float>(),
.energyReturned = doc["aggregate"]["active_energy_returned"].as<float>(),
.frequency = doc["frequency"].as<float>(),
.frequency = doc["aggregate"]["frequency"].as<float>(),
.power = doc["aggregate"]["active_power"].as<float>(),
.powerFactor = doc["aggregate"]["power_factor"].as<float>(),
.voltage = doc["aggregate"]["voltage"].as<float>(),
Expand Down

0 comments on commit 79bdb30

Please sign in to comment.