Trying to update widget from curl


#1

Hi

I am brand new in cayenne.
I created a widget graph , and now i want to add each day the water consumption from cli (curl command)
i am a little lost.
I am able to read my “access_token” from this cmd :
curl -X POST -H ‘Content-Type: application/json’ ‘https://auth.mydevices.com/oauth/token’ -d ‘{“grant_typ e”: “password”, “email”: "BLABLA@gmail.com",“password”: “BLABLABLA”}’

But now don’t know about to send data to my widget ?
please help

regards


#2

to send data here is the curl:

curl --request POST \
  --url https://platform.mydevices.com/v1.1/things/<client_Id>/cmd \
  --header 'authorization: Bearer <access token>' \
  --data '{
  "channel": "10",
  "value": 20
}'

#3

good
what is client_id please ?


#4

client_id is the client ID from your device which you can get on the dashboard and then device settings.


#5

i am on the dashboard , i click on settings

but can’t find any client_id

please help me
thx


#6


#7

Sorry to bother again
ok i clicked on “Settings” and “configure” see below a

but can’t find “client_id”

regards


#8

for pi agent you will get this on raspberry pi. enter the following command sudo nano /etc/myDevices/AppSettings.ini