Complexity of David

Data Science, Machine Learning, Artificial Intelligence, Visualization, and Complex Systems.

Sending Data to AskSensors With Python

AskSensors is an online IoT dashboard service that allows you to track data coming from your sensors. They have tutorials on the website to get you started, but for raspberry pi they went with an example using node.js. Can’t understand that .

In any case it isn’t difficult to write a python script that reads from your sensor and sends data to the AskSensors api. Here are my tips:

  1. In python use the easy to understand requests library.
  2. The URL endpoint to send data to is something like https://api.asksensors.com/write/API_KEY?module1=VALUE_1&module2=VALUE_2
    1. Make sure to replace the API_KEY and VALUE_1,2,xxx to the number and values of your application.
    2. The API_KEY is unique for each sensor you have.
    3. Each sensor can have several modules. For example the DHT11 sensor reads both Temperature and Humidity. This means you have one device (sensor) sending two values to module1 and module2, hence the previous url structure.
  3. send data with requests.get(URL of POINT 2).
  4. profit.