Okay,
So, I have done some searches and seen this come up multiple times, but I haven't been able to find a clear full answer...only many partial, sometimes nonsensical, answers.
I have created a c# script to revert set points and thermostat modes to a set of adjustable "locked" virtual values. When the wife or kids change the thermostat it waits 30 seconds and reverts it to whatever I have the virtual devices locked to. Any time a value is changed or on the hour the script runs, compares set points to locked values, and runs functions based on != values.
Getting the device values changed is no problem. Unfortunately, I cannot figure out how to get the script to send commands directly to the thermostat without using associated events. Changing the device value does not affect the actual thermostat. It does work with the associated events but is clunky, requires a ton of events, and uses 50 lines of code for what could be 2.
I am aware that there are plug-ins available for variable controls and am not interested in using them. At this point it is principle and frustration more than necessity. It does work as it is but it sucks.
I have read the documentation and can't determine if there is an answer in there. I'm sure there is, but I clearly don't understand it if so.
I just need the line of code that will allow me to send the set point, mode command, or fan mode command to the thermostat with a device code of t1 based on a variable such as "int lockedHeatSetPoint" or "int /string lockedThermostatMode", etc... ...and I need the syntax for the method or statement spelled out for a plain idiot with little comprehension of scripting or coding to understand. Also, the only language I know is C#, though I'm sure I can make any necessary translations from VB. Any help is greatly appreciated. Thanks!!!
So, I have done some searches and seen this come up multiple times, but I haven't been able to find a clear full answer...only many partial, sometimes nonsensical, answers.
I have created a c# script to revert set points and thermostat modes to a set of adjustable "locked" virtual values. When the wife or kids change the thermostat it waits 30 seconds and reverts it to whatever I have the virtual devices locked to. Any time a value is changed or on the hour the script runs, compares set points to locked values, and runs functions based on != values.
Getting the device values changed is no problem. Unfortunately, I cannot figure out how to get the script to send commands directly to the thermostat without using associated events. Changing the device value does not affect the actual thermostat. It does work with the associated events but is clunky, requires a ton of events, and uses 50 lines of code for what could be 2.
I am aware that there are plug-ins available for variable controls and am not interested in using them. At this point it is principle and frustration more than necessity. It does work as it is but it sucks.
I have read the documentation and can't determine if there is an answer in there. I'm sure there is, but I clearly don't understand it if so.
I just need the line of code that will allow me to send the set point, mode command, or fan mode command to the thermostat with a device code of t1 based on a variable such as "int lockedHeatSetPoint" or "int /string lockedThermostatMode", etc... ...and I need the syntax for the method or statement spelled out for a plain idiot with little comprehension of scripting or coding to understand. Also, the only language I know is C#, though I'm sure I can make any necessary translations from VB. Any help is greatly appreciated. Thanks!!!
Comment