Hi all, I’m new to farmOS. I’ve been given the task of taking over maintaining a farmOS site which has recently been migrated to a Ubuntu server.
The users stated they had an SMS service for texting to a number and they could log the number of eggs. Well since this has been migrated this feature no longer works and I have been thrown in the deep end.
I’ve been given access to a twilio service and told there you go. I have no idea where to even start, any help would be very appreciated.
Seems like this worked by having a device actually receive the SMS text, process it in Python, and send to a PHP script (hosted elsewhere? maybe/maybe not on the farmOS server?) that then made the farmOS API request. As you mention this was also the v1 API.
I’m not familiar with Twilio, but using a service like this should eliminate the hardware/SMS processing complexity from the previous implementation. If Twilio can be configured to send an API request when receiving texts then maybe two options:
Make a farmOS v2 module that exposes a custom API for receiving the Twilio request
Use node-red as an intermediary service to receive Twilio request, add some processing logic & use the standard farmOS JSON:API
I used Twillio in the end, as the internet was too unreliable for my ESP32. There was another API that was hosted separately, and that could access farmOS API over Curl