Haven’t seen your email, probably caught up in spam filter…
Here’s what my setup looks like. And I too am using the http binding. As far as I know it’s the only way to talk to the model 50 as it’s wifi only. They do/did have other models that were zwave.
Items:
/* Thermostat */
Number Tstat_mode “System Status” { http=“<[tstat:600000:JSONPATH($.tmode)]” }
Number Tstat_temp “Indoor Temp [%.1f °F]” { http=“<[tstat:600000:JSONPATH($.temp)]” }
Number Tstat_SetpointH “Set Heat Temperature [%.1f °F]” { http=“<[tstat:600000:JSONPATH($.t_heat)]” }
Number Tstat_SetpointC “Set A/C Temperature [%.1f °F]” { http=“<[tstat:600000:JSONPATH($.t_cool)]” }
Number Tstat_Setpoint “Set Temperature [%.1f °F]”
Number Tstat_hold “Hold Status” { http=“<[tstat:600000:JSONPATH($.hold)]” }
Number Tstat_fan “Fan Mode” { http=“<[tstat:600000:JSONPATH($.fmode)]” }
DateTime Tstat_LastUpdate “Last contact [%1$tm-%1$td @ %1$tH:%1$tM]”
String Tstat2_rToday “Today [%s]” { http=“<[tstat2:600000:JS(todayRuntime.js)]” }
String Tstat2_rYesterday “Yesterday [%s]” { http=“<[tstat2:600000:JS(yesterdayRuntime.js)]” }
Rules:
// 3M50 Filtrete Thermostat Rules
rule “Records last thermostat update time”
when
Item Tstat_temp received update
then
postUpdate(Tstat_LastUpdate, new DateTimeType())
end
// Set HVAC Mode
rule “System Off”
when
Item Tstat_mode received command 0
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“tmode”:0}’)
end
rule “System Heat”
when
Item Tstat_mode received command 1
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“tmode”:1}’)
end
rule “System Cool”
when
Item Tstat_mode received command 2
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“tmode”:2}’)
end
// Get Current Heat/AC Target Temperature - load Setpoint
rule “New Target Temperature”
when
Item Tstat_mode received update
then
if (Tstat_mode.state == 1) {
Tstat_Setpoint.state = Tstat_SetpointH.state
}
if (Tstat_mode.state == 2) {
Tstat_Setpoint.state = Tstat_SetpointC.state
}
end
// Set Temperature
rule “Set Temperature Target”
when
Item Tstat_Setpoint received command
then
if (Tstat_mode.state == 1) {
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“a_heat”:’ + Tstat_Setpoint.state + ‘}’)
}
if (Tstat_mode.state == 2) {
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“a_cool”:’ + Tstat_Setpoint.state + ‘}’)
}
end
// Set Temperature Hold State
rule “Hold Disabled”
when
Item Tstat_hold received command 0
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“hold”:0}’)
end
rule “Hold Enabled”
when
Item Tstat_hold received command 1
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“hold”:1}’)
end
// Set Fan State
rule “Fan Auto”
when
Item Tstat_fan received command 0
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“fmode”:0}’)
end
rule “Fan On”
when
Item Tstat_fan received command 2
then
sendHttpPostRequest(“http://192.168.224.50:80/tstat”, “application/json”, ‘{“fmode”:2}’)
end
Sitemap:
Text item=Tstat_temp icon="thermostat" { Frame { Switch item=Tstat_mode mappings=[0="Off", 1="Heat", 2="Cool"] icon="thermometer" Setpoint item=Tstat_Setpoint minValue=60 maxValue=80 step=1.0 Switch item=Tstat_hold mappings=[0="No", 1="Yes"] Switch item=Tstat_fan mappings=[0="Auto", 2="On"] icon="fan" Text item=Tstat2_rToday Text item=Tstat2_rYesterday Text item=Tstat_LastUpdate //valuecolor=[Tstat_LastUpdate>120="orange", Tstat_LastUpdate>300="red"] //Text item=Tstat2_Ystrdy } }
Transform:
hvac1.map:
0=Off
1=Heat
2=Cool
hvac2.map:
0=Auto
2=On
hvac4.map:
0=Disabled
1=Enabled
todayRuntime.js:
(function(json) {
var datalog = JSON.parse(json);
return “” + datalog.today.heat_runtime.hour + "hrs, " +
datalog.today.heat_runtime.minute + “min”;
})(input)
yesterdayRunTime.js:
(function(json) {
var datalog = JSON.parse(json);
return “” + datalog.yesterday.heat_runtime.hour + "hrs, " +
datalog.yesterday.heat_runtime.minute + “min”;
})(input)