According to the last PR #6348 to the Twilio component in 0.40, we can now receive incoming messages.
Yay! I was actually going to try hacking the telegram_webhooks component to get this functionality, so it’s great it exists. Issue is, I can’t get it working. This was added to the code:
class TwilioReceiveDataView(HomeAssistantView):
"""Handle data from Twilio inbound messages and calls."""
url = API_PATH
name = 'api:{}'.format(DOMAIN)
@callback
def post(self, request): # pylint: disable=no-self-use
"""Handle Twilio data post."""
from twilio.twiml import Response
hass = request.app['hass']
data = yield from request.post()
hass.bus.async_fire(RECEIVED_DATA, dict(data))
return Response().toxml()
Which should allow incoming texts to be parsed and sent to HA.
I cannot get a message through from the Twilio service. Keep getting 405 “method not allowed” shown in the debugger in the Twilio web console, and no content in HA. Debug for http or twilio in HA is showing nothing. Perhaps I’m not telling Twilio to hit the right URL? I’m shooting it right to the root of the website: e.g. https://site.url:port/