Giter VIP home page Giter VIP logo

geoffwhittington / meshtastic-matrix-relay Goto Github PK

View Code? Open in Web Editor NEW
60.0 5.0 7.0 187 KB

A relay between a Matrix.org room and a Meshtastic radio. This relay extends your Matrix.org-based communication with a LoRa-based Meshtastic radio mesh. This is not an official product of Matrix.org or Meshtastic.

License: MIT License

Python 91.68% Inno Setup 8.32%
lora matrix mesh-networks meshtastic radio

meshtastic-matrix-relay's People

Contributors

berticus2016 avatar cezarypuchowski avatar geoffwhittington avatar jeremiah-k avatar lingawakad avatar mate71pl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meshtastic-matrix-relay's Issues

Feature request: Network connection timeout / ability to reconnect to meshtastic + matrix

Hi there, I had the gateway running for a while with a Lora32 module accessed via WiFi, but had two mayor problems:

  • The connection to the Meshtastic devices sometimes somehow takes too long and times out. After 3 times connection attempts are aborted and the rest of the code tries to use a non existent mesh connection without any status output e.g. to Matrix and no attempt to ever connect again

  • Also: If the connection at the start succeeds, but the TCP connection to the Meshtatsic device is lost later, there are no reconnect attempts made.

Keep up the good work!

Best regards,

Ripper

Error occurring with communication problem to node, connection renewal would be useful

It would be useful to handle the error to renew the connection.

Exception in thread Thread-161: Traceback (most recent call last): File "/usr/lib/python3.11/[threading.py](http://threading.py/)", line 1038, in _bootstrap_inner [self.run](http://self.run/)() File "/usr/lib/python3.11/[threading.py](http://threading.py/)", line 1394, in run self.function(*self.args, **self.kwargs) File "/home/mate/meshtastic/meshtastic-matrix-relay/.pyenv/lib/python3.11/site-packages/meshtastic/mesh_[interface.py](http://interface.py/)", line 561, in callback self._sendToRadio(p) File "/home/mate/meshtastic/meshtastic-matrix-relay/.pyenv/lib/python3.11/site-packages/meshtastic/mesh_[interface.py](http://interface.py/)", line 619, in _sendToRadio self._sendToRadioImpl(toRadio) File "/home/mate/meshtastic/meshtastic-matrix-relay/.pyenv/lib/python3.11/site-packages/meshtastic/stream_[interface.py](http://interface.py/)", line 115, in _sendToRadioImpl self._writeBytes(header + b) File "/home/mate/meshtastic/meshtastic-matrix-relay/.pyenv/lib/python3.11/site-packages/meshtastic/tcp_[interface.py](http://interface.py/)", line 72, in _writeBytes self.socket.send(b) BrokenPipeError: [Errno 32] Broken pipe

Matrix Room Alias Support

Currently the only way to map rooms in the config.yaml is via the Matrix room ID.

matrix_rooms:
- id: '!NrCTURbZDMWKMrTpFH:matrix.org'
  meshtastic_channel: 4

Ideally the relay should support Matrix room aliases as well.

matrix_rooms:
- id: '#meshtastic-relay-1:matrix.org'
  meshtastic_channel: 4

Certain messages not being sent Meshtastic -> Matrix

I can't pinpoint why this is happening, but it happens on occasion. Sometimes it won't happen at all in a conversation, sometimes it will only happen on my first message in a long time, and once or twice it's happened almost every other message.

I've tried bot users on 3 different servers to see if there's a difference. It's happened with each bot user, at least once.

Adding an issue to track this.

Do not send relay-commands to meshtastic

When (internal?) commands like !health are sent in matrix to the relay-bot, the bot sends them to meshtastic too.
If possible it would be nice if the bot would not relay those special messages to meshtastic.

Add info about node names and node details

It would be nice to not only display the node count (displayed at first line output of !health) but also display the names/details of those nodes.
Maybe for better readability as an own listing in another command like !nodes ?
If possible, also display extended information. Some devices provide GPS coordinates, some devices like T-Echo provide also pressure.
Thank you!

Adding Matrix E2EE support

I've been to close to getting this to work, but it it's not quite there yet. If anyone has any experience with Matrix (particularly matrix-nio), feel free to submit a PR!

MMRelay not loading in Windows since at least 0.3.23-0.3.24

I built an installer for the latest changes with shortnames (0.4.0) so I could test it out in Windows machines. This is what happens when running the relay via python in GitBash.

$ python main.py
2023-06-09 14:20:03 -0500 INFO:Meshtastic:Connecting to serial port COM7 ...
2023-06-09 14:20:04 -0500 INFO:Meshtastic:Connected to M<>M / TBEAM_V0P7
Traceback (most recent call last):
  File "C:\Users\Laura\Desktop\mmrelay-0.3.24\main.py", line 85, in <module>
    asyncio.run(main())
  File "C:\Program Files\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\Users\Laura\Desktop\mmrelay-0.3.24\main.py", line 40, in main
    load_plugins()
  File "C:\Users\Laura\Desktop\mmrelay-0.3.24\plugin_loader.py", line 25, in load_plugins
    HealthPlugin(),
  File "C:\Users\Laura\Desktop\mmrelay-0.3.24\plugins\base_plugin.py", line 29, in __init__
    if "plugins" in relay_config and self.plugin_name in relay_config["plugins"]:
TypeError: argument of type 'NoneType' is not iterable
(.pyenv)
Laura@DESKTOP-FNV2O8D MINGW64 ~/Desktop/mmrelay-0.3.24
$

When the relay is run from the .exe sometimes it would error out with something along the lines of:
Could not open port ‘COM7’: PermissionError(13, ‘Access is denied.’, None, 5)

Rebooting would not fix it, I would have to disable/enable the COM port in the Device Manager, then reboot and it would come out of it.

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.