What do I need to look at in order to take the Twilio code and duplicate it then update for SignalWire.
I can probably figure out what in the current Twilio code needs to be modified once I know all the pieces and how they interact with HA.
Is there someone will to help me with questions as I try this endeavor?
Currently I am running HA in a container so I am guessing that in my config directory, I would need to create a custom components directory to put my local work in.
What I am not sure about, is how to get the SignalWire python library usable for the container as it requires “pip install signalwire” for the hooks.
As I understand, code like REQUIREMENTS = ['PyMata==2.14'] (example from components\arduino_init_.py) in your custom component .py leads to execution pip install at hassio internal level.
Yep. You are correct. I did some additional digging in the development docs and found that out.
I started out trying to convert twilio, twilio_call, and twilio_sms. I am not sure the call feature is something I am interested in right now as there is a lot more work to do on that so I am going to focus on the sms only. Seems pretty straight forward.
Once I have it working, hopefully some folks can run it through the wringer for me and maybe get it merged in.
I created a signalwire_sms which depends on signalwire.
As you can see in the output, the signalwire component get installed but signalwire_sms cannot find it.
2019-04-12 20:24:24 WARNING (MainThread) [homeassistant.loader] You are using a custom component for signalwire which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-04-12 20:24:28 INFO (MainThread) [homeassistant.setup] Setting up signalwire
2019-04-12 20:24:28 INFO (MainThread) [homeassistant.setup] Setup of domain signalwire took 0.2 seconds.
2019-04-12 20:24:28 INFO (MainThread) [homeassistant.loader] Loaded signalwire _sms from custom_components. signalwire _sms
2019-04-12 20:24:28 WARNING (MainThread) [homeassistant.loader] You are using a custom component for signalwire _sms which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-04-12 20:24:28 ERROR (MainThread) [homeassistant.loader] Error loading custom_components. signalwire _sms.notify. Make sure all dependencies are installed
File “/config/custom_components/ signalwire _sms/notify.py”, line 6, in <module>
from homeassistant.components. signalwire import DATA_SIGNALWIRE
ModuleNotFoundError: No module named 'homeassistant.components. signalwire ’
2019-04-12 20:24:28 ERROR (MainThread) [homeassistant.loader] Unable to find platform signalwire _sms. Search path was limited to path of component: custom_components
Got it all working with custom components signalwire (converted from twilio) and signalwire_sms (converted from twilio_sms).
I have removed, for now, all of the web hook stuff from twilio nd have not yet attempted to convert twilio_call as that is probably a completed re write do to the Twilio webhook using the predefined Twimlets.