First, is it me or can you no longer create new applets to control your Philips Hue system on IFTTT? I see my old applets all working fine, but I don’t see Philips as a service for new applets.
My settings script file referenced at the start contains things like my API access token and bulb ID/name pairs.
A simple curl based interaction from a shell script does what I need. You can find details of how to do this and what is going on above by referencing the Hue API documentation. You can get started here.
Can I bug you for some newbie help? I’ve figured out how to get the temperature sensor data using:
Plus a whole lot more. Excuse the basic question, but what’s the best way to parse that in either a shell (that I can use in Keyboard Maestro) or Applescript so I can just get that “temperature” result in a variable?
I would greatly appreciate any help you can give me there. I’m a rank amateur who blunders about in code trying to wrestle the tech into something that works for me.
Okay, I have figured out how to do this with AppleScript. I also format it by converting to Fahrenheit and round down to two decimal places:
tell application "JSON Helper"
set result to (fetch JSON from "http://192.168.4.32/api/[API_KEY_HERE]/sensors/18/")
tell state of result
set officeTemp to its temperature
set officeTempF to (officeTemp / 100 * 9 / 5 + 32)
Thank you, that was my first attempt, spending about a half-hour googling variations on theme, but not finding anything that worked for me, including the link you provided. But while Applescript may not be ideal, as you say, it’s what I’m more familiar with and it works for my purposes.