GithubHelp home page GithubHelp logo

henning-klatt / aruba2mqtt Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 73 KB

Currently parsing a Xiaomi Mijia 2 via BLE from an Aruba IAP and showing the values in the terminal. WIP

Python 90.40% Dockerfile 9.60%

aruba2mqtt's People

Contributors

henning-klatt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

aruba2mqtt's Issues

reconnect if mqtt fails

pi@pi2:~/aruba2mqtt $ python3 main.py 
Traceback (most recent call last):
  File "/home/pi/aruba2mqtt/main.py", line 80, in <module>
    main()
  File "/home/pi/aruba2mqtt/main.py", line 74, in main
    mqtt.connect()
  File "/home/pi/aruba2mqtt/mqtt.py", line 6, in connect
    client.connect("localhost")
  File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
  File "/usr/lib/python3.9/socket.py", line 843, in create_connection
    raise err
  File "/usr/lib/python3.9/socket.py", line 831, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Add debug info: which AP disconnected?

aruba2mqtt     | 2024-03-25 09:59:32,658 - connection handler failed
aruba2mqtt     | Traceback (most recent call last):
aruba2mqtt     |   File "/usr/local/lib/python3.11/site-packages/websockets/sync/server.py", line 498, in conn_handler
aruba2mqtt     |     handler(connection)
aruba2mqtt     |   File "//main.py", line 71, in receive
aruba2mqtt     |     for message in websocket:
aruba2mqtt     |   File "/usr/local/lib/python3.11/site-packages/websockets/sync/connection.py", line 159, in __iter__
aruba2mqtt     |     yield self.recv()
aruba2mqtt     |           ^^^^^^^^^^^
aruba2mqtt     |   File "/usr/local/lib/python3.11/site-packages/websockets/sync/connection.py", line 198, in recv
aruba2mqtt     |     raise self.protocol.close_exc from self.recv_events_exc
aruba2mqtt     | websockets.exceptions.ConnectionClosedError: no close frame received or sent

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.