Ok..Switched to using the HTTP API and I am once again getting updated Indigo vars.
However, two issues. First, for anyone doing this in a shell script (I.e. using curl), and using shell variables in the update, here is an example of the correct syntax. (Hint, shell vars will not be expanded between single quotes):
- Code: Select all
curl -X POST -H "Authorization: Bearer <API-KEY>" -d '{"message":"indigo.variable.updateValue","objectId":12345,"parameters":{"value":"'$TIMESTAMP'"}}' http://127.0.0.1:8176/v2/api/command
Notice the added single quotes around the var.
Second, I am seeing the following in the Indigo log on each update:
- Code: Select all
Web Server HTTP API command call received from 127.0.0.1
Web Server API v2 command received, id: '- no message id -' from '127.0.0.1'
a) I would like to suppress these messages altogether, and
b) If I were to want one, how would I enter a message Id? I tried a number of names, like messageId, and none worked.
BTW, for a timestamp I use a slight variation on Dave's suggestion:
- Code: Select all
TIMESTAMP=$(date "+%Y-%m-%d-%H:%M:%S")
EDIT: A bit of searching for the message id turned up
viewtopic.php?p=216631#p216631Thanks Dave.