I want to make a little device that can be controlled by members of the public without installing any specialist software on their phones. Something like changing the colour of an rgb led.
From an interface point of view Twitter makes sense - instructions would be to tweet @ a particular address.
Unfortunately I’m finding it hard to do my usual and copy something someone else has done before because my google skills are turning up things where the ESP8266 sends tweets rather than reacts to them.
Firstly, am I missing a better way to do this? Secondly, has anyone ever done anything like this before?
I got a Raspberry Pi to host its own web page as a control panel for the installation I made last year. Abandoned that approach in the end for other reasons, but got plenty of tutorials for ‘Python embedded web server’ search or something similar.
But making a request to the Twitter API is perhaps more straightforward, it’s at least one single conceptual thing, rather than the melange of stuff needs to make and host a webpage. Start by looking at the API equivalent of twitter.com/search. I’ve got an implementation, but it’s in objective-c.
ESP8266 can host a web page really easily if you just want some simple commands. these commands could be RED, GREEN etc or you could do simple buttons to then control the LED
It Should be able to use the twitter API, like you say I’ve seen Writes but not Reads…
I’ve been using the ESP8266 a lot recently and it still amazes me how good it is for a couple of $ !
Sigh. I couldn’t get my head around the authorisation thing. Brit I’m not giving up on it just yet - I’ll file it under ‘things if need to look up properly later’.
I did get the project working though. But maybe not in a very elegant way…
I have use d IFTTT ( if this then that ) to set up a recipe using the maker channel. This does the Twitter search for me, and posts a web request to thinger.io when it finds a particular hashtag. My ESP8266 talks to thinger.io and receives the data and acts on it.
Except IFTTT Twitter searches only happen every 15 minutes or so which is too long to wait.
So then I find out that SMS triggers are instant(ish) so now the IFTTT recipe forwards any texts to my phone with a particular hashtag in them to thinger.io and thence to the ESP8266. Phew. So I have a text controlled RGB led instead.