itchannel / apex-ha

Local Neptune Apex HA Integration (Aquarium Controller)
GNU General Public License v3.0
19 stars 3 forks source link

dont connect to Apex Classic #7

Open rostikator opened 1 year ago

rostikator commented 1 year ago

after install over HACS add new device user password ip

2022-08-17 16:40:27.462 ERROR (MainThread) [custom_components.apex.config_flow] Failed to authenticate with Apex Controller

rostikator commented 1 year ago

image

image

image

MikeTV1 commented 1 year ago

Getting the same on a Jr.

Apex Firmware version requirement?

rostikator commented 1 year ago

AquaController Version |  4.53_AB17 Dashboard Version | 4.53_AB17

MikeTV1 commented 1 year ago

I'm using the same. Hopefully ITChannel will have some suggestions for us soon. I may try updating to the latest firmware here shortly and see if that has any affect. But I suspect this is just for the new lines of controllers and not the classics. It's trying to authenticate against a /rest/ folder that does not exist on ours.

rostikator commented 1 year ago

with latest 4.53_4D19 , same reason

rostikator commented 1 year ago

now Im reading just energy consumption over

sensor:

itchannel commented 1 year ago

@rostikator @MikeTV1 Can you please log into your controller locally and see if you get data back when visiting /rest/status. Also if you use dev console in chrome/firefox and go to the networking tab can you send me a copy of the responses your getting from the controller e.g. like below:

image

I've only tested on the original Apex running firmware: 5.06_2B22

Happy to add in support for your models but will require more information if the API calls are different.

Also worth mentioning the controller can be very unstable when logging in or at least mine is so sometimes setup fails and you just have to try a few times. Still looking at the best way to deal with the instability (guessing as my controller is very old)

If you're missing the /rest directory I might need someone to share a screen with me so I can work out all the different API calls with someone as I use /rest/login to get the login tokens and then /rest/status to grab details. It appears I also have /cgi-bin/status.xml on mine unauthenticated but lacks a lot of information compared to the json API.

rostikator commented 1 year ago

IP/rest/status get back 404

rostikator commented 1 year ago

image

itchannel commented 1 year ago

image

Thanks. Could you send me the url of your status file in the screenshot and also a copy of the json in it. Hoping it contains the same info as the /rest/status one just a different location.

rostikator commented 1 year ago

STATUS I read from this location just power consumption for now http://192.168.1.252/cgi-bin/status.xml image

rostikator commented 1 year ago

http://192.168.1.252/cgi-bin/outlog.xml

image

itchannel commented 1 year ago

@rostikator Thanks for the screenshots and I could read from the status.xml but ideally I want to get all the information from the controller including setting outputs etc which isn't possible from the unauthenticated status xml.

I did see in your screenshot that when you visited the controller it is calling a status.json file. Can you send me the URL of that and it's contents as I wonder if the older controllers just have it in the web root rather than /rest

MikeTV1 commented 1 year ago

Original Apex Jr. http://192.168.0.200/cgi-bin/status.xml

.txt added to allow it to upload to github, no other changes made to the file. status.xml.txt

There are also the output / probe logs as @rostikator posted, but I don't know if they are helpful unless you are importing history. status.xml is all the live states.

http://192.168.0.200/cgi-bin/datalog.xml http://192.168.1.252/cgi-bin/outlog.xml

itchannel commented 1 year ago

@MikeTV1 @rostikator out of interest can you toggle outputs etc on the local dashboard on the Apex Jnr/Classic like you can with the newer devices. If so would you be able to toggle one and send me the network calls. I can add in support for the older status.xml but it would be nice if I could make it interact with the controller as well.

itchannel commented 1 year ago

@rostikator @MikeTV1 I've added support for legacy devices using the status.xml file (Just add the device and put any username/password). For now it is only read only so you can see all the inputs and outputs in HA but can't toggle switches etc.

If I can spend some time with someone to go through all the calls and how the old interface allows for toggling I might be able to add the same level of functionality as the newer version.

rostikator commented 1 year ago

still same 2022-08-30 09:10:36.194 ERROR (MainThread) [custom_components.apex.config_flow] Failed to authenticate with Apex Controller

MikeTV1 commented 1 year ago

Getting the same as rostikator, can't add the integration due to the above error in config_flow

Not sure if this is what you are looking for, but switches can be changed by the following URL

http://{username}:{pass}@{IP Address}/status.sht?{Switch Name}={0,1,2)&Update=Update

0 = Auto 1 = Off 2 = Manual On

B2-LedLights Manual On http://admin:pass@192.168.0.200/status.sht?B2-LedLights={2)&Update=Update

B2-LedLights Auto http://admin:pass@192.168.0.200/status.sht?B2-LedLights={0)&Update=Update

h8ed208 commented 1 year ago

I just found this add on and installed it, restarted HA and tried to connect to my Apex Classic and am getting the same result. I thought it might be because of my network settings (had the Apex on a different VLAN) so I switched it and am getting the same results. I can log in just fine locally and make changes but can't get this to work. Any suggestions? Anything else I can provide that hasn't been provided yet? Thanks for any help.

oralallen82 commented 8 months ago

I also have the older Apex Jr. I'd be happy to assist in determining how we can get this to work.

dkramarc commented 3 months ago

I made a PR for fixes for Classic (https://github.com/itchannel/apex-ha/pull/46), so you can see if that works for you till/if the PR is approved.

My fork/version is here: https://github.com/dkramarc/apex-ha

oralallen82 commented 3 months ago

I made a PR for fixes for Classic (#46), so you can see if that works for you till/if the PR is approved.

My fork/version is here: https://github.com/dkramarc/apex-ha

I was successfully able to add it and I can now connect to my older APEX Classic. Thanks a lot.

mzdimal commented 2 months ago

I made a PR for fixes for Classic (#46), so you can see if that works for you till/if the PR is approved. My fork/version is here: https://github.com/dkramarc/apex-ha

I was successfully able to add it and I can now connect to my older APEX Classic. Thanks a lot.

I can confirm the PR is working nicely with my Apex classic. I was expecting this to only work for read-only mode, but it seems the on and off functionality also works.

@itchannel @dkramarc I will be donating once this PR is merged into the main! Great job!