Configuration json - s-allius/tsun-gen3-proxy GitHub Wiki
JSON config file
The proxy also acepts configuration files in the well known json-format.
The available keywords are defined here: Configuration
In addition to the standard, the proxy also supports dotted keyword notation. This is useful for deeply nested structures.
Example in standard JSON format:
{
"gen3plus": {
"at_acl":{
"mqtt": {
"block": [
"AT+SUPDATE",
"AT+"
]
}
}
}
}
Same example with dotted keyword notation:
{
"gen3plus.at_acl.mqtt.block": [
"AT+SUPDATE",
"AT+"
]
}
Example of a full configuration for two inverers:
{
"mqtt": {
"host": "mqtt",
"port": 1883,
"user": "",
"passwd": ""
},
"ha": {
"auto_conf_prefix": "homeassistant",
"discovery_prefix": "homeassistant",
"entity_prefix": "tsun",
"proxy_node_id": "proxy",
"proxy_unique_id": "P170000000000001"},
"solarman": {
"enabled": True,
"host": "iot.talent-monitoring.com",
"port": 10000,
},
"tsun": {
"enabled": True,
"host": "logger.talent-monitoring.com",
"port": 5005,
},
"inverters": {
"R170000000000001": {
"modbus_polling": False,
"node_id": "PV-Garage/",
"pv1": {
"manufacturer": "man1",
"type": "type1"},
"pv2": {
"manufacturer": "man2",
"type": "type2"},
"sensor_list": 688,
"suggested_area": "Garage"
},
"Y170000000000001": {
"client_mode": {
"host": "InverterIP",
"port": 1234,
"forward": True},
"modbus_polling": True,
"monitor_sn": 2000000000,
"node_id": "PV-Garage2/",
"pv1": {
"manufacturer": "man1",
"type": "type1"},
"pv2": {
"manufacturer": "man2",
"type": "type2"},
"pv3": {
"manufacturer": "man3",
"type": "type3"},
"pv4": {
"manufacturer": "man4",
"type": "type4"},
"sensor_list": 688,
"suggested_area": "Garage2"
},
"allow_all": False
},
"gen3plus": {
"at_acl": {
"tsun": {"allow": [], "block": []},
"mqtt": {"allow": [], "block": []}
}
},
}