POST HTTP with LABVIEW [Solved]


#1

I want to connect my photon core with labview without using Javascript, I used Labview Library HTTP, with POST.vi but I don’t want the JSON or javascript, I want to understand why

this URL works
https://api.simonpainter.com/core/v2/?device=MYDEVICEID&function=led&access_token=MYACCESSTOKEN&command=12

and this one doesn’t
https://api.particle.io/v1/devices/2a003b001447353136383631/led/?access_token=MYACCESSTOKEN&command=12

well the first one labview can’t autheticate the server, does someone know?


#2

Yor second URL is formatted like a GET request, but Particle.functions() need to be POSTed.
Have a look in the docs how the curl commands are made up.


#3

ok, but with cURL, Can I request exactly the same way with cURL than with URL?, because I read cURL is using with command line, and I need a URL.


#4

Hi @ysel96brigette

You cannot do a http POST request for a Particle function with just a URL–you need to add the POST parameters and they go in the body, not the URL. I am sure LabView can do a http POST request, you will have to look up exactly how.


#5

Don’t worry, I already did it. and I can do a http post request for a Particle function with Just a URL. :smile:


#6

Hi I am new in photon and labview also in this forum. I have read this topic maybe you can help me I want to sense a temperature sensor and show the dashboard with labview. It seems that you can help me with that. thanks so much


#7

What have you tried so far?


#8

HI, Moors7 Iam trying to send data via serial port from de photon to LabView (Maybe thats my first error), bc in labview I get and error. Also when I look for the COM for Photon in the Devices Manager I get that Serial Photon driver is no there.

I understand that you send the data to a cloud with photon, so I think that the way Iam doing this is wrong. Thanks for you help


#9

Hey, I use this for serial

and I use this for read and write information on a particle server cloud


#10

Thanks ysel96briggette i am gonna try it