1
0
Fork 0

Fix scaling on sungrow example

gh-action
Bo Jeanes 2022-09-11 14:14:42 +10:00
parent 0d2a704c8a
commit 36654fd40e
2 changed files with 16 additions and 9 deletions

View File

@ -59,34 +59,41 @@
{ {
"address": 5036, "address": 5036,
"name": "grid_frequency", "name": "grid_frequency",
"period": "1m" "period": "1m",
"scale": -2
}, },
{ {
"address": 5019, "address": 5019,
"name": "phase_a_voltage", "name": "phase_a_voltage",
"period": "1m" "period": "1m",
"scale": -1
}, },
{ {
"address": 13031, "address": 13031,
"name": "phase_a_current", "name": "phase_a_current",
"period": "1m" "period": "1m",
"scale": -1
}, },
{ {
"address": 5011, "address": 5011,
"name": "mppt1_voltage" "name": "mppt1_voltage",
"scale": -1
}, },
{ {
"address": 5012, "address": 5012,
"name": "mppt1_current" "name": "mppt1_current",
"scale": -1
}, },
{ {
"address": 5012, "address": 5012,
"name": "mppt2_voltage" "name": "mppt2_voltage",
"scale": -1
}, },
{ {
"address": 5013, "address": 5013,
"name": "mppt2_current" "name": "mppt2_current",
} "scale": -1
},
{ {
"register_type": "holding", "register_type": "holding",
"address": 13058, "address": 13058,

View File

@ -53,7 +53,7 @@ pub(crate) async fn run(
if let Err(error) = result { if let Err(error) = result {
error!(?error, "Modbus connection failed"); error!(?error, "Modbus connection failed");
mqtt.publish("state", "errorered").await.unwrap(); mqtt.publish("state", "error").await.unwrap();
mqtt.publish("last_error", format!("{error:?}")) mqtt.publish("last_error", format!("{error:?}"))
.await .await
.unwrap(); .unwrap();