black-roland / homeassistant-gsm-call

Home Assistant integraion which allows to call a phone number using 3G/4G, LTE modems
Mozilla Public License 2.0
5 stars 0 forks source link

SMS/USSD features #1

Closed nnov4k closed 5 months ago

nnov4k commented 5 months ago

hello! have you any ideas to add a SMS and USSD features for homeassistant-gsm-call ? add-on locks a gsm-modem port and basic AT commands via SSHCommands cant be used :(

black-roland commented 5 months ago

Hey, I'm not confident if this is the case for all modems but there should be multiple interfaces to access the modem. Like:

$ ls -1 /dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if0*                                                             
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if00-port0
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if01-port0
/dev/serial/by-id/usb-HUAWEI_Technology_HUAWEI_Mobile-if02-port0

I wonder how many interfaces your modem has? Personally, I have one interface configured for this integration and another one is used to receive messages through gammu-smsd — no mutual blocking.

I'd also suggest checking if you have ModemManager enabled as it may also block the modem interface.

As of SMS support, there is already an integration for this so I don't think adding SMS support makes sense.

USSD maybe added in the future but there were no such requests until yours. Do you just need to dial USSD to perform some actions (for example, to change tariff options) or is it used to check the account balance?

nnov4k commented 5 months ago

Hello! Thank you for a fast response! I've got new ZTE MF180 and set up it via symlink to modem. Works OK. After i set up SMS integration - it connected to the same modem port and wants to lock it (to get some realtime statistics, like signal level). When SMS integration active - shows levels and other - calls are not availiable (port locked by SMS integration). Than i tried to make a multiple calls to my phone,... 1st, 2nd failed, after a while call completed BUT!!! all sensors in SMS integration become unavailiable (it has lost connection to modem port). Calls in this moment works OK... ))

Tested idea - if the calls be set to last port (...if02...and SMS to previous (...if01...) - sms updates info only before 1st call, than SMS addon become unavailiable until disable/enable button pressed. SMS don't connects to 0 port :(

so an idea to add an sms support is active again :)

black-roland commented 5 months ago

SMS don't connects to 0 port :(

I guess this interface is blocked by ModemManager. Please try disabling/removing it. By the way, what OS are you using? Here are instructions for RHEL and Ubuntu.

I had a similar issue with gammu-smsd stopping working after a few hours (SMS integration uses Gammu internally). The issue was reproducible even with pure gammu-smsd only for SMS reception. As in your case, I also had one of the interfaces constantly blocked. Turned out ModemManager was the root cause of all my problems :confused: I guess that might be your case as well, so please try disabling it.

nnov4k commented 5 months ago

Thank you for an ideas, i'll try to find a service, which locks a port and report results. I have HassOS installed (jethome d1+ build, based on Debian 11) with no modemmanager within. P.s. we also talks our native language @ your main site :)

black-roland commented 5 months ago

Ответил в комментариях :slightly_smiling_face:

black-roland commented 5 months ago

The issue seems to be resolved. Please reopen if you still have any issues.