OH 4.2.2 refuses to communicate with Heatit thermostats

Here is a tutorial I have used and an example (It is in DSL);

rule "Bedtime_Main_Heat"
when
    Time cron "0 05 21 ? * * *"
then
    val mode = Downstairs_Mode.state
    var upstate = UpstairsThermostat21_ThermostatOperatingState.state as Number
    var mainmode = MainThermostat14_ThermostatMode.state as Number
    var maintempset = (MainThermostat14_SetpointHeating.state as QuantityType<Temperature>).toUnit("°F")
    if( mainmode == 1 && mode != 'Vacation' ) {
        if(upstate != 1 && maintempset != 65|°F) {
            MainThermostat14_SetpointHeating.sendCommand(65)
        }
        if(upstate == 1 && maintempset != 66|°F) {
            MainThermostat14_SetpointHeating.sendCommand(66)
        }
    }
end