Fix pulse output
This commit is contained in:
parent
605b8c2c4a
commit
67ce0f4352
|
|
@ -320,7 +320,7 @@ class EmonHubDomoticzReporter(EmonHubReporter):
|
||||||
|
|
||||||
|
|
||||||
for data in databuffer:
|
for data in databuffer:
|
||||||
data = data[2:]
|
data = data[2:]
|
||||||
#valid = False
|
#valid = False
|
||||||
#[ext_temp, temp, hum, batteri, pulse, rssi]
|
#[ext_temp, temp, hum, batteri, pulse, rssi]
|
||||||
self._log.debug(self.name + "data %s" %data)
|
self._log.debug(self.name + "data %s" %data)
|
||||||
|
|
@ -346,10 +346,10 @@ class EmonHubDomoticzReporter(EmonHubReporter):
|
||||||
self._log.info(self.name + " sending: " + post_url_temp)
|
self._log.info(self.name + " sending: " + post_url_temp)
|
||||||
reply = self._send_post(post_url_temp, post_body, post_header)
|
reply = self._send_post(post_url_temp, post_body, post_header)
|
||||||
|
|
||||||
domoPulse = '/json.htm?type=command¶m=udevice&idx=54&svalue=%s' %(pulse)
|
if domoPulse > 100:
|
||||||
post_url_pulse = self._settings['url'] + domoPulse + domoAddParam
|
domoPulse = '/json.htm?type=command¶m=udevice&idx=54&svalue=%s' %(pulse)
|
||||||
self._log.info(self.name + " sending: " + post_url_pulse)
|
post_url_pulse = self._settings['url'] + domoPulse + domoAddParam
|
||||||
|
self._log.info(self.name + " sending: " + post_url_pulse + " pulse: " + pulse)
|
||||||
|
|
||||||
# The Develop branch of emoncms allows for the sending of the apikey in the post
|
# The Develop branch of emoncms allows for the sending of the apikey in the post
|
||||||
# body, this should be moved from the url to the body as soon as this is widely
|
# body, this should be moved from the url to the body as soon as this is widely
|
||||||
|
|
@ -357,11 +357,11 @@ class EmonHubDomoticzReporter(EmonHubReporter):
|
||||||
|
|
||||||
reply = self._send_post(post_url_pulse, post_body, post_header)
|
reply = self._send_post(post_url_pulse, post_body, post_header)
|
||||||
|
|
||||||
status = True
|
status = True
|
||||||
|
|
||||||
self._log.debug(self.name + " Next return" )
|
self._log.debug(self.name + " Next return" )
|
||||||
if status:
|
if status:
|
||||||
return True
|
return True
|
||||||
self._log.debug(self.name + " After return" )
|
self._log.debug(self.name + " After return" )
|
||||||
|
|
||||||
"""class EmonHubEmoncmsReporter
|
"""class EmonHubEmoncmsReporter
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue