Control your Apex with Siri

blazeby

Active Member
View Badges
Joined
Feb 11, 2017
Messages
144
Reaction score
49
Rating - 0%
0   0   0
Hi all,

Thanks to a free framework called Homebridge I've been able to control my tank with Siri voice commands.

I find this useful for when my hands are wet and the touch screen on my tablet won't work to turn things on and off via my Apex. Now I just say "Hey Siri, turn off the skimmer" or "Hey Siri, turn off the aquarium alarm".

Homebridge is an open source framework that allows us to add none HomeKit devices to HomeKit and this allow Siri control of those devices.

First thing you need to do is install Homebridge, it's free and instructions are here: https://github.com/nfarina/homebridge

In the Mac terminal: npm install -g homebridge

I used to run it on my Mac but nowadays have it running on a Raspberry Pi - works well on either platform. It also works on Windows machines although I have never tried that.

Next install a Homebridge plug-in called cmdSwitch2 with npm install -g homebridge-cmdswitch2

Now you have to edit your Homebridge config file (config.json) to add the control params for your Apex.

The Apex can be controlled by simple HTTP POST commands and we're going to use them. Your cmdswitch2 entries in your Homebridge config file should look something like this:

"platform": "cmdSwitch2",
"name": "CMD Switch",
"switches": [
{
"name" : "Skimmer",
"on_cmd": "/usr/bin/curl -X POST --user admin:<adminPassword> http://<apexIPaddress>:<apexPortNumber>/status.sht?Skimmer_state=2&Update=Update",
"off_cmd": "/usr/bin/curl -X POST --user admin:<adminPassword> http://<apexIPaddress>:<apexPortNumber>/status.sht?Skimmer_state=1&Update=Update",
}

The state (apexDevice_state) is 0 for Auto, 1 for OFF, and 2 for ON.

And thats it!

Thanks to this thread for the HTTP POST info: https://www.reef2reef.com/threads/guide-how-to-control-neptune-apex-using-google-home.319864/

I may spend sometime to get Siri to be able to report the current state of devices and probes and possibly write a dedicate Apex Homebridge plug-in if time permits.
 

jsker

Reefing is all about the adventure
View Badges
Joined
Apr 11, 2015
Messages
24,974
Reaction score
79,737
Location
Saint Louis
Rating - 0%
0   0   0
Thank for the hack:)
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 42 31.3%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 31 23.1%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 27 20.1%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 34 25.4%
  • Other.

    Votes: 0 0.0%
Back
Top