bgbraga / homeassistant-apsystems

An APsystems Sensor for Home Assistant
Apache License 2.0
21 stars 13 forks source link

Captcha #7

Closed danilodene closed 2 years ago

danilodene commented 2 years ago

As of today this integration has stopped working because AP Systems has added a verification code to their login page

image

andrebbruno commented 2 years ago

Yes I think this one is dead - one other guy has a fork but did not update anything as of yet - https://github.com/skelgaard/homeassistant-apsystems @bgbraga are you still supporting this one?

artupi commented 2 years ago

If you don't care about privacy of production data there's option in setup to image This will generate Autorized id, which can be used to build link to access data without login. Link can be build like this: https://apsystemsema.com/ema/intoDemoUser.action?id=hereGoesAutrizeId&locale=en_US. @bgbraga can you change integration to workaround captcha problem if there's no other way?

Artur

andrebbruno commented 2 years ago

@skelgaard - any chance to have this option?

skelgaard commented 2 years ago

that is the option i'm working on to get to work on. as said on my own issue, i'm not a python coder, so i have to learn how to use thoose python functions to get around it... but i hope to have something working within the next couple of days

artupi commented 2 years ago

Hi,

I found solution to workaround CAPTCHA problem by not using APSystems web page at all. I'm scraping my ECU-C unit to get current production data. To create max power entity I use home assistant's sql platform with query like: `

` I still hope that @skelgaard will manage to update the integration. This is just in case.

Artur

dclobato commented 2 years ago

Hi,

I found solution to workaround CAPTCHA problem by not using APSystems web page at all. I'm scraping my ECU-C unit to get current production data. To create max power entity I use home assistant's sql platform with query like: `

  • platform: sql queries:

    • name: "Max Power dzień" query: > SELECT MAX(CAST(state as decimal)) "MaxPowerToday" FROM states WHERE entity_id = "sensor.ostatania_zarejestrowna_Power" AND state != "unknown" AND state != "" AND state !="unavailable" AND date(created) = date(date("now")); column: "MaxPowerToday" unit_of_measurement: "W"

` I still hope that @skelgaard will manage to update the integration. This is just in case.

Artur

There is another integration that queries the ECU directly. I'm using it

https://github.com/ksheumaker/homeassistant-apsystems_ecur

artupi commented 2 years ago

This is for different type of ECU (ECU-R). I tested it but it hanged up after a day of work. Artur

andrebbruno commented 2 years ago

This is for different type of ECU (ECU-R). I tested it but it hanged up after a day of work. Artur

I was able to install just fine, but will wait for a few days to see if it´s good or not. In the github´s page, it states some problems with capturing data and one thing that might help is to turn it off during the night because of systems update, did you try just in case?

skelgaard commented 2 years ago

i have pushed a new release on my version with a fix for this... do say if you have any problems with this

andrebbruno commented 2 years ago

sounds like they removed captcha now ...

danilodene commented 2 years ago

Captcha removed, but the login url has changed.

I make a pull request to fix it