Linux command line

Hello,
I’m looking for a lightweight way to read and write value from command line of a linux host.
My purpose is to automatically act from cron as I can do with my mobile.
So I’ll be able to turn on/off lights, get temperature and so on…
If anybody has experience in that, it will be great!
I try to find the magic command but with no result :frowning:
Thanks in advance,
MrEd

i have not deeply used linux just small effort with Ubuntu, i have searched google for you
and this one looks good

also wait for @Gunner to come , as you shouldn’t request any Blynk irrelevant question
as google should solve that for you :face_with_raised_eyebrow:

1 Like

Hello scorpion
Thank you for your answer
Well I see I was not really clear in my question :confused:
It s blynk relevant because I d like to get set values via blynk to the devices blynk managed :blush: from a linux command line :grinning:
Regards
MrEd

Well, the desired end result is Blynk relevant, but the process is much more Linux generic and would be valid for any other API controllable devices… Try Google while waiting here

https://www.google.ca/search?&q=send+api+command+from+linux

Then start testing :slight_smile:

Hello and thank you gunner,

It was not really the answer I was looking for, but you give me a serious pull!
What I missed was to know I can get info directly in http :slight_smile:
So I can get info from the current values with:
https://127.0.0.1:9443/<token>/get/<xx>
with “token” the token of the device (given in blynk admin or mobile app)
with “xx” Dxx or Vxx (for Virtual pin)
And then, it’s easy to get the command line:
wget -q --no-check-certificate -O- https://127.0.0.1:9443/<token>/get/<xx>
Of course, address (127.0.0.1) can be a name and can be different from localhost.
Now I can pilot devices from cron (nice for Xmas) and insert values in snmp :wink:

Thanks again to everyone!

Here is URI I found most the syntax and more https://blynkapi.docs.apiary.io/#reference/0/write-pin-value-via-get

(system don’t want to put many URI in the same post ;-))

Ah ha… OK, it wasn’t clear that you were not already familiar with Blynk’s HTTP RESTful API. Well, you know about it now :stuck_out_tongue:

You can also search through this forum for further posts/info about proper syntax etc.