Neptune Apex controller

project_pets
aquarium

(James Andariese) #1

Initial version of an integration with the Neptune Apex controller. I only have an Apex Jr to test with so if you have another and want to give me some feedback, that’d be awesome.

Currently, it can report temp and activate feed mode. I’ll integration outlets at another time if I find it useful.

It requires you to have setup your local network access. I recommend giving your controller a static IP if you haven’t.
You configure this with the IP, user, and password (default is ‘admin’, ‘1234’) and it’ll do the rest (fingers crossed). Here are some docs:

http://support.neptunesystems.com/support/solutions/articles/3000017576-how-to-access-your-classic-dashboard-pc

glhf!


Neptune Apex integration
(Brian Spranger) #2

I sold my reef this spring but this would have been useful to extend the automation.


(Garrette Grouwstra) #3

@caddr Thanks for this! its great for displaying the temperature. I see you have some bits in there for adding outlets, but no devicetype mapped. Are you working on one?


(James Andariese) #4

The MVP was really to be able to get the google Home to be able to turn on feed mode (and control outlets that way).

Since I didn’t need it, I didn’t work on it. I wouldn’t be opposed to finishing it either though as long as it’s going to be useful to someone :smiley:

Alternatively, if you’re able and willing, I’d be very happy to incorporate a PR.

On an unrelated topic, if you end up using this, let me know if you experience delays or a lack of updates to the temp on occasion.

It seems to be just delays in getting the hubaction sent to the hub and not actually any error but I don’t experience it with any other devices so I’m not sure what’s up. I’m guessing things like hue bulbs (which also need hubactions) get preferential processing compared to custom installed apps but I don’t know enough about smartthings to be sure.

If you use feed mode, sometimes it’ll take a minute to actually turn on. It will turn on but feels like it takes at least three eternities to do so when your hands are covered in saltwater.


(Jim Maddox) #5

Hi
Great Idea for a app. I have the apex 2016 model and when I choose the outlets and probes I want use I get the error “Error Saving Page” It does seem to be connecting to my apex I just cant finish setup.


(Jim Maddox) #6

Never Mind I didn’t install the device handlers. Seems to be working fine on the 2016 version. Are the Outlets suppose to be working? I receive the same error when I try to enable any of those. I have to tell you this is awesome being able to have my home devices interact with the apex.


(James Andariese) #7

Outlets haven’t been implemented yet. I didn’t really see a reason and forgot to take the selections out of the setup code.

After discussing with my wife (the actual reefer… I’m just a developer), she tells me it would be very useful for doing maintenance on her power head.

I’ll be adding it this weekend so stay tuned :smiley:

I’m also pushing an update that forces an update every minute since the polling in the docs (refresh method on device handlers) doesn’t seem to actually happen in the real world. This will make feed mode more reliable and also allow you to actually see the temp fluctuate rather than just when you hit refresh.

If the new code is installed, an update to the previously installed smartapp’s configuration will need to be made to pick up the new refresh code. Adding an unused feed mode switch and removing it is what I did. Any configuration change will trigger the update.


(Garrette Grouwstra) #8

as far as Im aware the Apex interface we can poll is read only, so we couldn’t actually turn off a powerhead.

My use case would be an alarm via ST based on if an outlet is on. For example a “water high in sump”, or “water on floor”. The native Apex alarming is lacking to say the least.


(James Andariese) #9

You absolutely can control things via HTTP through the classic dashboard. Apex Fusion isn’t open for public consumption but we’re not limited to just the status.xml feed locally. It’s just the cloud-based API that’s very limited.

Also, it’d be possible to also expose the alarm status, I think, so you could turn on the audible alarm and get a text whenever the audible alarm goes off (or turn your lights red like I did with our water sensor). But yeah, you could also just setup alarms directly via CoRE.


(James Andariese) #10

Alright everyone interested.

I’ve added some support for outlets. I haven’t had a chance to run this through its paces really so lmk if there are any issues. Nearly no code changed in the smartapp other than adding functions called from the device handler so if anyone is using this currently and has trouble with the outlets, just disable the devices again.

Please report back whether this is working for you or helpful.


(Bob) #11

Thanks for this integration I’ve installed and published the app and handlers for temp and PH but when I set up IP and login (admin, 1234) and next it just says connecting until it times out. I can easily connect using my browser and apex IP. What am I missing? is it supposed to create a device as well? Live logging returns: Parse returned {{ linkText }} has arrived


(James Andariese) #12

Are you sure that your husband and controller are on the same network
segment? Could be a wired vs wireless bridging issue. I only really have
my wife’s Apex Jr to test with and my own network so YMMV in the extreme.

That being said, I’m happy to attempt to help troubleshoot it. If you know
how to grab the logs, that would help immensely. I peppered that app with
all kinds of mostly useless debug statements that I failed to remove so
it’s very likely saying something about why it’s not working in your live
logging tab.

Edit: logging text didn’t come through on my phone. I’ll take a look at what that might mean :smiley:


(James Andariese) #13

That text doesn’t seem to appear in any of my code. When you set it up, you start with the connect app and on the first page, you enter the IP, user, password then it will validate that it can connect on the next page and display all the devices you can create from your Apex.

Are you using the code from this page?


(Bob) #14

yes, installed handlers, then app. go to my apps and enter ip, admin and password. the apex is connected to an ap hardwired to the router. I can enter the ip in safari on my phone and connect to the classic shell but the app never connects.


(Bob) #15

First question is am I supposed to see an entry in My Devices. If I click add device, I see the Apex listed but it requires a network id to add.


(Bob) #16

This is what I get from the live log:
dfc48240-d7ba-47bf-a1f1-f26b41dc43ac ‎12‎:‎42‎:‎35‎ ‎AM: debug still waiting

dfc48240-d7ba-47bf-a1f1-f26b41dc43ac ‎12‎:‎42‎:‎34‎ ‎AM: debug still waiting

dfc48240-d7ba-47bf-a1f1-f26b41dc43ac ‎12‎:‎42‎:‎34‎ ‎AM: debug [headers:[HOST:192.168.1.183:80, Authorization:Basic YWRtaW46MTIzNA==], method:GET, path:/cgi-bin/status.json]

dfc48240-d7ba-47bf-a1f1-f26b41dc43ac ‎12‎:‎42‎:‎34‎ ‎AM: debug first run. sending off hub action


(James Andariese) #17

The devices will appear once you select them in the screen that comes after the one that causes the debug “still waiting” message in the logs.

This is the first screen:

This is the screen that says “still waiting” in the log:

This is where you will select the devices to add. No devices are added until you hit save on this page:


(James Andariese) #18

If it’s saying “still waiting”, it means the refresh is working and your apex just hasn’t responded yet. If I’m not mistaken, there is a delay between when you hit next and when smartthings sends the hubaction to the hub to be performed. I’ve seen it take up to 30s rarely but I also have a great internet connection.

You will need to keep that page open and your phone on in order for it to finish. Just the way the setup pages work, afaict.


(Bob) #19

I get to the second screen but not the third. just uninstalled and reinstalled and will leave it running. Off to bed for now, will see in the morning if it works. thanks for the help.


(Bob) #20

One difference I see is that your second connecting screen has “save” in the upper right corner while mine says “done”