Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Timeout on macos #18

Open
coralie-noyer opened this issue Jan 24, 2022 · 4 comments
Open

Timeout on macos #18

coralie-noyer opened this issue Jan 24, 2022 · 4 comments

Comments

@coralie-noyer
Copy link

Hello

I tried to work with this but I have a hisensetv.HisenseTvTimeoutError: failed to recieve a response in 10.000s error

First time I do hisensetv myip --authorize my TV show me a code and I typed the code in my terminal
after, I would like to get info volume but I get this timeouterror, then I tried again to authorize and I get again this error

How to work with this please ?

@newAM
Copy link
Owner

newAM commented Jan 24, 2022

You got it to authorize which is good - it means something is working.

Beyond that I would need a wireshark capture to debug - there are many different reasons this might not be working.

@coralie-noyer
Copy link
Author

Thanks but how to do this ?

@newAM
Copy link
Owner

newAM commented Jan 24, 2022

It depends on your background knowledge in this area. If you do not know what a port, IP address, or TCP connection is start there; these concepts have not changed in a long time so there is a lot of good learning material out there. After you have that knowledge search for a tutorial on wireshark and filter for connections between your mac running the code and your TV.

There are no shortcuts here unfortunately. The MQTT interface on the TV is buggy, and was not designed to be used this way; packet capture tools like wireshark are the best way to debug.

@alob-mtc
Copy link

@newAM i'm getting time out at authorize

kira2@kira ~ % hisensetv 10.0.0.128 --authorize
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/hisensetv", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hisensetv/__main__.py", line 125, in main
    with tv:
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hisensetv/__init__.py", line 120, in __enter__
    self._mqtt_client.connect(self.hostname, self.port)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 851, in create_connection
    raise exceptions[0]
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 836, in create_connection
    sock.connect(sa)
TimeoutError: timed out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants