#Can someone help me with troubleshooting the Dobiss integration?

62 messages · Page 1 of 1 (latest)

old patrol
#

these are my logs

mortal thorn
#

Which custom integration is that? A link to the GitHub repo will help people help you.

old patrol
mortal thorn
#

Check the known issues 😉

old patrol
#

thats me 😭

old patrol
mortal thorn
#

Then the person who can best help you is already aware

#

I have tried installing it with --break-system-packages
and it seems like its installed but i doubt this is the right way
Is really not the right way 😉

old patrol
#

yes i figured

#

do you have any advice?

#

on how to install that

#

i am on ubuntu server lts 24

mortal thorn
#

Install what?

old patrol
#

his pydobiss

mortal thorn
#

And do you use pip install for HA, run it in Docker, or what?

old patrol
#

its running in docker

mortal thorn
# old patrol his pydobiss
  1. Any pip commands you run are pointless then
  2. You don't need to, HA installs it correctly anyway
  3. See (1)
old patrol
#

ow okay so that isnt the problem then

mortal thorn
#

If it was you'd have a very clear error saying that it couldn't find pydobiss

#

You're getting errors from that library/integration, so it's clearly installed

old patrol
#

Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8',

#

i have obviously no clue what i am doing

#

but i am thinking this would be the problem

mortal thorn
#

Which basically says I got HTML when I was expecting JSON

old patrol
#

yes

mortal thorn
#

Which tells me that the problem is most likely with the API

old patrol
#

i was thinking that but i dont think i can do anything to change that right

mortal thorn
#

(that or the way the API is being used)

#

And no, you need the developer to investigate

old patrol
#

the program is running for other people so it would probably be at my end then

#

what is a JWT secret key?

mortal thorn
#

Possibly authentication, or possibly a geo related problem

old patrol
#

geo related?

mortal thorn
#

Many services serve up different responses, or direct you to different systems, depending on where you're connecting from

old patrol
#

well dobiss is from my country

#

and is running in my home

mortal thorn
#

But the API isn't in your home 😉

old patrol
#

thats true

#

aiohttp.client_exceptions.ContentTypeError: 200, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url='https://lecocq.mydobiss.com/session/login' 2024-12-23 12:58:56.406 ERROR (MainThread) [dobissapi.dobissapi] Äuthenticating Dobiss failed: ClientResponseError(RequestInfo(url=URL('http://192.168.0.233/api/local/status'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.0.233', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsImV4cGlyZXNJbiI6IjI0aCIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoibXlfYXBwbGljYXRpb24ifQ.4gHgkAMnYleLEcoihVJPh9pd4KbHyRhvGvCKijF3EbY', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'User-Agent': 'Python/3.13 aiohttp/3.11.11')>, real_url=URL('http://192.168.0.233/api/local/status')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Server': 'nginx/1.18.0', 'Date': 'Mon, 23 Dec 2024 12:58:56 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Powered-By': 'PHP/7.4.15')>) Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/dobissapi/dobissapi.py", line 537, in auth_check async with self._session.get( ~~~~~~~~~~~~~~~~~^ self._url + "status", headers=headers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) as response: ^ File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in __aenter__ self._resp: _RetType = await self._coro ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 834, in _request resp.raise_for_status() ~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status raise ClientResponseError( ...<5 lines>... ) aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='http://192.168.0.233/api/local/status'

#

this should be a new error

mortal thorn
#

You want ``` for code blocks

old patrol
#

i tried to add it now and i think this should work

fathom cometBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

mortal thorn
#

So close to a code block

#

Well, if by close I mean not at all 😛

old patrol
#
2024-12-23 12:58:56.406 ERROR (MainThread) [dobissapi.dobissapi] Äuthenticating Dobiss failed: ClientResponseError(RequestInfo(url=URL('http://192.168.0.233/api/local/status'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.0.233', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsImV4cGlyZXNJbiI6IjI0aCIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoibXlfYXBwbGljYXRpb24ifQ.4gHgkAMnYleLEcoihVJPh9pd4KbHyRhvGvCKijF3EbY', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'User-Agent': 'Python/3.13 aiohttp/3.11.11')>, real_url=URL('http://192.168.0.233/api/local/status')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Server': 'nginx/1.18.0', 'Date': 'Mon, 23 Dec 2024 12:58:56 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Powered-By': 'PHP/7.4.15')>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/dobissapi/dobissapi.py", line 537, in auth_check
    async with self._session.get(
               ~~~~~~~~~~~~~~~~~^
        self._url + "status", headers=headers
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ) as response:
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in __aenter__
    self._resp: _RetType = await self._coro
                           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 834, in _request
    resp.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
    raise ClientResponseError(
    ...<5 lines>...
    )
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='http://192.168.0.233/api/local/status'
mortal thorn
#

That's an authentication problem, very clearly

old patrol
#

Attempt to decode JSON with unexpected mimetype: text/html

#

again this

#

would you happen to know something i could try?

mortal thorn
#
  1. Wait for the developer to help
  2. Sniff the traffic and work out the problem yourself
old patrol
#

how would i start doing 2

mortal thorn
#

It's not easy, not by a long shot

old patrol
#

I DID IT

mortal thorn
#

You'll probably also have to search for how to reverse engineer a network protocol and how to mitm ssl traffic

old patrol
#

there's no way

#

i think you really are the tinkerer