core: Integration SMS, can't delete sms, spam sms.incoming_sms events
The problem
Each time I recieve (on HA) a new sms he send an event for each sms in SIM memory (including the new one) so I get one more each time. In the log I see that I get errors when he tried to delete old sms. See logs for details.
Environment
- Home Assistant Core release with the issue: 0.115.2
- Last working Home Assistant Core release (if known): 0.115.2
- Operating environment (OS/Container/Supervised/Core): HassOS 4.13
- Integration causing this issue: SMS
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/sms/
- Hardware used : Raspberry PI 4 4go, huawei E220.
- Two sim card tried, same result. (Free and Orange) Also tried with an huawei E3531 but I don’t get any sms.incoming_sms event.
Problem-relevant configuration.yaml
notify:
- platform: sms
name: sms_zorim
recipient: "+331234567890"
Traceback/Error logs
Main logs
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Received incoming event type:SMS,data:{'Location': 38, 'Folder': 1, 'InboxFolder': 1}
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Start remaining:39
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] All parts:0
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Part Number:-1
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Remaining:39
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Start all_parts_arrived:True
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Deleting message
2020-09-22 17:29:40 ERROR (Thread-5) [homeassistant.components.sms.gateway] {'SMSC': {'Location': 0, 'Name': '', 'Format': 'Text', 'Validity': 'NA', 'Number': '+330000000000', 'DefaultNumber': ''}, 'UDH': {'Type': 'NoUDH', 'Text': b'', 'ID8bit': 0, 'ID16bit': 0, 'PartNumber': -1, 'AllParts': 0}, 'Folder': 1, 'InboxFolder': 1, 'Memory': 'SM', 'Location': 0, 'Name': '', 'Number': '+330000000000', 'Text': 'Ok5', 'Type': 'Deliver', 'Coding': 'Default_No_Compression', 'DateTime': datetime.datetime(2020, 9, 16, 23, 3, 29), 'SMSCDateTime': datetime.datetime(2020, 9, 22, 17, 29, 40), 'DeliveryStatus': 0, 'ReplyViaSameSMSC': 0, 'State': 'Read', 'Class': -1, 'MessageReference': 0, 'ReplaceMessage': 0, 'RejectDuplicates': 0, 'Length': 3}
2020-09-22 17:29:40 ERROR (Thread-5) [homeassistant.components.sms.gateway] Error deleting SMS, memory not available
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Deleting message
2020-09-22 17:29:40 ERROR (Thread-5) [homeassistant.components.sms.gateway] {'SMSC': {'Location': 0, 'Name': '', 'Format': 'Text', 'Validity': 'NA', 'Number': '+330000000000', 'DefaultNumber': ''}, 'UDH': {'Type': 'NoUDH', 'Text': b'', 'ID8bit': 0, 'ID16bit': 0, 'PartNumber': -1, 'AllParts': 0}, 'Folder': 1, 'InboxFolder': 1, 'Memory': 'SM', 'Location': 1, 'Name': '', 'Number': '+330000000000', 'Text': 'Ok', 'Type': 'Deliver', 'Coding': 'Default_No_Compression', 'DateTime': datetime.datetime(2020, 9, 17, 10, 58, 50), 'SMSCDateTime': datetime.datetime(2020, 9, 22, 17, 29, 40), 'DeliveryStatus': 0, 'ReplyViaSameSMSC': 0, 'State': 'Read', 'Class': -1, 'MessageReference': 0, 'ReplaceMessage': 0, 'RejectDuplicates': 0, 'Length': 2}
2020-09-22 17:29:40 ERROR (Thread-5) [homeassistant.components.sms.gateway] Error deleting SMS, memory not available
2020-09-22 17:29:40 DEBUG (Thread-5) [homeassistant.components.sms.gateway] Deleting message
Result of state_machine.GetSMSFolders()
[{'Name': 'Inbox', 'Memory': 'SM', 'Inbox': 1},
{'Name': 'Outbox', 'Memory': 'SM', 'Inbox': 0},
{'Name': 'Inbox', 'Memory': 'ME', 'Inbox': 1},
{'Name': 'Outbox', 'Memory': 'ME', 'Inbox': 0}]
Additional information
I added _LOGGER.error(entry[0])
before state_machine.DeleteSMS(Folder=0, Location=entry[0]["Location"])
to get more logs
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 33 (15 by maintainers)
@pvizeli can we update hassos to include new version of libgammu?
@pvizeli 3.13 is out with the fix. Can we update hassos to version 3.13?
I think we will need to ask them for a bug fix release 3.12.2, otherwise we may need to wait up to a year. Filed a new issue on Alpine
Please vote on the issue.