Update API json.htm
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# Author: fjumelle
|
# 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>
|
<description>
|
||||||
<h2>Signal Level</h2><br/>
|
<h2>Signal Level</h2><br/>
|
||||||
Create devices to trace the signal level of other devices.<br/>
|
Create devices to trace the signal level of other devices.<br/>
|
||||||
@@ -72,7 +72,7 @@ class BasePlugin:
|
|||||||
Domoticz.Heartbeat(self.pooling)
|
Domoticz.Heartbeat(self.pooling)
|
||||||
|
|
||||||
#List of devices to scan
|
#List of devices to scan
|
||||||
res = DomoticzAPI("type=devices&used=true")
|
res = DomoticzAPI("type=command¶m=getdevices&used=true")
|
||||||
self.devices = self.getDevicesSignalLevel(res)
|
self.devices = self.getDevicesSignalLevel(res)
|
||||||
Domoticz.Debug("Scanned devices: {}".format(self.devices))
|
Domoticz.Debug("Scanned devices: {}".format(self.devices))
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class BasePlugin:
|
|||||||
|
|
||||||
def onHeartbeat(self):
|
def onHeartbeat(self):
|
||||||
if self.pooling_current_step == self.pooling_steps:
|
if self.pooling_current_step == self.pooling_steps:
|
||||||
res = DomoticzAPI("type=devices&used=true")
|
res = DomoticzAPI("type=command¶m=getdevices&used=true")
|
||||||
for idx, device in enumerate(self.devices):
|
for idx, device in enumerate(self.devices):
|
||||||
value = self.getSignalLevel(res, device)
|
value = self.getSignalLevel(res, device)
|
||||||
idx = idx + 1
|
idx = idx + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user