Continuing the discussion from SmartTiles Dashboard v5.5: Added UK , 5 × Dashboards, and more! Nov 6, 2015 (www.SmartTiles.click):
Sure, sorry to clog up the SmartTiles topic!
OK folks, so hopefully I can get this going a bit further. As a recap, what I’m trying to do is control the Hive thermostat in the UK, but this device has no direct integration - Hive are saying it operates outside of Zigbee protocols. What it does have is a text gateway, where you can send a limited number of commands to 07860002088 such as HEAT AUTO, HEAT AUTO , HEAT STATUS, HW ON, HW OFF etc.
So to try and get this running from SmartThings (and specifically SmartTiles, although the idea is the same) I started looking at automating it through SMS messages. First up is a way of getting Boost working - which isn’t actually a command you can send yet, but it can be emulated by sending HEAT AUTO 22, and then HEAT AUTO (which will set it to 22, almost guaranteeing it will be turned on, and then the command without the temperature will drop it back into schedule mode).
So firstly I hopped onto the developer site (what do you call that place? The one that starts with graph.api.smartthings.com) and added a new device of type Simulated Button. I then set up a Notify Me When, and asked it to send me a text to the Hive number with the message “HEAT AUTO 22”. Simple, yes?
So here’s the catch. “Notify me when” in SmartThings will send a text message to any number when something happens - YAY! - however it comes from a US number, which Hive rather rudely won’t allow in their whitelist. No rhyme or reason for this, just not allowed. You have to specify what numbers you’re texting from (so they can match your number to your account I imagine) and they all must start with +44, the UK dialling code. So I need a buffer.
At this point, enter IFTTT. IFTTT can sit on my phone (which has a UK outbound number, naturally) and respond to triggers such as an inbound text. I set up the button push to send a message (“heatauto22”) to my phone (which doesn’t care if it receives an international text, which IFTTT is), the IF app then has a rule that listens to Android SMS for a text containing “heatauto22”, and then uses Android SMS to send “HEAT AUTO 22” to the Hive number - which is coming from my UK number, naturally, so it’s fine.
Actually, as I type this I’ve just realised that the ST text number is going to be the same for every user, so if I plumbed that into my Hive I would prevent anyone else from using it as I would have “baggsied” that number. Or, everyone’s Hives would interact with each others. Either way, not great.
I also changed the Simulated Button for a Simulated Switch, as I read something somewhere that a switch can be turned off after x minutes - naturally, I can’t find that anywhere now! Also, IFTTT can interact directly with a switch and not a button (because, I believe, the button flip-flops too fast for IFTTT to detect it) so I can actually skip a section of that - the switch in ST now directly asks my phone to fire off the text, it no longer requires the listener IF running to detect the inbound text.
It then just needs another IFTTT to send the command to stop boosting - which “HEAT AUTO” will do, that will drop back into scheduled mode. This is sent when the switch is turned off again.
TL;DR - Add “Simulated Switch” to ST. When switch on, IFTTT sends a text from my phone to Hive. When Switch Off, it sends a different text.
Won’t work if my phone is out of signal (needs mobile network, the IFTTT signal will use either 4G or WiFi but the outbound SMS needs the good old fashioned mobile network).
To do: work out how to turn the switch off automatically after 60 minutes.
To do then: See if I can somehow get SmartTiles to have the same up/down rockers that are used for other thermostats.