Merge pull request #172 from kng/homeassistant

Homeassistant mqtt discovery, wip
This commit is contained in:
Gunnar Skjold
2022-02-12 11:48:43 +01:00
committed by GitHub
11 changed files with 390 additions and 1 deletions

3
web/ha1.json Normal file
View File

@@ -0,0 +1,3 @@
{
"P" : %d,
}

7
web/ha2.json Normal file
View File

@@ -0,0 +1,7 @@
{
"tPI" : %.2f,
"tPO" : %.2f,
"tQI" : %.2f,
"tQO" : %.2f,
"rtc" : %llu
}

19
web/ha3.json Normal file
View File

@@ -0,0 +1,19 @@
{
"lv" : "%s",
"id" : "%s",
"type" : "%s",
"P" : %d,
"Q" : %d,
"PO" : %d,
"QO" : %d,
"I1" : %.2f,
"I2" : %.2f,
"I3" : %.2f,
"U1" : %.2f,
"U2" : %.2f,
"U3" : %.2f,
"PF" : %.2f,
"PF1" : %.2f,
"PF2" : %.2f,
"PF3" : %.2f
}

17
web/hadiscover1.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name" : "%s",
"stat_t" : "%s",
"uniq_id" : "%s",
"obj_id" : "%s",
"unit_of_meas" : "%s",
"val_tpl" : "{{value_json['%s']}}",
"dev_cla" : "%s",
"dev" : {
"ids" : [ "%s" ],
"name" : "%s",
"mdl" : "%s",
"sw" : "%s",
"mf" : "%s",
"cu" : "%s"
}
}

18
web/hadiscover2.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name" : "%s",
"stat_t" : "%s",
"uniq_id" : "%s",
"obj_id" : "%s",
"unit_of_meas" : "%s",
"val_tpl" : "{{value_json['%s']}}",
"dev_cla" : "%s",
"dev" : {
"ids" : [ "%s" ],
"name" : "%s",
"mdl" : "%s",
"sw" : "%s",
"mf" : "%s",
"cu" : "%s"
},
"stat_cla" : "%s"
}

24
web/jsonha.json Normal file
View File

@@ -0,0 +1,24 @@
{
"lv" : "%s",
"id" : "%s",
"type" : "%s",
"P" : %d,
"Q" : %d,
"PO" : %d,
"QO" : %d,
"I1" : %.2f,
"I2" : %.2f,
"I3" : %.2f,
"U1" : %.2f,
"U2" : %.2f,
"U3" : %.2f,
"PF" : %.2f,
"PF1" : %.2f,
"PF2" : %.2f,
"PF3" : %.2f,
"tPI" : %.2f,
"tPO" : %.2f,
"tQI" : %.2f,
"tQO" : %.2f,
"rtc" : %lu
}

View File

@@ -62,6 +62,7 @@
<option value="1" {f1}>Raw (minimal)</option>
<option value="2" {f2}>Raw (full)</option>
<option value="3" {f3}>Domoticz</option>
<option value="4" {f4}>Home-Assistant</option>
</select>
</div>
</div>