Comparison of temperatures for triggers and notifications in HomeKit

Cupertino, May 15, 2021

Some posts (now archived) noted the need to compare temperatures from multiple sensors in the HomeKit. For example, it could be used to start a fan in the attic if the outside temperature drops below the inside temperature. There are no examples posted on AFAIK to demonstrate a way to do this. Here is an example, quite heroic, because it involves homebridge, infinitude, json decoding, an apache / php server with PHP script, an Apple shortcut and the pushcut application. In San Francisco it can be heated enough (despite claims to the contrary) that air conditioning is very welcome. But when the fog forms, the temperature drops very quickly and you can run cooler when the temperature outside is 10 degrees colder than inside. We wanted an iPhone / AppleWatch notification to remind us to open windows when this happens. The notification is set to work if the outside temperature is lower than inside and the heat pump cools down. I have homebridge running on a pi raspberry. A second raspberry pi runs infinitude and an Apache server and serves a number of php files for http calls. (Infinitude provides JSON data from a Carrier Infinity heat pump thermostat because Carrier does not provide any HomeKit APIs or support (ahem!).) The Homebridge HTTP-SWITCH plugin creates a HomeKit switch and turns it on and off based on a model state. is appropriate. I configured it as follows in HomeBridge: {"accessory": "HTTP-SWITCH", "name": "OpenUpstWindows", "switchType": "stateful", "onUrl": "http://172.16.1.57/ opentheLRdoor .php "," offUrl ":" http://172.16.1.57/opentheLRdoor.php "," statusUrl ":" http://172.16.1.57/opentheLRdoor.php "," statusPattern ":" true "," pullInterval ": 60000}, the ph file opentheLRdoor.php reaches the internal (rt) and external (oats) temperatures and the state of the heat pump in different areas. If the outside (garden) is cooler than the inside and the cooling state is active (active _cool), it returns "true", so the HomeUk OpenUpstWindows switch is activated by the homebridge. $ dnstairs); $ upcooloutside = $ gradina <$ sus; if (($ upcooloutside) și ($ upcoolheat == "active_cool")) {echo "true"; } else {echo "false"; }?> A HomeKit automation is triggered on the OpenUpstWindows switch and runs a shortcut that calls a pushcut application URL that then generates the corresponding notification. The shortcut uses the "URL" and "get the contents of the URL" entry. Because pushcut works for a single Apple account, I had to have 2 calls to receive notifications from both me and my wife. Maybe one day this type of heroic will no longer be necessary, and temperature comparisons and more complete automation options and notifications will be available in the HomeKit.

Best selling & Top trending HomeKit product in our shop at this moment

HomeKit.Blog is in no way affiliated with or endorsed by Apple Inc. or Apple related subsidiaries.

All images, videos and logos are the copyright of the respective rights holders, and this website does not claim ownership or copyright of the aforementioned.

All information about products mentioned on this site has been collected in good faith. However, the information relating to them, may not be 100% accurate, as we only rely on the information we are able to gather from the companies themselves or the resellers who stock these products, and therefore cannot be held responsible for any inaccuracies arising from the aforementioned sources, or any subsequent changes that are made that we have not been made aware of.

HomeKit.Blog Is A Participant In The Amazon Services LLC Associates Program, An Affiliate Advertising Program Designed To Provide A Means For Sites To Earn Advertising Fees By Advertising And Linking To Amazon Store (Amazon.com, Or Endless.com, MYHABIT.com, SmallParts.com, Or AmazonWireless.com).

The opinions expressed on this website by our contributors do not necessarily represent the views of the website owners. 

Copyright © 2022 HomeKit Blog
. All rights reserved
United States