Skip to content

Instantly share code, notes, and snippets.

from flask import Flask, jsonify, request
import requests
import os
from iotery_python_server_sdk import Iotery
# Iotery API key from the system page
iotery = Iotery(os.getenv("IOTERY_API_KEY"))
# Create my flask app to run on Port 7500
app = Flask(__name__)
from flask import Flask, jsonify, request
import requests
import os
# Create my flask app to run on Port 7500
app = Flask(__name__)
PORT = 7500
# Handler for Fred's data (receiving the iotery Post Data Webhook)
@app.route("/light-status", methods=["POST"])
from flask import Flask, jsonify, request
import requests
import os
# Create my flask app to run on Port 7500
app = Flask(__name__)
PORT = 7500
# Handler for Fred's data (receiving the iotery Post Data Webhook)
@app.route("/light-status", methods=["POST"])
from flask import Flask, jsonify, request
import os
# Create my flask app to run on Port 7500
app = Flask(__name__)
PORT = 7500
# Handler for Fred's data (receiving the iotery Post Data Webhook)
@app.route("/light-status", methods=["POST"])
def handle_data_webhook():
from time import time, sleep
from iotery_embedded_python_sdk import Iotery
import os
# Need to specify the Iotery Team ID (I found this on the system page: https://iotery.io/system)
TEAM_ID = os.getenv("IOTERY_TEAM_ID")
# Instantiate the Iotery Connector object
light_connector = Iotery()
auth_data = {
from time import time, sleep
from iotery_embedded_python_sdk import Iotery
import os
# Need to specify the Iotery Team ID (I found this on the system page: https://iotery.io/system)
TEAM_ID = os.getenv("IOTERY_TEAM_ID")
# Instantiate the Iotery Connector object
light_connector = Iotery()
auth_data = {
from time import time, sleep
light_is_on = True
while True:
timestamp = int(time())
if light_is_on:
print("I am shining brightly!")
@bjyurkovich
bjyurkovich / create-data.md
Created February 22, 2019 17:42
Creating Data

Create a Data Record with Alert

Posts data and alerts to the cloud

Access Pattern

API domain: Device/Data Intended for Embedded Superuser privilege required: false

@bjyurkovich
bjyurkovich / register.html
Created January 17, 2018 20:05
register-email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Reset your password for Nautic-ON</title>
<!--
The style block is collapsed on page load to save you some scrolling.
Postmark automatically inlines all CSS properties for maximum email client
compatibility. You can just update styles here, and Postmark does the rest.
@bjyurkovich
bjyurkovich / search.js
Created January 11, 2018 14:23
search.js
// terms = [text entered into box]
// indices = []
// for current_index in range(0,len(all_indices)):
// for term in terms.split(" "):
// if term in entry:
// indices.append(current_index)
// return indices