This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local conf = { | |
variables = { | |
['hashidvariable'] = 'ipaddress', | |
}, -- Table related to vars identificators | |
apikey = 'myapikey', -- User apikey to get token to post values | |
host = 'localhost', -- Host to stablish connection | |
port = '8001', -- Port where service is listening | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lua | |
-- Loading main configuration | |
local config = require "conf" | |
-- Library to read commando output | |
local io = require "io" | |
-- Load the http module | |
local http = require "socket.http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ubidots import ApiClient | |
import requests,time | |
from math import * | |
#Connect to Ubidots | |
api = ApiClient('a21ebaf64e14d195c0044fcxxb9f6dab9d653af3') | |
#Instantiate local variable from Ubidots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
response = urllib2.urlopen('http://things.ubidots.com/api/v1.6/datasources?token=9xtbvHL8hFKxfkmlXUW3qNoUpOEZAtp0qkkwPqffbn6DiR3ElRJ4B5m1$ | |
data = response.read() | |
print data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Get product list for a specific search query in MercadoLibre.com, post the number of new items to the Ubidots Cloud | |
""" | |
__author__ = "Agustin Pelaez" | |
from sys import argv | |
import ubidots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Get number of RSVPs for #Iot Day and send them to Ubidots | |
""" | |
__author__ = "Agustin Pelaez" | |
from sys import argv | |
import ubidots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time # Library for delays | |
import RPi.GPIO as GPIO # Library for using the GPIO ports | |
from math import log1p,exp,log10 # Library for math functions. No need for it if you'll get the raw data from the sensors | |
from ubidots import ApiClient # Ubidots Library | |
import Adafruit_DHT # Library from Adafruit to simplify the use of DHT sensor. | |
# Set up the SPI interface pins. Through SPI we can connect to the ADC MCP3008 | |
SPICLK = 18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#include <WiFly.h> | |
#include "HTTPClient.h" | |
#define SSID "SEEED-MKT" | |
#define KEY "depot0510" | |
// WIFLY_AUTH_OPEN / WIFLY_AUTH_WPA1 / WIFLY_AUTH_WPA1_2 / WIFLY_AUTH_WPA2_PSK | |
#define AUTH WIFLY_AUTH_WPA2_PSK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local conf = { | |
variables = { | |
['52d481d9f91b284cd22af757'] = '8.8.8.8', | |
}, -- Add one variable id per each site to check the ping | |
token = '9xtbvHL8hFKxfkmlXUW3qNoUpOEZAtp0qkkwPqffbn6DiR3ElRJ4B5m1hZMs', --Replace with your own token | |
host = 'things.ubidots.com', -- Host to establish connection | |
port = '80', -- Port where service is listening | |
} | |
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/env lua | |
-- Loading main configuration | |
local config = require "config" | |
-- Library to read command output | |
local io = require "io" | |
-- Load the http module | |
local http = require "socket.http" |
OlderNewer