PINE64
Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+--- Thread: Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD (/showthread.php?tid=13052)



Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD - FutureBucket - 02-09-2021

Hey all,

I've got a pretty rough python3 script that I'm working on right now. It takes SMS and MMS messages from the PinePhone (Tested on PMos and Mobian) and bridges them to a Matrix server.

for SMSes I talk directly to Modem Manager via the dbus and MMSes require mmsd from kop316 https://forum.pine64.org/showthread.php?tid=12491


I've uninstalled chatty on my testing device as it also interacts directly with the modem.I did this because i think it'll cause problems if its running at the same time. I'm still pretty new to programming and definitely not a developer. Just a Linux admin who hates using his cellphone when I'm already at a keyboard. So far no one else has written anything so I have to.

If you're interested in helping me please let me know! I'd love to get someone who has experience to make this better.

Cheers!


RE: Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD - pacman99 - 02-09-2021

This looks really cool! Yeah I might be able to help you with this, especially since I've already worked on the code before. After what you said in the other thread, I was looking into switching to matrix-nio too, but I haven't had any spare time at all, so its great that you beat me to it.

The nice part about using purple is it integrates with the chatty ui, so messages sent on matrix show up in chatty and theoretically the other way around is possible, but I haven't implemented that. But since chatty is eventually going to be moving purple-mm-sms into chatty itself, my script will no longer work, so your method is future proof. I think there are plans to add a dbus api to chatty itself, but I'm not sure if it will have all the features needed for proper matrix bridging.

Either way thank you for doing this! I'll see if I can try it out at some point. And I've been meaning to checkout Chris's mmsd implementation(I'm over a month late on this), so this will force me to do that.


RE: Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD - FutureBucket - 02-10-2021

(02-09-2021, 10:06 PM)pacman99 Wrote: This looks really cool! Yeah I might be able to help you with this, especially since I've already worked on the code before. After what you said in the other thread, I was looking into switching to matrix-nio too, but I haven't had any spare time at all, so its great that you beat me to it.

The nice part about using purple is it integrates with the chatty ui, so messages sent on matrix show up in chatty and theoretically the other way around is possible, but I haven't implemented that. But since chatty is eventually going to be moving purple-mm-sms into chatty itself, my script will no longer work, so your method is future proof. I think there are plans to add a dbus api to chatty itself, but I'm not sure if it will have all the features needed for proper matrix bridging.

Either way thank you for doing this! I'll see if I can try it out at some point. And I've been meaning to checkout Chris's mmsd implementation(I'm over a month late on this), so this will force me to do that.

I would love for this to be an extension of Chatty! I was kind of hopeful that your work was doing that so I could use it. hahaha. Maybe we can integrate this into chatty??? or even build a GUI or something to replace chatty. I'd like to see messages sent on Matirx show up on the phone, however, that does not happen. I dont even think it will work with chatty running.

I'm open to everything and anything as long as I can text from matrix reliably. you're welcome to fork it and do your own thing or submit any PRs at all. if it works I'll merge it.

This script is a complete rewrite. The idea is the same but I did not take much from ofono-matrix-puppet so it might take a bit to get use to it.


RE: Python3 Bridge SMS/MMS to Matrix using Modem Manager and MMSD - kop316 - 02-10-2021

I'm glad to see mmsd is getting some usage!