Develop a driver - (Venstar Thermostat Driver Development)

Ok... Looks like the getapi() and postapi() functions need to be reworked...

I'll have an update later...

1 Like

And yet another try... 8-}

Same info needed... log after initialize to start with...

UPDATE: Removed old version...

Are you a kind of machine with built-in AI or do you have a human side somewhere ? :thinking:
Will update and return the results.

dev:5872019-11-03 14:43:50.251 warnCall to postapi(mode=1&fan=1&heattemp=75&cooltemp=70) failed: Cannot invoke method decodeBase64() on null object

dev:5872019-11-03 14:43:50.249 debugparseDescriptionAsMap returns [[success:true]]

dev:5872019-11-03 14:43:50.246 debugParsing '[success:true]'

dev:5872019-11-03 14:43:50.244 debughttpPost returned: [success:true]

dev:5872019-11-03 14:43:50.130 infoSending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=1&heattemp=75&cooltemp=70]

dev:5872019-11-03 14:43:50.127 infoExecuting API Control update

dev:5872019-11-03 14:43:50.125 debugExecuting 'setHeatingSetpoint' with 75

dev:5872019-11-03 14:43:50.122 debugtemperatureScale - VS = null HE = C

dev:5872019-11-03 14:43:25.798 warnCall to getapi() failed: 1

dev:5872019-11-03 14:43:25.796 debugParsing 'java.io.ByteArrayInputStream@155c603'

dev:5872019-11-03 14:43:25.793 debughttpGet returned: {"name":"Dom","mode":1,"state":1,"fan":1,"fanstate":1,"tempunits":0,"schedule":0,"schedulepart":255,"away":0,"spacetemp":70.0,"heattemp":80.0,"cooltemp":70.0,"cooltempmin":35.0,"cooltempmax":99.0,"heattempmin":35.00,"heattempmax":99.0,"setpointdelta":2.0,"availablemodes":1}

dev:5872019-11-03 14:43:25.747 debugExecuting get api to http://192.168.1.254/query/info

dev:5872019-11-03 14:43:25.744 debugExecuting 'refresh'

dev:5872019-11-03 14:43:25.741 debugExecuting 'poll'

dev:5872019-11-03 14:43:20.831 warnCall to getapi() failed: 1

dev:5872019-11-03 14:43:20.816 debugParsing 'java.io.ByteArrayInputStream@a2763a'

dev:5872019-11-03 14:43:20.810 debughttpGet returned: {"name":"Dom","mode":1,"state":1,"fan":1,"fanstate":1,"tempunits":0,"schedule":0,"schedulepart":255,"away":0,"spacetemp":70.0,"heattemp":80.0,"cooltemp":70.0,"cooltempmin":35.0,"cooltempmax":99.0,"heattempmin":35.00,"heattempmax":99.0,"setpointdelta":2.0,"availablemodes":1}

dev:5872019-11-03 14:43:20.715 debugExecuting get api to http://192.168.1.254/query/info

dev:5872019-11-03 14:43:20.706 debugExecuting 'refresh'

dev:5872019-11-03 14:43:08.550 warnCall to postapi(mode=1&fan=1&heattemp=80&cooltemp=70) failed: Cannot invoke method decodeBase64() on null object

dev:5872019-11-03 14:43:08.548 debugparseDescriptionAsMap returns [[success:true]]

dev:5872019-11-03 14:43:08.545 debugParsing '[success:true]'

dev:5872019-11-03 14:43:08.543 debughttpPost returned: [success:true]

dev:5872019-11-03 14:43:08.229 infoSending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=1&heattemp=80&cooltemp=70]

dev:5872019-11-03 14:43:08.226 infoExecuting API Control update

dev:5872019-11-03 14:43:08.209 debugExecuting 'setCoolingSetpoint' with 70

dev:5872019-11-03 14:43:08.206 debugtemperatureScale - VS = null HE = C

dev:5872019-11-03 14:43:02.852 warnCall to postapi(mode=1&fan=1&heattemp=80&cooltemp=149) failed: Cannot invoke method decodeBase64() on null object

dev:5872019-11-03 14:43:02.849 debugparseDescriptionAsMap returns [[error:true, reason:Wrong Setpoints]]

dev:5872019-11-03 14:43:02.847 debugParsing '[error:true, reason:Wrong Setpoints]'

dev:5872019-11-03 14:43:02.844 debughttpPost returned: [error:true, reason:Wrong Setpoints]

dev:5872019-11-03 14:43:02.776 infoSending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=1&heattemp=80&cooltemp=149]

dev:5872019-11-03 14:43:02.771 infoExecuting API Control update

dev:5872019-11-03 14:43:02.766 debugExecuting 'setHeatingSetpoint' with 80

dev:5872019-11-03 14:43:02.763 debugtemperatureScale - VS = null HE = C

dev:5872019-11-03 14:42:17.899 warnCall to getapi() failed: 1

dev:5872019-11-03 14:42:17.866 debugParsing 'java.io.ByteArrayInputStream@1389b3'

dev:5872019-11-03 14:42:17.862 debughttpGet returned: {"name":"Dom","mode":1,"state":0,"fan":0,"fanstate":0,"tempunits":0,"schedule":0,"schedulepart":255,"away":0,"spacetemp":70.0,"heattemp":71.0,"cooltemp":70.0,"cooltempmin":35.0,"cooltempmax":99.0,"heattempmin":35.00,"heattempmax":99.0,"setpointdelta":2.0,"availablemodes":1}

dev:5872019-11-03 14:42:17.760 debugExecuting get api to http://192.168.1.254/query/info

dev:5872019-11-03 14:42:17.756 debugVenstar Driver v0.3 - Initializing

But now, far better results !
when I changed (HE) the temperature heating setting to 80, as a test, I heard my geothermal running (was idle).
Looked at the thermostat... settings are 80 ! Yeah
Changed (HE) to 75... settings are now 75 on the thermostat !

Good... I have the info fix the remaining issues...

I meed to step out (for work)... Will have an update in a few hours...

1 Like

Thx ++ for what you did !
tested the fan on/auto feature: OK
tested the heat/stop (not cooled for now): OK

the thermostat displayed 2nd stage, and that's a little bit different than usual, but probably just a parameter.

Anyway, I hope you'll have a nice day at work and remind yourself that you solved a problem for a random guy who was unable to solve it himself ! Good Job !!

And this one should do it... I hope 8-}

As the driver is now (somewhat) functional, I have added the required parameter and supporting code to do automatic refreshing of the thermostat (as I won't send updates by itself)... It defaults to 10 minutes, but can be set to other values between 1 minute and 3 hours...

UPDATE: Removed old version...

Installed the update. Initialized. log (error):

I also noticed that I can't increase the value (decrease is ok) on the tile.
Maybe this is not related to the driver itself but related to the thermostat generic device that control it ?
venstar%20tile%20increase%20failure

And again....

UPDATE: Removed old version...

v0.5 installed. Initialized. and set fan ON as a test (result OK)

*Edit: it's maybe due to the error, but when I refresh (or set refresh to 1 min to speed up things), the device commands and the tile won't update new settings (if I change settings on the thermostat itself)

Yes... It is throwing the error when it tries to parse the data returned from the thermostat.

I'm trying to recreate it here... working on more updates...

Yet another try 8-} Let me know what happens...

UPDATE: Removed old version...

1 Like

Installed v0.6
Initialized. this is the log
At first the commands displayed the actual settings (21.5 C). Note that 22.5 because in Celsius, you can set half a degree in the thermostat.
After setting 22.5 (to put something), the thermostat displayed 22. But it's not a dramatic problem, can handle this (in case)
Will make tests now. and Edit this reply
but no more errors. Great !

better and better !
when setting 0.5 degree on the device command, it truncate the half one
the tile is now displaying the status and the settings. Increasing has no positive results, decreasing is ok. Almost done !


venstar%20tile%20updated

Updated temp setting FROM the thermostat (changed to 20C): device poll rate was set to 1 minute to speed up things:

the tile updated correctly the new setting (decreased from 21 to 20) !
Log seems ok to me

6%20thermostat%20updated

Set on the thermostat fan ON and increased temp settings: OK !
6%20thermostat%20updated

Did some extensive tests, including RM4 and global variables. and it works "perfectly" except the increase/decrease tile that is always limited by 1 degree. (and the increase temp not working from the tile)

Maybe this is a native setting for Hubitat thermostats. In the US, there is no need to increase by 0.5 degree Fahrenheit. But there is for sure with Celsius. Maybe @bravenel can confirm this limitation ?
22C = 71.6F and 22.5C= 72.5F and 23C = 73.4F

Hey Bruce, btw, look what cybrmage made for me: a working Venstar device !! Wow, I'm amazed of this community !!

Post logs so I can see if there is something wrong with the processing...

Also... Although my test setup is static (no real thermostat to actually change the display)... The thermostat tile does appear to be doing a 0.5 degree change... So logs of both setpoint up and down would be helpful...

Hit increase temp 3 times on the tile:

dev:5872019-11-03 23:09:28.800 debuggetapi: getapi() completed

dev:5872019-11-03 23:09:28.795 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.793 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.772 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.761 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.720 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.710 debugparseJsonData: data is: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:28.707 debuggetapi: httpGet returned: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:28.669 debuggetapi: Executing get api to http://192.168.1.254/query/info

dev:5872019-11-03 23:09:28.667 debugpostapi: httpGet returned success

dev:5872019-11-03 23:09:28.664 debugpostapi: httpPost returned: [success:true]

dev:5872019-11-03 23:09:28.631 infopostapi: Sending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=0&heattemp=22&cooltemp=9.0]

dev:5872019-11-03 23:09:28.628 infopostapi: Executing API Control update

dev:5872019-11-03 23:09:28.625 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.603 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:28.600 debugExecuting 'setHeatingSetpoint' with 22

dev:5872019-11-03 23:09:28.597 debuggetTemperatureVS: temperatureScale - VS = C HE = C

dev:5872019-11-03 23:09:27.474 debuggetapi: getapi() completed

dev:5872019-11-03 23:09:27.468 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.463 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.452 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.436 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.373 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.322 debugparseJsonData: data is: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:27.319 debuggetapi: httpGet returned: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:27.231 debuggetapi: Executing get api to http://192.168.1.254/query/info

dev:5872019-11-03 23:09:27.220 debugpostapi: httpGet returned success

dev:5872019-11-03 23:09:27.214 debugpostapi: httpPost returned: [success:true]

dev:5872019-11-03 23:09:27.094 infopostapi: Sending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=0&heattemp=22&cooltemp=9.0]

dev:5872019-11-03 23:09:27.091 infopostapi: Executing API Control update

dev:5872019-11-03 23:09:27.088 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.086 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:27.077 debugExecuting 'setHeatingSetpoint' with 22

dev:5872019-11-03 23:09:27.073 debuggetTemperatureVS: temperatureScale - VS = C HE = C

dev:5872019-11-03 23:09:25.748 debuggetapi: getapi() completed

dev:5872019-11-03 23:09:25.746 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.743 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.740 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.708 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.705 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.695 debugparseJsonData: data is: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:25.691 debuggetapi: httpGet returned: [name:Dom, mode:1, state:1, fan:0, fanstate:1, tempunits:1, schedule:0, schedulepart:255, away:0, spacetemp:21.5, heattemp:22.0, cooltemp:9.0, cooltempmin:1.5, cooltempmax:37.0, heattempmin:1.50, heattempmax:37.0, setpointdelta:2.0, availablemodes:1]

dev:5872019-11-03 23:09:25.650 debuggetapi: Executing get api to http://192.168.1.254/query/info

dev:5872019-11-03 23:09:25.648 debugpostapi: httpGet returned success

dev:5872019-11-03 23:09:25.645 debugpostapi: httpPost returned: [success:true]

dev:5872019-11-03 23:09:25.581 infopostapi: Sending on POST request to [http://192.168.1.254/control] with command [mode=1&fan=0&heattemp=22&cooltemp=9.0]

dev:5872019-11-03 23:09:25.579 infopostapi: Executing API Control update

dev:5872019-11-03 23:09:25.576 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.565 debuggetTemperatureHE: temperatureScale - HE = C VS = C

dev:5872019-11-03 23:09:25.562 debugExecuting 'setHeatingSetpoint' with 22

dev:5872019-11-03 23:09:25.560 debuggetTemperatureVS: temperatureScale - VS = C HE = C

  • Location: Dom