#thread it

1 messages ยท Page 1 of 1 (latest)

serene otter
#

thread

sweet salmon
#

Hmmm. was there any stack trace from the integration failure in ha log?

sweet salmon
#

what was the details from the exception?

#

any reason why it rejected the tls?

serene otter
sweet salmon
#

sec checking source

serene otter
#

thanks

sweet salmon
#

and you're positive verify_ssl is set to false?

serene otter
#

I don't know how generic camera process it but the Verify SSL certificate checkbox is not checked

sweet salmon
#

The code seems fairly clear

    verify_ssl = info[CONF_VERIFY_SSL]
    auth = generate_auth(info)
    try:
        async_client = get_async_client(hass, verify_ssl=verify_ssl)
        async with timeout(GET_IMAGE_TIMEOUT):
            response = await async_client.get(url, auth=auth, timeout=GET_IMAGE_TIMEOUT)
            response.raise_for_status()
#

are you running latest HA? there were a few changes there this month

serene otter
#

yes, latest stable release(don't know if there are any beta)

sweet salmon
#

I never used this module btw

serene otter
#

right

sweet salmon
#

homeassistant/components/generic/config_flow.py
from your exception

serene otter
#

hmm

#

could it be httpx?

#

requests work but home assistant uses httpx?

sweet salmon
#

I just installed the module, and pointed it my reolink camera, and it works OK

serene otter
#

huh

#

how

#

(also reolink here)

#

Coincidence lol

#

I mean

#

cam works

#

still image don't

sweet salmon
#

What url did you use? My config is

    {
        "entry_id": "1ad0d5de8abe895b180256fe50502902",
        "version": 1,
        "domain": "generic",
        "title": "192_168_30_208",
        "data": {},
        "options": {
          "still_image_url": "https://192.168.30.208/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=xxx&user=admin&password=removed",
          "rtsp_transport": "http",
          "authentication": "basic",
          "username": "admin",
          "password": "removed",
          "framerate": 2.0,
          "verify_ssl": false,
          "content_type": "image/jpeg",
          "limit_refetch_to_url_change": false
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }
#

I can probably remove one of the passwords

#

HA internal config is in /config/.storage/core.config_entries

serene otter
#

just like your url?

#

except with a non-admin user

sweet salmon
#

yeah I'm slack

serene otter
#

I mean

#

admin can't do much on a cam anyways

#

but how

#

why yours works and mine don't

sweet salmon
#

I even have the same shitty cert that you do ๐Ÿ™‚

โฏ echo | openssl s_client -connect 192.168.30.208:443 | openssl x509 -text -noout | head
Can't use SSL_get_servername
depth=0 C = CN, ST = GD, L = SZ, O = certificate, OU = certificate, CN = certificate, emailAddress = certificate@certificate.com
verify error:num=18:self-signed certificate
verify return:1
depth=0 C = CN, ST = GD, L = SZ, O = certificate, OU = certificate, CN = certificate, emailAddress = certificate@certificate.com
verify return:1
DONE
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 1 (0x1)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = CN, ST = GD, L = SZ, O = CERTIFICATE, OU = CERTIFICATE, CN = CERTIFICATE, emailAddress = CERTIFICATE@CERTIFICATE.com
        Validity
            Not Before: Jun  6 12:18:57 2022 GMT
            Not After : Jun  1 12:18:57 2042 GMT
        Subject: C = CN, ST = GD, L = SZ, O = certificate, OU = certificate, CN = certificate, emailAddress = certificate@certificate.com
#

check all the settings I had above, maybe one is different for you?

#

But to be frank, most of those won't matter until after you get a TLS connection

#

Try making a new generic camera from scratch? just incase magic broke?

#

AFK going to have a shower now, back in 10

serene otter
serene otter
sweet salmon
#

copy my url and change the u/p/ip only?

#

Mine's totally working... I see my workshop

serene otter
#

just tried copying

serene otter
sweet salmon
#

Reolink module. Maybe the dev one from hacs. Works well

#

Actually looks like all his stuff merged, so back to core

serene otter
#

not in HACS anymore?

#

now in official home assistant integration list?

sweet salmon
#

yup

#

but it's in core now

serene otter
#

hmm

#

User needs to be admin

#

why

#

what does it do

sweet salmon
#

No idea

serene otter
#

no https?

sweet salmon
#
      {
        "entry_id": "0d81a8deccb455c13fe4d8d5336baae5",
        "version": 1,
        "domain": "reolink",
        "title": "NVR",
        "data": {
          "username": "admin",
          "password": "removed",
          "host": "192.168.30.208",
          "port": 443,
          "use_https": true
        },
        "options": {
          "protocol": "rtsp"
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "removed",
        "disabled_by": null
      },
serene otter
sweet salmon
#

Watching tv. Ask me tomorrow

serene otter
sweet salmon
#

From the config json in .storage

sweet salmon
#

Did you get this sorted?

serene otter
#

I need that for 2 way audio afaik