Giter Site home page Giter Site logo

H200 support about tapo HOT 23 OPEN

cecchisandrone avatar cecchisandrone commented on May 24, 2024
H200 support

from tapo.

Comments (23)

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

What functionality are you looking for?
I believe that there's a high chance that the one that exists for H100 will work for H200 too. Have you tried it?

from tapo.

cecchisandrone avatar cecchisandrone commented on May 24, 2024

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

If you end up giving it a try, please let us know how it goes!

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

Hello,
I just testing H200 and looks it not working:
cargo run --example tapo_h100 Finished dev [unoptimized + debuginfo] target(s) in 0.13s Running target/debug/examples/tapo_h100 Error: Http(Error { kind: Timeout, context: None, source: Some(Error { description: "Timeout was reached", code: 28, extra: None }), source_type: Some("curl::error::Error"), local_addr: None, remote_addr: None })

When I triedL530 it works.

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

Hmm, a timeout error is not what I was expecting.

Can I double-check that you've pulled the correct IP address from the Tapo app?
Also, can you please post the logs you get from RUST_LOG=debug cargo run --example tapo_h100?

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

Sure

My IP is right, because I have static IP for HUB

Linux:
tapo_hub

Tapo mobile APP:
tapo_hub2

Linux ping:
tapo_hub3

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

Interesting.

As a test, could you please replace the contents of the is_passthrough_supported function with Ok(false) and then see what RUST_LOG=debug cargo run --example tapo_h100 outputs?

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

It looks same:

tapo_res

idk...

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

I just tried IP in browser. When I try L530 I will get 200 OK but when I try HUB 200 I will get time out...

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

Hmm, I get timeouts with H100 when I try to access it from a different network adapter (H100 on Wifi and a PC on LAN).
Is it the same case for you?

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

Ok, HUB 200 is probably using port 443 (HTTPS), when I try it in browser I will get: {}

tapo_res2

tapo_res3

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

Hmm, I get timeouts with H100 when I try to access it from a different network adapter (H100 on Wifi and a PC on LAN). Is it the same case for you?

I dont have H100

On H200 I will get always timeout on port 80

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

I was wondering if you have the same setup as me, with the hub on wifi and a PC/laptop on LAN (or a different Wifi) trying to call it.

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

If you want to try it over HTTPS, you can change the URL at

let url = format!("http://{}/app", ip_address);

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

If you want to try it over HTTPS, you can change the URL at

let url = format!("http://{}/app", ip_address);

Problem with SSL:
Error: Http(Error { kind: BadServerCertificate, context: None, source: Some(Error { description: "SSL peer certificate or SSH remote key was not OK", code: 60, extra: None }), source_type: Some("curl::error::Error"), local_addr: Some(1.1.1.100:41144), remote_addr: Some(1.1.1.111:443) })

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

I was wondering if you have the same setup as me, with the hub on wifi and a PC/laptop on LAN (or a different Wifi) trying to call it.

I have:
router -> switch -> server, hub 200, PC, Access point

I am on PC and try it with PUTTY from server.
Hub is connected with LAN

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

I found this:

petretiandrea/home-assistant-tapo-p100/issues/578

They have same problem


I am going out, will be back later

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

Argh, I was afraid of this. This library also supports only the legacy protocol and the newer Klap one.

It might be worth doing one last hurrah and disable the SSL verification by replacing https://github.com/mihai-dinculescu/tapo/blob/main/tapo/src/api/api_client.rs#L68 with

        let client = HttpClient::builder()
            .title_case_headers(true)
            .ssl_options(isahc::config::SslOption::DANGER_ACCEPT_INVALID_CERTS)
            .build()?;

But I wouldn't hold my breath.

I'm considering purchasing a camera and/or H200 to look into the third protocol in the following weeks/months.

from tapo.

JeyC0b avatar JeyC0b commented on May 24, 2024

Ok,

I tested with ssl_option and same problem:
tapo_res4

from tapo.

Nereuxofficial avatar Nereuxofficial commented on May 24, 2024

Argh, I was afraid of this. This library also supports only the legacy protocol and the newer Klap one.

It might be worth doing one last hurrah and disable the SSL verification by replacing main/tapo/src/api/api_client.rs#L68 with

        let client = HttpClient::builder()
            .title_case_headers(true)
            .ssl_options(isahc::config::SslOption::DANGER_ACCEPT_INVALID_CERTS)
            .build()?;

But I wouldn't hold my breath.

I'm considering purchasing a camera and/or H200 to look into the third protocol in the following weeks/months.

Hey, I am currently having the same issue. Is there any implementation of the Tapo Camera protocol or documentation of it? I'm having a really hard time reversing it.

I have some network logs and it seems to encrypt communication pretty swiftly on the latest version. It seems to use AES-256-CBC-PKCS#7.

from tapo.

mihai-dinculescu avatar mihai-dinculescu commented on May 24, 2024

Having a look at the decompiled tapo app would be my first port of call.

Also, this library might might be a useful source of inspiration.

from tapo.

petretiandrea avatar petretiandrea commented on May 24, 2024

It uses a different protocol, like the one used by Tapo Camera

from tapo.

Nereuxofficial avatar Nereuxofficial commented on May 24, 2024

It uses a different protocol, like the one used by Tapo Camera

Yes, however it seems to have changed protocols again in a newer firmware version. In this issue someone seems to have gotten it working, however an authentication packet on the latest firmware looks like this:

{
    "method": "login",
    "params": {
        "cnonce": "9AAF7F6F13190C8F",
        "digest_passwd": "5BBC5A0C5B08876DA6F08A0380AC60ECE55EE135FB8610010E580BEF0A2C37FD9AAF7F6F13190C8F080693488D027476",
        "encrypt_type": "3",
        "username": "admin"
    }
}

Whereas authentication previously looked like this:

"method": "login",
            "params": {
                "hashed": True,
                "password": self.hashedPassword,
                "username": self.user,
            },

If anyone knows how to reset it to the previous authentication mechanism please let me know, i tried resetting the hub and using another fresh account already but the encryption persists for all requests.

from tapo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.