Thermostat won't update, I need some programming help
The plugin I am working on will update the setpoint temps, no problem. But reading back the data from the stat isn't working. It reads back the data and logs it, but it is not selecting the correct data row. I am not sure why. I have never used datarows before. The code that is in the plugin is not right. Not quite sure why. It will update the temp on one stat only. So somehow it is not selecting the address out of the reply correctly. I think there is something wrong with this selection of code. See attachment.
Any help from a good programmer and not just a hack would be good. I have never written anything complex. Thanks
Terry
This line is not selecting anything. Rows is always nothing.
Rows = dtThermostats.Select("DeviceType=0 And Value='" & addr & "'")
The plugin I am working on will update the setpoint temps, no problem. But reading back the data from the stat isn't working. It reads back the data and logs it, but it is not selecting the correct data row. I am not sure why. I have never used datarows before. The code that is in the plugin is not right. Not quite sure why. It will update the temp on one stat only. So somehow it is not selecting the address out of the reply correctly. I think there is something wrong with this selection of code. See attachment.
Any help from a good programmer and not just a hack would be good. I have never written anything complex. Thanks
Terry
This line is not selecting anything. Rows is always nothing.
Rows = dtThermostats.Select("DeviceType=0 And Value='" & addr & "'")
Comment