Sending data to JEDI One using the HTTP POST method

Here is an example in Python of sending data to JEDI One using the HTTP POST method.  It uses the python library requests.  To install requests on a Raspberry Pi:

$ sudo pip install requests

Below is the Python code and the return results at the bottom after running it (in this example the JEDI One HTTP listener is running on 192.168.1.6:8100):

HTTP_Post.jpg

JEDI One will store the data (200, 2105) from the source Engine1 to the categories Engine-Temp and Engine-RPM.  If this is a new source, it will create the entry automatically.  The timestamp is optional; If supplying a timestamp, it should be in ISO 8601 format.  This can be retrieved from a Raspberry Pi using:

$ date -Is

Otherwise, JEDI One stores data arrival date and time.

By selecting Rules-> add-rule.jpg, it can be observed that the source and data categories appear automatically:

http-post-JEDI.jpg

The same information can be sent using the curl command:

curl-http.jpg

 

 

 

Was this article helpful?
0 out of 0 found this helpful