Telstra Notification Failed To Send SMS

Hi peeps

I am having trouble getting Telstra component to send a notification.I have followed the guide here and API has been requested and approved.

Error Message below

Nov 16 10:16:28 koala hass[10745]: — Logging error —
Nov 16 10:16:28 koala hass[10745]: Traceback (most recent call last):
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/logging/init.py”, line 978, in emit
Nov 16 10:16:28 koala hass[10745]: msg = self.format(record)
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/logging/init.py”, line 828, in format
Nov 16 10:16:28 koala hass[10745]: return fmt.format(record)
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/logging/init.py”, line 573, in format
Nov 16 10:16:28 koala hass[10745]: record.exc_text = self.formatException(record.exc_info)
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/logging/init.py”, line 523, in formatException
Nov 16 10:16:28 koala hass[10745]: traceback.print_exception(ei[0], ei[1], tb, None, sio)
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/traceback.py”, line 169, in print_exception
Nov 16 10:16:28 koala hass[10745]: for line in _format_exception_iter(etype, value, tb, limit, chain):
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/traceback.py”, line 146, in _format_exception_iter
Nov 16 10:16:28 koala hass[10745]: for value, tb in values:
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/traceback.py”, line 125, in _iter_chain
Nov 16 10:16:28 koala hass[10745]: context = exc.context
Nov 16 10:16:28 koala hass[10745]: AttributeError: ‘NoneType’ object has no attribute ‘context
Nov 16 10:16:28 koala hass[10745]: Call stack:
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/threading.py”, line 888, in _bootstrap
Nov 16 10:16:28 koala hass[10745]: self._bootstrap_inner()
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/threading.py”, line 920, in _bootstrap_inner
Nov 16 10:16:28 koala hass[10745]: self.run()
Nov 16 10:16:28 koala hass[10745]: File “/usr/lib/python3.4/threading.py”, line 868, in run
Nov 16 10:16:28 koala hass[10745]: self._target(*self._args, **self._kwargs)
Nov 16 10:16:28 koala hass[10745]: File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/init.py”, line 406, in _worker
Nov 16 10:16:28 koala hass[10745]: self._job_handler(job)
Nov 16 10:16:28 koala hass[10745]: File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/core.py”, line 1210, in job_handler
Nov 16 10:16:28 koala hass[10745]: func(*args)
Nov 16 10:16:28 koala hass[10745]: File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/core.py”, line 1065, in execute_service
Nov 16 10:16:28 koala hass[10745]: service_handler.func(service_call)
Nov 16 10:16:28 koala hass[10745]: File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/notify/init.py”, line 110, in notify_message
Nov 16 10:16:28 koala hass[10745]: notify_service.send_message(**kwargs)
Nov 16 10:16:28 koala hass[10745]: File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/notify/telstra.py”, line 85, in send_message
Nov 16 10:16:28 koala hass[10745]: message_response.status_code)
Nov 16 10:16:28 koala hass[10745]: Message: ‘Failed to send SMS. Status code: %d’
Nov 16 10:16:28 koala hass[10745]: Arguments: (400,)

My config file is simple

notify 2:
  name: name here
  platform: telstra
  consumer_key: APIKEYHERE
  consumer_secret: SECRETHERE
  phone_number: 0404123456

Am I missing something?

Thanks

The only difference I can see with my config is I used the phone no to send it to with int prefix, as…

phone_number: +61404123456

2 Likes

that seems to do the trick. I was going to try the international formatting but then i didnt (not sure why)

All works well. the component page perhaps needs updating to reflect this information, as people may encounter the same issue I experienced this morning.

Cheers