Polling Everspring ST814 (Temp/Humidity Sensor)

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Locked
christian
Posts: 3
Joined: 24 Jan 2011 16:51

Polling Everspring ST814 (Temp/Humidity Sensor)

Post by christian »

The ST814 can not answer multiple poll commands correctly. Its only allowed to send one GET and wait for the REPORT before the next getis sent. This means that only one single GET can be queued for the next wakeup. The work around is a slight change in the polling script:
# Sensor Polling. Work around the ST814 bug. Version 21.12.2010
import time, logging
devices = ZWaveAPI.devices
pollCCs = [0x30, 0x31, 0x32, 0x30, 0x25, 0x26] # sensorB, sensorML, Meter, switchB, switchML
skipNodes = [ZWaveAPI.controller.data.nodeId.value,255]
for nodeId in filter(lambda (x): x not in skipNodes and not devices[x].data.isFailed.value, devices.keys()):
for instanceId in filter(lambda (x): x > 0 or len(devices[nodeId].instances) == 1, devices[nodeId].instances.keys()):
i = devices[nodeId].instances[instanceId]
for ccId in filter(lambda (x): i.commandClasses.has_key(x), pollCCs):
if len(devices[nodeId].instances) == 1 or devices[nodeId].data.manufacturerId.value != 0x60:
i.commandClasses[ccId].Get()
else: # workaround for Everspring Multichannel Devices such as ST814
if not filter(lambda(job): job.buffer[4] == nodeId and job.buffer[10] == ccId, ZWaveAPI.queue):
if not devices[nodeId].data.has_key("oldInst"):
devices[nodeId].data.Add("oldInst")
devices[nodeId].data.oldInst.Update(instanceId)
if devices[nodeId].data.oldInst.value % (len(devices[nodeId].instances)-1) == (instanceId-1):
devices[nodeId].data.oldInst.Update(instanceId)
i.commandClasses[ccId].Get()

tyrrellsystems
Posts: 3
Joined: 12 May 2011 13:14

polling version 08.03.2011

Post by tyrrellsystems »

According to the recent polling code, the version states to be on march. Has this code already been updated or changed to adapt it for the ST814?

See:
# Sensor/Meter/Switch/Dimmer Polling Version 08.03.2011
import logging
devices = ZWaveAPI.devices
pollCCs = [0x30, 0x31, 0x32, 0x25, 0x26] # sensorB, sensorML, Meter, switchB, switchML
skipNodes = [ZWaveAPI.controller.data.nodeId.value, ZWaveAPI.NODE_BROADCAST]
for nodeId in filter(lambda (nodeId): nodeId not in skipNodes and not devices[nodeId].data.isFailed.value and not devices[nodeId].data.isVirtual.value, devices.keys()) :
for instanceId in filter(lambda (instId): instId > 0 or len(devices[nodeId].instances) == 1, devices[nodeId].instances.keys()):
for ccId in filter(lambda (x): devices[nodeId].instances[instanceId].commandClasses.has_key(x), pollCCs):
devices[nodeId].instances[instanceId].commandClasses[ccId].Get()
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

No, it was not

Post by PoltoS »

Unfortunately, there are some "broken" Z-Wave device and each of them have it's own bug.
We decided not to make workarounds for every bug in our software, since this will make Z-Way to heavy. Instead we are posting such recipes that allows you to customize default scripts.
Note, that customizing Polling script you can not only workaround existing bugs in devices, but also exclude some devices from Polling not to occupy air time (if they are often off and hence not reachable, or they sends updates themselves upon state change).
Locked