Guide: How to control Neptune Apex using Google Home

Given the media attention on unwanted outside hacks of these kinds of devices I would suspect that security has not only gone up but is going to continue to evolve and therefore make legitimate home projects like this harder and harder to implement.
 
Given the media attention on unwanted outside hacks of these kinds of devices I would suspect that security has not only gone up but is going to continue to evolve and therefore make legitimate home projects like this harder and harder to implement.
That's the tough thing about chasing unsupported features lol. Yes you can hack your way through it but in the end your always left surprised and reinventing the wheel to keep it working. Still this was a very fun read! Accidentally ran across this thread when I was googling Apex API's.
 
Does this still work in 2023 to be work chasing?
I am controlling my Reef Tank using an APEX and often have to turn off something when working on the tank.

This can be a pain as wet hands and touch screen phones don't work well together. I thought. Wouldn't it be awesome if you could use google home to control your tank? For example, when you start doing a water change and the ATO starts screaming you could say "OK Google.. Turn off tank ATO".

I searched around and there didn't seem to be a way to do it. Then, I realised the APEX Android app uses HTTP to communicate with your local APEX Web Server.

After firing up Wire shark I found that you can control your apex by sending simple HTTP POST commands to the APEX. For example to turn off your ATO you can issue the following command on your local network:

Code:
curl -X POST --user admin:PASSWORD http://APEX_LOCAL_IP:APEX_PORT/status.sht?ATO_state=1&Update=Update

The state is a enumeration where 0 = AUTO, 1 = OFF and 2 = ON.

Now I can issue commands to the APEX. But how do you hook it up with Google Home? This is where the following combination of tools does the magic:
Google Home + IFTTT + Home Assistant + Command Line Curl

Here is a demo with my Neptune Apex Controlled Reef Tank:


Step 1: Install Home Assistant

Home Assistant (https://home-assistant.io) is a home automation server that you run on your local network. Home Assistant allows you to centralise command and control of multiple home automation devices in one location. Once a device is connected to home assistant you can control those devices remotely via a REST web API.

Install Home Assistant by following the guides on the website and ensure you enable port forwarding to your home assistant server.

Important: Ensure you setup home assistant with a password, dynamic dns and enable SSL by following the guides. You are about to open a public interface to your Reef Tank!

Step 2: Add a command line switch for each Apex Connected Device

Home automation has many modules (platforms) to control devices. An extremely useful and flexible platform is the "command_line" platform (https://home-assistant.io/components/switch.command_line/). Using the command_line platform we can program a switch that runs a curl command to interact with your APEX as described above.

Add the following to your configuration.yaml file:

Code:
switch:
  - platform: command_line
    switches:
      fish_tank_ato:
        command_on: curl -X POST --user admin:PASSWORD http://APEX_LOCAL_IP:APEX_PORT/status.sht?ATO_state=0&Update=Update
        command_off: curl -X POST --user admin:PASSWORD http://APEX_LOCAL_IP:APEX_PORT/status.sht?ATO_state=1&Update=Update

Restart your home assistant and you should now see a switch on the Home assistant UI:
35706927793_cfc86fc32c_n.jpg%22


Step 3: Test the Home Assistant Switch

Switches in home assistant can be called via a REST API (https://home-assistant.io/developers/rest_api/). The REST API requires you to POST the name of the switch in JSON and your home assistant password in the url request.

Here is an example in curl:
Code:
curl -X POST -H "Content-Type: application/json" -d '{"entity_id" : "switch.fish_tank_ato"}' https://YOUR_DYNAMIC_DNS_HOSTNAME:HOME_ASSISTANT_PORT_ON_ROUTER/api/services/script/turn_on?api_password=HOME_ASSISTANT_PASSWORD

Step 4: Connect everything using IFTTT (If This Than That)

IFFT (https://ifttt.com/discover) allows you to connect input from one device (If This) to an action (Than That). We will be using IFTTT to make Google Assistant (This) perform web request to home assistant (Than That).

Sign up to IFTTT and setup a new Applet. For the (This) select Google Assistant
35706927673_11e0dc387c_n.jpg


Select the "Say a simple phrase" option and enter in the phrase to activate the command. For example "turn off tank ato".

For the "That" select the "Web Hooks" service.
36515570045_5bfc0833ac_n.jpg


Enter the URL to trigger the home assistant switch and set the action to POST.
35706927213_fe6ec80489_n.jpg


Set the content type to "application/json " and paste in the JSON that specifies the home assistant switch to trigger.
36515569865_a1a19d77ee_n.jpg


Step 5: Test it out

Say "OK Google.." and your phrase and enjoy your new Reef Tank Assistant!



Does this still work in 2023 to be work chasing? I stuck an NFC sticker on my cabinet that allows me to tap my iphone to quickly open to my Apex app. Would love to do something similar where I can NFC tap a "feed sticker" and skip a step.
 
Is this still working in 2025? When I initially tried my requests were working and properly updating my outlets, but then it just stopped working out of nowhere?
 
I know this started years ago as a older thread. I would really like to know if this can still be done? Is it working for anyone? I would be willing to pay for help setting this up. Im savy w computers and Apex but have never setup esp or home o. PII and done curls. At a minimum knowing if it can still be done before trying to work through all these steps. Maybe some help getting through some steps.

I started wo an apex with some inexpensive wifi bars that worked w Google assistant. I could make simple routines that went operational shutting off devices like skimmer and return pump for example. Now I need to either open apex and press feed A or open Alexa and click mic and ask for feed A. Looking for more hands off.

Really cannot comprehend why Apex chose Alexa and not the clear market leaders for integration.

Will pay. Pm me.
 
I can't understand either why Apex doesn't invest in the Google ecosystem as it's just as prominent if not more over Alexa. That aside, I have google controlling mine *however* I'm also running Homeassistant as my home's automation platform and using the Apex integration there. This effectively enables my Homeassistant control my apex where I already have google home issuing voice commands to it. I'm able to say "feed the fish". Works fine, but again not native between Google and Apex directly so only good for anyone already using Homeassistant.

Bit of caution though.. I only exposure my feeder to the voice assistant so I don't accidently turn off pumps if it hears me incorrectly. I've accidently turned off my entire tank in my early days because I told it to turn off my office and my tank happens to be mapped to the office on the platform. Other bonuses are that you're now fully integrated so you can run automations off the apex status. for example I have automations running that looks for events where the pump is accidently left off. I have full reports on every data point. I know when one of my T5 bulbs burn out because the power drops by x watts. Many of these you can run on the Apex, but I have a very elaborate home automation ecosystem so want everything in one place.

https://github.com/itchannel/apex-ha
 

TOP 10 Trending Threads

As a buyer, how important are auctions to you on the NEW market?

  • As a buyer I like them

    Votes: 36 33.6%
  • As a buyer I don’t care for them

    Votes: 43 40.2%
  • I don’t care either way.

    Votes: 28 26.2%
Back
Top
Home
Post thread…
Market
What's new