[PROJECT] Driver for Neptune Systems Apex

Couple things:

  1. URL field does not need the destination file. Just "http://192.168.0.134" (without quotes) from your example above. The driver puts the last part on automatically since that does not change. But people could use https, all sorts of IPs, or different port numbers.
  2. For the browser link, you have an extra /. It should just be http://192.168.0.134/cgi-bin/status.json. If that does not work, try the older xml method: http://192.168.0.134/cgi-bin/status.xml

Got it! Thanks! Next question, Do you have any rule setup to notify say a pushover alarm for notification?

I'm wanting to setup notifications through pushover when my ATO container is full and one when it's empty to start.

At this time the driver is not set up to do that. The problem is how events/attributes get to the Rules. You can have the Rule check Custom Attributes, but those attributes have to be spelled out in the driver in advance. I made the driver have a bunch of "common" attributes, an Apex can have DOZENS. Each one can be renamed by the Apex owner and gets reported as that name, not any particular standard that I can identify them on.

So... that means there are lots of things I cannot make attributes for. Attributes CANNOT be dynamically created (I have asked, this driver would make good use of it), they all need to be created in advance.

EDITED: I said I would do this "today" but I already got it done... So version 0.96 is now posted.
The driver is now updated to have 4 custom attributes you can use in Rules. They are all numbers (because that is how Apex puts things). They are named:
ApexNumber1
ApexNumber2
ApexNumber3
ApexNumber4

In the preferences, you need to enter the name of the input you want to be represented by each. For example, in my testing I set ApexNumber1 to be "SumpLo" because I have an input named SumpLo. It connects to a float switch and displays as open/closed in the Apex, but is reported as 0 (Open) or 60 (Closed).

So now, I can use a Rule that tests for Custom Attribute "ApexNumber1" to see if it is > 0. Then do things if it is (or the other way around of course).

Thank you!!! I have an ATK on order now but have tunze floats in my DI barrel. I have two optical sensors on order for my salt barrel as well. This will help!

I have an ATK as well. It monitors both my marine holding tank and my freshwater sump with optical sensors. I have 3 float switches connected to the Apex itself in a water holding "barrel". I wish the ATK had more than 4 inputs so I could use optical ones there as well but I am not willing to buy a second ATK just for that.

Let me know if it works out for you.

I bought the leak detection kit for leak sensors which includes the FMM module. I have that in my closet under my stairs where my water barrels are. I have a PM1 module to hook up a BoB for the floats in the fresh water barrel and using the two remaining ports on the FMM for the high and low opticals for the salt barrels. I’ll install the FMK with opticals on my sump in another room and add a 3rd optical for a low water level sensor to shut off my return pumps. I’m using a Versa pump to move fresh and salt water from the closet to my fish Room.

The only thing I wish I could report on now are the output for my solenoids being AON or OFF. Custom attributes only use numeric values.

I was looking to report not only the barrel being full but also notification that the solenoid was shut off.

Hmm... Those are in the outputs section so it CAN read them. This is getting to be a lot of preferences, but let me see if I can break these out a bit and make them "optional" preferences that can be hidden for those that do not need them.

Annoying part is that I second-guessed myself here. When I originally made them I made 2 string attributes and 2 number attributes. But I thought, all the inputs are numbers anywhere so who is going to use the strings. :slight_smile:

EDITED: Version 0.97 is now posted.
Added ability to have custom attributes (2 number and 2 strings) for outputs.
Renamed the custom input attributes, sorry but this means anyone already using them will have to put that in again.
Added preference to show/hide the custom attribute section of the preferences. They are hidden by default.

I’ll have to update with the latest and then test again once I have my mixing barrels ready to fill. I just received my optical sensors in the mail today.

Great job!!!

So i updated but I’m not sure it’s showing correctly?

AOF is how Neptune Systems Apex systems report an output that is set for Auto control and is currently OFF.

The values you can expect for outputs like that are:
AON = Auto / ON
AOF = Auto / OFF
OFF = OFF (not under Auto control)
ON = ON (not under Auto control)
TBL = "Table Data", which is for variables like light dimming or variable speed pumps

So it looks to me like your ATO Fill solenoid if it is supposed to be off at the moment.

Yes that’s correct but the as you can see it’s not actually setting the custom attribute under the state variable. It’s empty. When I try and configure a rule it’s showing null value. I’m guessing it’s because custom attribute only allows numeric values?

Is there anyway to put any logic into the script that says if it reads the output value as off use value 0 and if on use value 1?

So I checked and I was able to make a trigger that contained it, or changed for that matter:
Apex Marine becomes ApexOutputString1(AOF) contains AON

You cannot have one of the AOF/AON outputs in number attribute, that will not work because they are strings (you probably have errors in your log if that is what you were actually trying). But you can easily have that go to one of the ApexOutputString attributes and then test it directly.

What trigger are you using? Custom attribute?

Do you mind sharing a test rule showing how you have it setup?

Just created one as an example since I was not using this capability previously.
What I have below is a Rule that is triggered if ApexInputNumber3 is below 60. ApexInputNumber3 gets data from my Apex Input Switches, that particular one is labeled IOGood in my system because it is hardwired to always be closed. If it goes open (it happened when I first made my breakout because I did not think of this) that means my IO switches are no longer connected to the Apex. This is a problem because they are controlling a water valve that fills a holding tank as well as some ATOs.

Anyways... The Apex is programmed not to let any of the water filling or ATOs run if IOGood is "not good" ie: Open (represented by a 0 in the data). This Rule has conditional actions as a result. If IOGood IS less than 60, it will check ApexOutputString1 and ApexOutputString2 to make sure these are not on (these show my more problematic ATO and the RoDI Valve respectively). If for some reason either of these two are on when they should not be, it sets a group of lights I use for status purposes to Blue (which is my color indicating water/aquarium problems).

Apex Rule

@snell Thanks for creating this! Finally was able to come back to this after many weeks of work related to the pandemic and I must say I'm very very happy that I can now customize alarms and notifications through hubitat instead of the generic Apex alarm interface. Much more intuitive!!! Thank you!! I have notifications for my water barrels full / empty & filling, my mixing barrels full / empty & filling, my mixing pump being on or off indicating actual mixing of my water (helpful when I ask someone at home to add salt and press a button to start mixing so I know they actually did it), leak detection sensors alert when wet, and if my BOB goes unplugged... I'm looking forward to many more things as my build progresses.

Based on some things learned with my weather drivers, there will likely be some big updates coming in the near future.