Hey,

I'm having issues connecting IFTTT to Flespi's REST API, as IFTTT doesn't support custom headers. I tried using HTTP basic auth with the token in the URL but no luck:
{"errors":[{"code":4,"reason":"missing header 'Authorization: FlespiToken XZYABCDFEF'"}],"result":[]}

Is there some other workaround or should I look for alternatives to IFTTT for connecting the Google Assistant to Flespi?

    kittsville What kind of events from ITTT you want to inject into flespi and what further you want flespi to do with this data?

      I have IOT devices (Pi Zeros) listening to an MQTT broker to control power sockets around the house. IFTT is used to create custom Google Assistant voice commands:

      "Hey Google, lights on" -> Google Nest Mini -> IFTTT -> MQTT Service -> Raspberry Pi -> Energenie Smart Socket

      I had been using an http tunnel to expose the Pi to the web but decided, when I bought a second Pi, to move to a more appropriate solution.

      The data itself is simple JSON payloads. I got it working pushing events to the broker manually but the authentication issue meant I couldn't use IFTTT with Flespi.

        kittsville You can use HTTP channel to POST data to flespi. And subscribe your raspberry PIs to messages from this HTTP channel. It requires some tuning, e.g. if your simple JSON message has no "ident" field, then you need to specify "Device identification field" that will be used as ident.
        You can post here or in flespi chat an example of message an we will help you with configuration.

        baja I've been able to use Flespi's HTTP endpoint, via the command line, to control my lights. My issue is using IFTTT for the HTTP POST.

        When using Flespi's HTTP endpoint over the command line I can add the Authentication header, but IFTTT doesn't support custom headers. Unless there is an undocumented method of authentication this would mean IFTTT can't be used with Flespi.

          kittsville You should read more about HTTP channel
          Once you create HTTP channel - it provides you with endpoint that does not require Authentication. It has unique hostname:port like gw.flespi.io:12345. And you can do POST requests there with JSON as payload without Authorization headers.
          Did you try to create HTTP channel? You can ask this question in flespi chat so I can assist you there.

            Write a Reply...