[PROJECT] Driver for Neptune Systems Apex

Nope, update is all you need to do. Maybe Save Preferences just to make sure the version gets written.

Probably because EB4s and 8s do not report power, only Amps used. So grafana has no power to read from them. Unless you were using the Amps and converting it.

Updated Version(s):

  • NeptuneSystemsApex.groovy = 0.99.9 - REPLACED 0.99.8
  • NeptuneSystemsApexChild.groovy = 0.2.5 - REPLACED 0.2.4

Change(s):

  • Initial attempt at supporting Trident data. It should populate alk, ca, and mg in both the parent and child device (if enabled). It also adds the two outputs that the Trident returns data on, selectors. Not sure what those are about but OK.

ADDED CHANGE(s):

  • Correction to adding child devices code. The bug would not affect those that already had child devices created but made a bit of a mess when a new child device was created.
  • Update to driver version checking.
  • Removal of the ClearStateVariables command from the child devices.

Thanks to @cfoos1 for pointing out the child devices error to me.

Hey question for you @snell … I added a PM2 that I had laying around extra but will NOT be using it for Cond. I will be using it to connect a break out box for attaching a pressure switch on my RODI system for filling my drinking water pressure tank. Curious if there was a reason the PM2 only shows up in the presence of a Cond probe? Would like to be able to see the switch states for this BoB. Thanks.

Also, what’s the trick for upgrading through HPM?

Still showing this… confirmed the driver code showing 0.99.9

No trick for upgrading, you have the latest. But it only checks the version info once a day (so I do not get a bunch of people pounding my server) and I do not know a way to trigger a check if the driver itself is changed/saved. So it should "fix" itself tomorrow.

As for the PM2, it should be created as a child device (if enabled) and pull in data just fine including the breakout. But it is tough to distinguish if it is actually a PM2 module unless it reports the conductivity (that was it's only obvious factor when I looked at the specs, since I do not have one myself). So it may not be identified as a PM2.

Plus, this driver treats all child devices the same (since it is read only there is more limited value in making each module it's own driver) so identifying the modules is more for information than function.

I’m sorry I forgot about the 24 hour check in. With that being said it must have just been a little elated on picking up the PM2 because it’s showing as a child device today so everything is good. Thanks!

1 Like

No worries about remembering stuff. Heck, I make these drivers and I am constantly forgetting stuff.

Yup, if you add a module it should add a child device on the next refresh for it. Even if it cannot figure out what a module is. If you have child devices enabled of course.

@snell Fantastic work so far!! I am a total noob to hubitat. I have gotten as far as configuring your driver and can see the Children and states. Now I don't know how to get it to display on a tile in a dashboard. Could you provide a little guidance here please.

It can vary a lot but the main thing you have to do is go into the Apps - Dashboards - then select your specific dashboard. Select the "Choose Devices" and check all the devices you want to be able to show things on that dashboard.

Then go to that Dashboard and follow the "normal" process by hitting the + button, then selecting the device, template and options (if any) then selecting the Add Tile button. In many cases you will need to select the Attribute template because many of the things that these report are not included in the standard templates. Although a key one like temperature is.

I was successful in adding a single attribute. In some cases I would like to have multiple attributes display in the same tile. For example the trident. I was able to fill in the HTML, but it all runs together. It will not recognize the carriage returns. I really want to do this but it seems that everything I find and everyone I ask assumes preexisting knowledge. Maybe some examples of your deployment would help me to reverse engineer? I was not able to find the ecowitt templates you refrence in your code and don't know what to do next.

Yeah... the templates examples are gone because @mircolino left the community and removed all his code. So my old references to his examples no longer work. This is combined with the fact that Hubitat has removed the ability to include HTML tags in Preferences (as a security measure against code injection)... which is why the attributes are running together. I have not worked out a good replacement method and to be honest it has not been a high priority for me.

So I guess this is a prompt for me to get multiple attributes working AND to get some better instructions added. I will try to work this on the coming weekend... Sorry about the delay.

EDIT:
I got an initial version of it working so I have posted the new child driver with the Tile method. No changes needed to the parent driver.

Updated Version(s):

  • NeptuneSystemsApexChild.groovy = 0.2.6

Change(s):

  • HTML Template ("html" attribute) has been replaced by a "Tile" attribute. Tile Template can now be configured in the Preferences in ALMOST the same manner as HTML Templates were but with "[" instead of "<" and "]" instead of ">" to handle the HTML security that Hubitat implemented in 2.2.8 that broke having html commands in preferences.
  • Minor changes to the instructions (removing the broken link to @mircolino's original template method) and a remade example with the updated method. So if you want bolded text [b] to start bolding and [/b] to end bolding. [/br] is used as a line break, etc... Most basic HTML formatting commands should continue to work as they did before, just with the brackets [] instead of <>.

I am wanting to get Neptune data into Influxdb and Grafana running on Home Assistant. However I am a total novice on Neptune and cannot for the life of me see how I install your driver. This maybe a dumb question but how do I install this? cheers

I really should add instructions to it... but here are the basics:

  1. Add the NeptuneSystemsApex.groovy (required) and NeptuneSystemsApexChild.groovy (optional, but recommended) drivers. You can do this by:
    a) Go into the drivers section on your Hubitat
    b) Select the New Driver button
    c) Select the Import button
    d) Copy/paste the NeptuneSystemsApex.groovy link from the very first post into the field and select Import.
    e) Select the Save button.
    f) Repeat a-e for the NeptuneSystemsApexChild.groovy if you will want to enable child devices.
  2. Go to the Devices section on your Hubitat.
  3. Select the Add Device button.
  4. Select the </>Virtual button.
  5. Enter the device name you want, select NeptuneSystemsApex from the Type dropdown, then select the Save Device button.
  6. Enter the URL (typically something like http://192.168.1.x) for your Apex into the Apex URL field and select the Save Preferences button.

Overall, you are done. It will start querying every 5 minutes and populate with the data. If you want to do some more special things you can enter the custom name you might have for a particular temperature field or pH for example. You can also enable the child devices feature. This will create child devices (requires the Child driver to be loaded also) for each Apex module you have attached. This makes it easier to see their individual states and features.

Let me know if this helps.

Does this work with the Apex Jnr version?

It should if the jr provides the status.json or the status.xml. I do not have one myself to check.

I brought one so will check and report back :slight_smile:

I have a classic I am trying to bring into hubitat

2 things

I can get to the json http://192.168.1.86/cgi-bin/status.json

When I configure my IP in the driver and hit poll json I get error connecting to apex:401

Also as a side note Hubitat package manager seems to install 2 child drivers.

The ULR to connect to your Apex should just be http://x.x.x.x/

Leave all the other stuff off the end. Just put in the IP of your apex and make sure your apex is getting a static ip from your router so it never changes.

As @inetjnky mentioned, you do not need to put all the ending info in there, just the IP or Hostname of the Apex (the driver adds the rest).

As for why it would add two child drivers... I have no idea. That seems like it might be an HPM bug because the manifest only has the one child driver in it (which is optional and only needed if you enable the child devices preference on the parent).

I am just using the ip. I meant I can get to json URL in a browser