Update API json.htm

This commit is contained in:
2023-07-22 22:34:41 +02:00
parent 9188c68ad9
commit d791950248

View File

@@ -3,7 +3,7 @@
# Author: fjumelle
#
"""
<plugin key="SignalLevel" name="Signal Level" author="fjumelle" version="1.0.0" wikilink="" externallink="">
<plugin key="SignalLevel" name="Signal Level" author="fjumelle" version="1.1.0" wikilink="" externallink="">
<description>
<h2>Signal Level</h2><br/>
Create devices to trace the signal level of other devices.<br/>
@@ -72,7 +72,7 @@ class BasePlugin:
Domoticz.Heartbeat(self.pooling)
#List of devices to scan
res = DomoticzAPI("type=devices&used=true")
res = DomoticzAPI("type=command&param=getdevices&used=true")
self.devices = self.getDevicesSignalLevel(res)
Domoticz.Debug("Scanned devices: {}".format(self.devices))
@@ -88,7 +88,7 @@ class BasePlugin:
def onHeartbeat(self):
if self.pooling_current_step == self.pooling_steps:
res = DomoticzAPI("type=devices&used=true")
res = DomoticzAPI("type=command&param=getdevices&used=true")
for idx, device in enumerate(self.devices):
value = self.getSignalLevel(res, device)
idx = idx + 1