If the json URL works then the driver should... so time to dig a bit deeper. The 401 error is the HTTP error for Unauthorized (meaning it does not have access to the URL). However, that URL is SUPPOSED to be read only without any authentication needed.
So few questions:
Did you login to the Apex on your browser before going to the status.json URL?
Do you have Open XML Access enabled on your Apex (it is in the Apex Network Setup page)?
Once Open XML Access is enabled, what happens if you run the PollXML command, then run the PollJSON commands?
After further checks with @Dohdohdoh we determined the Apex was requiring authentication to check the JSON. A note on how to work with this has been added to the initial post (no changes to the drivers were required).
What are people doing with the apex data in Hubitat beyond alerting on ph, temp etc? I was hoping that I could see amps per outlet but it only seems to display total amps per block.
The older power bars do not report power per outlet so there is not much I can do about that, sorry. That was a feature added with the EB832.
I have used it as an emergency notification primarily or maybe triggering a different type of outlet. While my main tank was running I had a humidity sensor in the canopy that would trigger fans but they would also trigger if the overall tank got too warm as another way to help cool it.
It can also be used for non-aquarium means. The Apex controller (used classic models are sometimes reasonably priced) that can do pH and temperature (and more if needed) can be used for pool purposes, stock tanks, or other stuff.
But mostly? In my case I wanted all my data in one place where I can check it in a combined dashboard of the "house's most critical" elements. I specifically made it read-only just to avoid duplicating the functions of the controller itself. My attitude on that has been changing lately but there has not been any major requests lately. It has been pretty stable.
Thoroughly enjoying this integration - thank you, @snell !
Migrating from kasa strips to my new apex. Learned recently that you can turn devices on and off via curl commands - any way you can build switches for each eb832 plug into the child device? In the event of a water change (or ecotech mobius devices that don't integrate) and the need to turn off for feeding window, this would allow for rule / piston automations. Thanks in advance!
I have generally kept this driver to be "read-only" because the Apex itself should be handling the control of it's respective outlets (and there are far cheaper and easier ones to get than these if you need outlets controlled by a Hubitat).
That said... I HAVE debated about making it possible to control the outlets. But that can run into a lot of potential trouble if Hubitat is setting things one way but the Apex thinks they should be another...
Kind of a dangerous scenario especially when dealing with potentially thousands of dollars of equipment AND living creatures.
I understand and don't disagree whatsoever. To accomplish this today, I'm currently building virtual switches and tying them together with rules in webcore for periods like "water changes", If, however, if you wanted to step down that path in an optional format, I wouldn't be mad at you and i can't imagine i'm along in the desire. Just having the capability would be worthwhile, but the tank owner would need to understand the inherent ramifications of enablement.
I have a thought on how to do it... Not sure I can get an initial version running this weekend, but maybe in the next few days. Thankfully I still have my Apex (I shut down my big system but have not been able to sell it) running a couple pico tanks... Total overkill... But it means I have outlets with nothing in them that I can try out without risk.
Take your time. Honestly. Also, thank you. I just bought an Apex Trident for my IM 40 Nano, so I get the overkill. I’ve got the curl commands. I’m in to help however I can. I’ve found a few API apks too. Please let me know how I can help, if I can.
Actually... if you could PM me a sample chunk from a json at some point that shows the Trident-based information, that would be awesome. That is one I have never seen any samples for so it would love to be able to more accurately identify it.
One thing I really have to decide with this stuff is whether to just make an "edit" possible child device or make more specific child devices (which is working well with some of my other drivers) based on the type of device they represent.
You cannot use that one directly because it is a State Variable. The ones that have attributes are the ones that can be used in Rules and Dashboards and such. Those are also the ones that are Events and are listed in the "Current States" column (there are more attributes for child devices than the parent).
While I made a "power" reading that combines power levels for all the EB832(s), I did not make an attribute for the EB (4 or 8) Amps... that seems like an oversight... I will try to get that in over the next couple days while I am working on the other areas.
Addition of a Total Amps... attribute to the parent driver that should now have the total amps of EB(s) posted as an event
Updated driver version checking method
Some minor cleanup and prep for new child methods
Note(s):
This DOES NOT include changes to support editable children (or Active Control as I will be referring to it). That is still a work in progress... but it is happening. Unfortunately it is unlikely I will be able to release it this weekend or early next week... so it might be out further than I originally expected. That is why I decided to post this "interim" update.