Neptune Apex controller

The Done vs Next thing is something I saw a lot. I think it’s just a weirdness of ST. Done and Save have no actual difference at this point, I don’t think. I’ve seen that in my version as well and it never really mattered.

The second screen just means it saved the ip and is waiting for the hubaction to get sent and the response delivered.

I’d guess a networking issue between your apex and your ST hub at this point. Everything seems in order otherwise based on your logs. It asked ST to send the hubaction and is waiting for the response to be delivered. Either your apex didn’t receive it, your apex didn’t respond to it, or ST never sent it in the first place. I don’t have any way of confirming that the hubaction is sent that I know of.

If this is a bug in the smartapp, I’m not sure how to find it. I’ll see if I can whip up something in CoRE to test connectivity.

I appreciate all your help. I’ll probably let it slide for awhile and look at it again down the road. Again, thanks.

Hi James,

I can’t seem to remove the smartapp from smartthings app.I get an unexpected error occurred error.

I modified the code to remove the poll every minute. I just want to get the data on demand. But app continues to poll every minute. So I figured I may need to reinstall, but now I can’t seem to remove the smartapp.

any ideas?

tnx.

nevermind, I had to delete the outlets one by one before removing the smartapp.

Been a while since I looked at it. You’ll want to look in the logs to see
what the unexpected error actually was.

ok, after reinstalling, I see in IDE scheduled jobs none and now it does not do the poll every minute.

I added all my apex outlets to a room. If I am on the room page and pull down to refresh, it does not invoke the poll. Do you know if there is a way to do the poll on demand when page is refreshed?

I can go to any of the outlet or to TEMP and refresh and it will invoke poll and do the refresh.

I think the best case is to do the recurring poll when smartapp is open (maybe even every 10 seconds), but stop when smartapp is closed. Is this supported in SmartThings framework?

tnx

I don’t think it is but I’m not sure. The reason it’s done the way it is
is so that the apex can be used to kick off events in smartthings (like
alarms). If it only polls with the app open, the history won’t be accurate
and events will only fire when you don’t really need automation.

You’re right that any device associated with the apex can refresh the
entire app. That’s because the apex will only send all the data at once.
All devices get refreshed when any of them do.

Wow, I just came across this thread looking for something completely different! I have a 110 gallon reef fully supported on my Apex system. I never considered even wanting to merge the two controllers. I was looking at some ways I could use Mimo-type devices to engage communications between the to for a couple of cases…for example:

  1. Notify ST of an alarm condition (I find Apex notification to be unreliable).
    1B) Adjust my hue lighting bulbs based on aquarium alarm condition (water level, skimmer overflowing, conductivity, ATO empty, temp all come to mind).
  2. Notify Ecobee and adjust settings if tank overheats.
  3. Offset my lighting routines when the house is in “Party Mode”

I have several temperature sensors, two conductivity sensors and probably 40 something outlets, another 30 virtual outlets. Will I hit any limits if I add this DTH to ST?

Thanks!

I can’t imagine why you would hit any limits but I’ve only been able to test it on my wife’s apex jr. I think ST has a limit of 255 sub-devices but that’s the only one I can think of and you’re well under that.

I also find the apex notifications to be unreliable and also kinda dumb in their limitations. For example, why would you not want to strobe all your bedroom lights pink whenever your auto topoff activates? and yet it’s not supported natively by apex.

Okay, all kidding aside, let me know how it works out for you. It’s been running fine for us since I made this thread but it may require some light fiddling to use with a controller that’s not the apex jr.

Enjoy!

1 Like

caddr

Is there a way to see and use the 24v outlet ports on the apex? I can only see the main 8 outlets.

I’m sorry but I don’t have access to that functionality on my wife’s Apex Jr. If you can access that outlet via the web interface, though, I’d say it’s very likely that support can be added easily. I might be able to work with you to get it added if you’re interested in doing a bit of work with me.

The web interface does show the 24v outlets. I will help in anyway i can. I was browsing through the code looking for how you were querying the outlets but i am not that good with code so i was lost.

So, we need to find the type of the outlets in question:

http://email.strudelline.net/c/eJx1UEtvgzAM_jVwo4IkBXrgQLuiHvZUN6SdJicxj5UASwJj_34p026bbPn9fbItMy65QL_NDvljGSz6WL7ihRS7stgvrLhgdE7eHoJj_dTE0WlWLx8e2R_ubub9Ka_Up8dCBW23qVcrBuU3WUhiEKlkjMltAsBpyCKSyLSigqbIKr_LGmtH49HcI4XTurXNxK9ol7yDQgO9BN2iQVc4K9D2uWn72tzjaKce8xEX1-DdwJ1TYCxqF5jrIIyO-A-W_gcagMMGYuh7FHZjtPivVethmL88Qm_jna-zlduuS7j7IyJDCdtqBymGNKYhjxIeAUUnMkm5-4psjRgmbfD3Md8b3Hk_

You need to go to the IP of your apex controller and /cgi-bin/status.json

Then we’ll find the “type” value for the outlet in question. This is how
it’s mapped for the outlets I have access to:

http://email.strudelline.net/c/eJx1UMlugzAQ_Rq4EWGzHzhAGpRDV6VF6qnyMgE32FDbUPr3dah6azWj2d_T6PGScsrAF-W-emyDVR_aV7jgpmibeo2bC6BT9vYQHLqnPkXHRb58eLje390s9bE6y08vDiURw67bIhul35dFigByKBhOEM9pTHLMkoymGQKEiiTzh7K3djJeVHm4cd4J28_0inbNO5FgiOJECzDgBidJtH3uherMPUx2VlBNsLoFHUbqkiTGgnaFuR6SyRH_waJ-oAFx2ICNSgGzO6PZf6tOj-Py5eHoFkWhr8uN3G5fOAEQ5iEnybkgOYRRGoUUZRSRCJzxLKdOFi4MG2dt4FeZb0ZaeRw

In my case, it’s “outlet”. I’ll need to know what it is for yours, too.

After that, we’ll need to figure out if this function works still:

http://email.strudelline.net/c/eJx1UMlugzAQ_Rq4EWETlhw4QBqUQ1eljdRTNbbHQIOB2obSv69D1VurGc3-nkZP5Ewwjn6b74vHc7Dow_kVL7Tanaty2VYXJKf07SE41E9NQo6zevnwaLm_u5nLYyHVp7cNFbTdpl4jH5Tf5IIjlVJkUZxyzmJCOIllCBIYcCkT4nd5Y-1ovKjwaOW8bm0zsSvaNe-g0EAvQLdo0A1OCrR9btq-Nvc42qnHYsTFLVg3MJcUGIvaFeZ6CKMj_oOl_4EG4LABH_oeud0Yzf9b1XoY5i-PRrc0TX2dr-R2_cIJQKgIBcRyBxmGURKFjKSMQITORJoxJ4toDR8mbfBXmW_h43q5

I got this info by going into development mode in my browser (I think it’s
F12 on most browsers) and clicking on the switches for the outlet and
seeing what it sends in the network tab.

That’s what’s gotta get done to update the device type. Let me know if any
of that makes sense or doesn’t and we can go from there :smiley:

I think this is what you need.

{“status”:[“OFF”,“”,“OK”,“”],“name”:“RefLight_2_7”,“gid”:“”,“type”:“outlet”,“ID”:14,“did”:“2_7”}
,{“status”:[“AOF”,“”,“OK”,“”],“name”:“Fan_2_8”,“gid”:“”,“type”:“outlet”,“ID”:15,“did”:“2_8”}
,{“status”:[“AOF”,“”,“OK”,“”],“name”:“DC240_kA_2_9”,“gid”:“”,“type”:“24v”,“ID”:16,“did”:“2_9”}
,{“status”:[“AOF”,“”,“OK”,“”],“name”:“LinkB_2_10”,“gid”:“”,“type”:“24v”,“ID”:17,“did”:“2_10”}
,{“status”:[“OFF”,“0”,“OK”," 0",“0”,“050”,“0”],“intensity”:0,“name”:“Cor_3_1”,“gid”:“”,“type”:“cor|15”

These are actually the two that i would like

24v
cor|15

Nice.

I’m guessing from the “intensity” that that’s a variable light. I don’t
know anything about how to control those but maybe we can learn.

The 24v can probably be operated like a normal outlet. Here’s how I
discover the correct things to send to the Apex (I pressed F12 in Chrome
for this view):

In this case, I’d told it to turn off. 1 is off, 2 is on, 0 is auto.
Heater_state is the thing to send to change its state to one of those
values.

This can be extended to just about anything that can be controlled from
this admin page but the numbers are key. Any state you want supported
needs to be mapped to something similar in smartthings. Things like
dimmable lights get mapped to a percentage; things like outlets get mapped
to on/off/auto like our heater.

The Cor15 is actually the main return pump on there 24v 1Link connector. Which should still have the on off auto commands

My dashboard is a little different on the 2016 and does not seem to show the same as yours!

Ah, sorry. I forgot a key element. The status.cgi calls happened when I
clicked on the control I wanted to change. In order to map out the values
we care about for your devices, I need you to click on all the available
options and send me the “Query String Parameters” associated with each
action. For me, that was Heater_state: 1 and noResponse: 1 for off (and 2
and 0 for on and auto).

Is there an updated version. Of this app? The code is 4 months old. Or is that still the current one?

Thanks. Really interested in this.

well if i am doing it write i get none of that info.

So in this example i i change one of the 24v ports from off to auto and i get no “Query String Paramters”. I get Request Payload

{status: [“AUTO”, “”, “OK”, “”], name: “LinkB_2_10”, gid: “”, type: “24v”, ID: 17, did: “2_10”,…}
ID
:
17
did
:
“2_10"
errorCode
:
0
errorMessage
:
”“
gid
:
”"
name
:
"LinkB_2_10"
status
:
[“AUTO”, “”, “OK”, “”]
type
:
“24v”

Everything else after the request is just a status update with no info relating to any devices.