Note the climateRef also to confirm we should use "smart2" for creating a program

"climates": [
{
"name": "Away",
"climateRef": "away",
"isOccupied": false,
"isOptimized": true,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "system",
"type": "program",
"colour": 9021815,
"coolTemp": 670,
"heatTemp": 630,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
},
{
"id": "rs:100:1",
"name": "Master Bedroom"
}
]
},
{
"name": "Home",
"climateRef": "home",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "system",
"type": "program",
"colour": 13560055,
"coolTemp": 730,
"heatTemp": 680,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
},
{
"id": "rs:100:1",
"name": "Master Bedroom"
}
]
},
{
"name": "Sleep",
"climateRef": "sleep",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "system",
"type": "program",
"colour": 2179683,
"coolTemp": 720,
"heatTemp": 640,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
},
{
"id": "rs:100:1",
"name": "Master Bedroom"
}
]
},
{
"name": "Hot",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 760,
"heatTemp": 620,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Warm",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 766,
"heatTemp": 726,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Humid",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 720,
"heatTemp": 680,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Mild",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 730,
"heatTemp": 660,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Pleasant",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 780,
"heatTemp": 620,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Cool",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 740,
"heatTemp": 700,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Cold",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 780,
"heatTemp": 680,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Freezing",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 780,
"heatTemp": 670,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
},
{
"name": "Frozen",
"climateRef": "smart2",
"isOccupied": true,
"isOptimized": false,
"coolFan": "auto",
"heatFan": "auto",
"vent": "off",
"ventilatorMinOnTime": 20,
"owner": "user",
"type": "program",
"colour": 0,
"coolTemp": 800,
"heatTemp": 660,
"sensors": [
{
"id": "ei:0:1",
"name": "Main Floor"
}
]
}
],
1 person has
this problem
+1
Reply
  • Here is what I am submitting to the API

    {
    "selection": {
    "selectionType": "registered",
    "selectionMatch": ""
    },
    "thermostat": {
    "program": {
    "schedule": [
    [
    "away",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "sleep",
    "sleep",
    "sleep",
    "sleep"
    ],
    [
    "away",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "smart2",
    "sleep",
    "sleep",
    "home",
    "sleep"
    ],
    [
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "sleep"
    ],
    [
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "sleep"
    ],
    [
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "sleep"
    ],
    [
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "sleep"
    ],
    [
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "sleep",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "home",
    "sleep",
    "sleep",
    "sleep",
    "sleep"
    ]
    ],
    "climates": [
    {
    "name": "Away",
    "climateRef": "away",
    "isOccupied": false,
    "isOptimized": true,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "system",
    "type": "program",
    "coolTemp": 670,
    "heatTemp": 630
    },
    {
    "name": "Home",
    "climateRef": "home",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "system",
    "type": "program",
    "coolTemp": 730,
    "heatTemp": 680
    },
    {
    "name": "Sleep",
    "climateRef": "sleep",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "system",
    "type": "program",
    "coolTemp": 720,
    "heatTemp": 640
    },
    {
    "name": "Hot",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 760,
    "heatTemp": 620
    },
    {
    "name": "Warm",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 766,
    "heatTemp": 726
    },
    {
    "name": "Humid",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 720,
    "heatTemp": 680
    },
    {
    "name": "Mild",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 730,
    "heatTemp": 660
    },
    {
    "name": "Pleasant",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 780,
    "heatTemp": 620
    },
    {
    "name": "Cool",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 740,
    "heatTemp": 700
    },
    {
    "name": "Cold",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 780,
    "heatTemp": 680
    },
    {
    "name": "Freezing",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 780,
    "heatTemp": 670
    },
    {
    "name": "Frozen",
    "isOccupied": true,
    "isOptimized": false,
    "coolFan": "auto",
    "heatFan": "auto",
    "vent": "off",
    "ventilatorMinOnTime": 20,
    "owner": "user",
    "type": "program",
    "coolTemp": 800,
    "heatTemp": 660
    }
    ]
    }
    }
    }
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • Paul hello!

    I'm not sure what question is. Also, what is the sequence of the request/responses that you get from the API?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • 1) Climate element smart2 repeats 5 times it is not unique, so every custom climate as the same climateRef; this is the value coming back from the API
    2) want to confirm that in the schedule element array we should use the climateRef ie smart2

    ====
    Sequence
    1) Get current climates from API
    2) Compare the climates to what I have local
    ?Change update the local copy to match what the API sent back
    3) Update the schedule element based on predicted weather patterns and predicted human behavior
    4) Post updates back to API
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned