This has now the GoodWe inverter added as well as supporting raw and bitmapped values.
When using the map dictionary to convert values to names the original rawValue key is now added to the json output.
E.g.
{
"address": 1000,
"modbustype": "holding",
"modbusaccess": "read",
"valuetype": "uint16",
"mqtt": "visible",
"interval": 10,
"map": {
"0": "NONE",
"1": "MESSAGE",
"2": "WARNING",
"3": "ALARM",
"4": "FAULT"
},
"topic": "heatpump/errorstate",
"title": "Heatpump Error State"
}
results in the following json:
{"address":1000,"rawValue":0,"title":"Heatpump Error State","value":"NONE"}
You can use specific bitfields and name them like:
{
"address": 2,
"modbustype": "holding",
"modbusaccess": "read",
"valuetype": "uint16",
"mqtt": "visible",
"interval": 5,
"bits": { // you can bit mappings for values
"0": { "name" : "running" }, // a single bit will be mapped to a boolean
"1-3": { "name" : "mode" }, // multiple values will be mapped to the integer number with those bits shifted to the right
"4-15": { "name" : "reserved" }
},
"topic": "test/state",
"title": "Test State"
}
}