Thermostat problem

Posted on
Mon Oct 31, 2016 11:02 pm
kidney offline
Posts: 237
Joined: Jul 15, 2007

Thermostat problem

Hi! I have been trying to set the temp on my thermostat, but i'm unable too.
At first i was getting errors that loops for ever, can stop the that loop, it goes on for ever.
Code: Select all
2016-10-31 20:57:52.960   DSC Alarm Debug   RX: 50009634
2016-10-31 20:57:52.961   DSC Alarm Debug   ACK for cmd 096.
2016-10-31 20:57:52.967   DSC Alarm Debug   RX: 50202932
2016-10-31 20:57:52.968   DSC Alarm Error   IT-100/Envisalink Error (029): Unknown
2016-10-31 20:57:52.968   DSC Alarm Error   Received system error after sending command, aborting.
2016-10-31 20:57:52.969   DSC Alarm Error   Error changing thermostat setpoints, aborting adjustment.
2016-10-31 20:57:52.970   DSC Alarm Debug   SensorNum = 1
2016-10-31 20:57:52.970   DSC Alarm Debug   TX: 0951CF


Was able to pin down what was creating the error, but can't get the loop to stop even I fix the little bug in the code....
The error (029) is the in the Actions.xml file
<Action id="actionAdjustThermostat" deviceFilter="self.alarmTemp">
<Name>Adjust Thermostat</Name>
<CallbackMethod>methodAdjustThermostat</CallbackMethod>
<ConfigUI>
<Field type="menu" id="thermoAdjustWhich" defaultValue="h">
<Label></Label>
<List>
<Option value="H">Heat Setpoint</Option>
<Option value="C">Cool Setpoint</Option>
</List>
</Field>
<Field type="menu" id="thermoAdjustmentType" defaultValue="+">
<Label></Label>
<List>
<Option value="+">Increment by 1</Option>
<Option value="-">Decrement by 1</Option>
<Option value="=">Set to ...</Option>
</List>
</Field>
<Field type="textfield" id="thermoSetPoint" visibleBindingId="thermoAdjustmentType" visibleBindingValue="=">
<Label>Temperature:</Label>
</Field>
</ConfigUI>
</Action>

vs
<Action id="actionAdjustThermostat" deviceFilter="self.alarmTemp">
<Name>Adjust Thermostat</Name>
<CallbackMethod>methodAdjustThermostat</CallbackMethod>
<ConfigUI>
<Field type="menu" id="thermoAdjustWhich" defaultValue="h">
<Label></Label>
<List>
<Option value="h">Heat Setpoint</Option>
<Option value="C">Cool Setpoint</Option>
</List>
</Field>
<Field type="menu" id="thermoAdjustmentType" defaultValue="+">
<Label></Label>
<List>
<Option value="+">Increment by 1</Option>
<Option value="-">Decrement by 1</Option>
<Option value="=">Set to ...</Option>
</List>
</Field>
<Field type="textfield" id="thermoSetPoint" visibleBindingId="thermoAdjustmentType" visibleBindingValue="=">
<Label>Temperature:</Label>
</Field>
</ConfigUI>


<Option value="h">Heat Setpoint</Option> changes to a uppercase H and was able to set temp but the loops remained.

And it's get even worse if you use increments because it continuously increases the temp... lol

Help would be appreciated.

Posted on
Sat Nov 05, 2016 11:23 am
kidney offline
Posts: 237
Joined: Jul 15, 2007

Re: Thermostat problem

Got it resolve with the help of kw123

Thanks

Need to add the following line to the plugin.py file
old code
if len(self.txCmdList) > 0:
(cmdType, data) = self.txCmdList[0]
if cmdType == kCmdNormal:
txRsp = self.sendPacket(data)
if txRsp == '-':
# If we receive - socket has closed, lets re-init
self.mylogger.logError('Tried to send data but socket seems to have closed. Trying to re-initialize.')
self.state = self.States.BOTH_INIT
else:
# send was a success, remove command from queue
del self.txCmdList[0]

elif cmdType == kCmdThermoSet:
self.setThermostat(data)
else:
(rxRsp, rxData) = self.readPacket()
if rxRsp == '-':
# If we receive - socket has closed, lets re-init
self.mylogger.logError('Tried to read data but socket seems to have closed. Trying to re-initialize.')
self.state = self.States.BOTH_INIT

new code
if len(self.txCmdList) > 0:
(cmdType, data) = self.txCmdList[0]
if cmdType == kCmdNormal:
txRsp = self.sendPacket(data)
if txRsp == '-':
# If we receive - socket has closed, lets re-init
self.mylogger.logError('Tried to send data but socket seems to have closed. Trying to re-initialize.')
self.state = self.States.BOTH_INIT
else:
# send was a success, remove command from queue
del self.txCmdList[0]

elif cmdType == kCmdThermoSet:
self.setThermostat(data)
del self.txCmdList[0] ##<<<<<<<<<<<<<<<<< need to be removed after command send
else:
(rxRsp, rxData) = self.readPacket()
if rxRsp == '-':
# If we receive - socket has closed, lets re-init
self.mylogger.logError('Tried to read data but socket seems to have closed. Trying to re-initialize.')
self.state = self.States.BOTH_INIT

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests