How do I stream data to TinyAutomator?

Since I can’t publish data as data must stay local, how do I stream data to the engine?

1 Like

There is no broker in TinyAutomator, but you can stream real-time data to tasks as it is described in rules engine API here Waylay Documentation

Thanks @ramil , just a question, what would be credentials and the REST endpoint I need to use?. Here is what I find in the documentation:

curl --user apiKey:apiSecret -H "Content-Type:application/json" -X POST -d '{
        "resource": "home_X_room1",
        "data":{
          "parameterName": "temperature",
          "value": 23.0
        }
      }' "https://api-io.waylay.io/rules/v1/data"

tinyautomator auth service is a ‘fake’ authenticator - it does not check username/password for correctnes. Saying that you can use any apikey/secret combination which you like.

for endpoint you can use standalone.waylay.io as endpoint (adjust /etc/hosts file to to point to the IP address of device where TinyAutomator is running).

eg. of request:

curl -k --user apiKey:apiSecret -H "Content-Type:application/json" -X POST -d '{
        "resource": "home_X_room1",
        "data":{
          "parameterName": "temperature",
          "value": 23.0
        }
      }' "https://standalone.waylay.io/api/data"

The latest version of TinyAutomator authentication service now checks the apikey/secret values against preconfigured values of auth service. Default values are apiKey/apiSecret, but if you want you can change them. Check the ‘Security configuration’ section of TinyAutomator documentation page Waylay Documentation