mqtt module now works.

This commit is contained in:
Martin Preuss
2023-10-04 18:22:53 +02:00
parent bfed937950
commit f1753eeea7
17 changed files with 133 additions and 558 deletions

8
devices/0BUILD Normal file
View File

@@ -0,0 +1,8 @@
<?xml?>
<gwbuild>
<data dist="true" install="$(datadir)/aqhome/devices">
tasmota_plug.xml
</data>
</gwbuild>

41
devices/tasmota_plug.xml Normal file
View File

@@ -0,0 +1,41 @@
<device name="tasmotaplug" driver="mqtt">
<mqtttopics>
<mqtttopic type="json" direction="in" >
<mask>tele/tasmota/*/SENSOR</mask>
<beforeId>tele/tasmota/</beforeId>
<afterId>/SENSOR</afterId>
<values>
<value name="powerusage" type="sensor" path="ENERGY/POWER" units="W" />
<value name="totalenergy" type="sensor" path="ENERGY/TOTAL" units="kWh" />
<value name="apparentpower" type="sensor" path="ENERGY/ApparentPower" units="VA" />
<value name="reactivepower" type="sensor" path="ENERGY/ReactivePower" units="VAr" />
<value name="powerfactor" type="sensor" path="ENERGY/Factor" />
<value name="voltage" type="sensor" path="ENERGY/Voltage" units="V" />
<value name="current" type="sensor" path="ENERGY/Current" units="A" />
</values>
</mqtttopic>
<mqtttopic type="num" direction="out" >
<beforeId>cmnd/</beforeId>
<afterId>/Power</afterId>
<values>
<value name="power" type="actor">
<translations>
<translation aqh_value="0.0" dev_value="off"/>
<translation aqh_value="1.0" dev_value="on"/>
</translations>
</value>
</values>
</mqtttopic>
</mqtttopics>
</device>