💾 Archived View for rawtext.club › ~ahub › sms_conversation.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
This one is a bit personal. I found a partial solution to a problem I had.
- My wife is away at the hospital and she doesn't have the intimity she'd like
to make phone calls. So we mostly text.
- I don't (nor want to) own a smartphone
So far it was acceptable to use the phone's numpad to write text messages but
it became so cumbersome I noticed I don't even take the time to answer anymore.
I want to:
- use my keyboard to type when I'm on the computer
- still be reachable when AFK
- minimize the technical burden on my wife
- have something operational FAST
I went for a paid account on twilio. They have an API they call "conversation"
where a phone number can behave somewhat like an IRC chatroom. If my wife sends
a SMS to it, I receive it. If I send a SMS to the same number it gets bounced
back to her.
When I use my python script, I just 'kick' my own phone number from the
conversation, so my phone doesn't receive messages I sent from the computer.
The Python script is really a basic usage of the 'cmd' module to mimic the
behaviour of 'weechat' my IRC client. Fun fact, is discovered the 'cmd' module
by studying how my gemini browser (av-98) worked under the hood. Thanks
solderpunk !
Here is a link to it if it can help you somehow.
It looks like this:
10:10:22 ahub(phone)| Xx, xx xx xxxxxxxx xxxxx xx x'xxxxx xx xxx. 11:17:53 wife| Xx xxxxxx xxxx xxxxxx!?! 11:29:42 ahub(pc)| Xxx x xxxxx x xxxx xxx xx xxxx xxxx. 11:46:47 wife| Xx xxxxxxxx !!! 12:32:36 ahub(pc)| Xxx x'x xxxxxxx xxxxx xxxx xxxxxxxxx. Xx xx xxxx ? 12:34:33 wife| Xxxxxx xûxxxxxx xxxxx xxx xxxxxxxx, xxxxx xxx, xx xxx xxxxxxxx xxx x'xx xx xxxxx x'xxxxxxx xxx xxxxx xx xxxxx xxxxxx 13:00:26 ahub(pc)| Xx xxxxx ! Xxxx xxxxx xx xxxxxxx ? 13:13:09 wife| X Xxxxxxxx, xxx xxxxxx xxxxxxxx 13:40:59 ahub(pc)| Xxxxxxx 13:42:38 ahub(pc)| Xxx xxxxxx xx xxxx xxx x'xx x xxxx xxxxxxxx xx xxxxxxxx xxxxxxx xx xxxxxxxx. Xxx xx xxxx xéxxxéxxx xxx xxxxxx éxéxxxxxxx xx xxxx ? 15:44:10 [SMS]: help Documented commands (type help <topic>): ======================================== help invite kick ls quit refresh 15:44:10 [SMS]:
The commands:
- ls lists the registred phone numbers
- invite/kick should be quite obvious
- refresh fetches the list of messages from twilio (empty line also does this)
- Typing anythin else is sent as a SMS to the conversation
The script 100% relies on env vars and parameters to work, so nothing personal
in it. It uses the following vars :
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
TWILIO_PHONE_NUMBER
TWILIO_CONVERSATION_SID
and can receive a list of arguments to pretty-print phone numbers
./sms_chat.py "+555666555" "ahub(phone)" "+55555555" "wife"
As always feedback is appreciated at ahub@riseup.net. Tell me if you used the
script, if you found a way to improve it ! Maybe you even have another solution
to propose ?
Ideally I'd love to use my own phone instead of twilio. I'd get rid of :
- paying
- relying on a third party
- the necessity of an internet connection
I know my phone (A Cross-Call X-1) is detected as a modem on Linux, but it
doesn't seem to respond to (most) AT Commands. So I just rushed for the
quickest solution.