10-15-2017 03:36
10-15-2017 03:36
Hi,
Is it possible to do a http call from a button on your watch to (for example) a Domotics system? I couldn't find any documentation if this is possible or not.
thanks,
Remco
Answered! Go to the Best Answer.
10-15-2017 14:44
10-15-2017 14:44
The button would need to send a message to the Companion API, then that would make a fetch() request to the http endpoint.
Remy Sharp did a proof of concept version of fetch() from the device, which essentially uses the above method:
https://gist.github.com/remy/2f5dbe7032004a5dd09bd57733d30ab6
10-15-2017 14:44
10-15-2017 14:44
The button would need to send a message to the Companion API, then that would make a fetch() request to the http endpoint.
Remy Sharp did a proof of concept version of fetch() from the device, which essentially uses the above method:
https://gist.github.com/remy/2f5dbe7032004a5dd09bd57733d30ab6