Initial implementation: MQTT-based energy meter subscriber
Subscribes to Eastron SDM630 power meter data via MQTT broker, decodes Modbus RTU frames, and writes readings to InfluxDB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
41
config/config.json
Normal file
41
config/config.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"broker": "EnergyMqtt-perimica-nxktq.local",
|
||||
"port": 8883,
|
||||
"client_id": "energy-subscriber",
|
||||
"topic_prefix": "Energy",
|
||||
"sample_rate": 10,
|
||||
"influxdb_host": "p5.local",
|
||||
"influxdb_port": 8086,
|
||||
"influxdb_token": "hDu4JYvxciHsohn7zE0nyZfejZDik3s8fqxCkTebW1LRekckyGX_U0-wsfEcDuDV5WZER3MjQDss01jJJCeZBA==",
|
||||
"influxdb_org": "tkl",
|
||||
"influxdb_bucket": "home",
|
||||
"ca_cert": "/srv/energy/meter/Energy-root-ca.crt",
|
||||
"client_cert": "/srv/energy/meter/Energy-admin_user.crt",
|
||||
"client_key": "/srv/energy/meter/Energy-admin_user.key",
|
||||
"devices": [
|
||||
{
|
||||
"slave_address": 1,
|
||||
"name": "Power_House",
|
||||
"segment": "modbus-segment",
|
||||
"registers": [
|
||||
{"name": "L1PowerW", "type": "input", "address": 12, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "L2PowerW", "type": "input", "address": 14, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "L3PowerW", "type": "input", "address": 16, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "TotalImport", "type": "input", "address": 72, "count": 2, "factor": 1, "unit": "kWh"},
|
||||
{"name": "TotalExport", "type": "input", "address": 74, "count": 2, "factor": 1, "unit": "kWh"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"slave_address": 2,
|
||||
"name": "Power_Barn",
|
||||
"segment": "modbus-segment",
|
||||
"registers": [
|
||||
{"name": "L1PowerW", "type": "input", "address": 12, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "L2PowerW", "type": "input", "address": 14, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "L3PowerW", "type": "input", "address": 16, "count": 2, "factor": 1, "unit": "W"},
|
||||
{"name": "TotalImport", "type": "input", "address": 72, "count": 2, "factor": 1, "unit": "kWh"},
|
||||
{"name": "TotalExport", "type": "input", "address": 74, "count": 2, "factor": 1, "unit": "kWh"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user