Skip to content

Instantly share code, notes, and snippets.

@bachwehbi
bachwehbi / server_activity.py
Last active August 29, 2015 14:01
Simple remote device activity monitoring using Beebotte.
#!/usr/bin/env python
# coding: utf8
############################################################
# This code uses the Beebotte API, you must have an account.
# You can register here: http://beebotte.com/register
############################################################
import os
import time
# configuration settings to be used with server_activity.py
# Modify as required.
# Not a beebotte user? register now on http://beebotte.com/register
_accesskey = 'YOUR_API_ACCESS_KEY'
_secretkey = 'YOUR_API_SECRET_KEY'
_period = 60 # send resource records every minute
# The network interface to report
_ifname = 'eth0'
@bachwehbi
bachwehbi / bbt_mqtt.py
Last active July 12, 2022 12:17
Simple example showing how to use MQTT in Beebotte. This code uses the Paho.mqtt Python client library.
#!/usr/bin/python
# Copyright (c) 2013-2014 Beebotte <contact@beebotte.com>
# This program is published under the MIT License (http://opensource.org/licenses/MIT).
############################################################
# This code uses the Beebotte API, you must have an account.
# You can register here: http://beebotte.com/register
#############################################################
@bachwehbi
bachwehbi / bbt_mqtt.js
Last active October 4, 2015 16:34
Simple example showing how to use MQTT in Beebotte. This code uses the MQTT.js Node client library.
// Copyright (c) 2013-2014 Beebotte <contact@beebotte.com>
// This program is published under the MIT License (http://opensource.org/licenses/MIT).
/////////////////////////////////////////////////////////////
// This code uses the Beebotte API, you must have an account.
// You can register here: http://beebotte.com/register
/////////////////////////////////////////////////////////////
var mqtt = require('mqtt')
@bachwehbi
bachwehbi / bbt_mqtt_sub.js
Created August 15, 2014 18:48
Simple subscriber: using Beebotte MQTT with secure connection, AES 256 encrypted data, QoS level 1
// Copyright (c) 2013-2014 Beebotte <contact@beebotte.com>
// This program is published under the MIT License (http://opensource.org/licenses/MIT).
/////////////////////////////////////////////////////////////
// This code uses the Beebotte API, you must have an account.
// You can register here: http://beebotte.com/register
/////////////////////////////////////////////////////////////
var mqtt = require('mqtt')
var crypto = require('crypto');
@bachwehbi
bachwehbi / bbt_mqtt_pub.js
Created August 15, 2014 18:49
Simple publisher: using Beebotte MQTT with secure connection, AES 256 encrypted data, QoS level 1
// Copyright (c) 2013-2014 Beebotte <contact@beebotte.com>
// This program is published under the MIT License (http://opensource.org/licenses/MIT).
/////////////////////////////////////////////////////////////
// This code uses the Beebotte API, you must have an account.
// You can register here: http://beebotte.com/register
/////////////////////////////////////////////////////////////
var mqtt = require('mqtt')
var crypto = require('crypto');
@bachwehbi
bachwehbi / bbt_mqtt_sigauth.js
Created August 27, 2014 01:01
Beebotte MQTT example with signature based authentication
var mqtt = require('mqtt')
var crypto = require('crypto');
//Creates a hash mac of a string
function sign (key, algo, str){
var hmac = crypto.createHmac(algo, key);
hmac.setEncoding('base64');
hmac.write(str);
// you can't read from the stream until you call end()
hmac.end();
@bachwehbi
bachwehbi / raspi_dht11.py
Last active October 21, 2023 08:25
Temperature and humidity monitoring using Raspberry Pi, DHT11 sensor and Beebotte
#!/usr/bin/env python
############################################################
# This code uses the Beebotte API, you must have an account.
# You can register here: http://beebotte.com/register
############################################################
import time
import Adafruit_DHT
from beebotte import *
@bachwehbi
bachwehbi / glileo_tutorial.py
Created September 25, 2014 22:22
Connecting Intel Galileo to Beebotte to report sensor data
#!/usr/bin/python
# coding: utf8
############################################################
# This code uses the Beebotte API, you must have an account.
# You can register here: http://beebotte.com/register
############################################################
import sys
import os
import time
@bachwehbi
bachwehbi / bbt_latency.cs
Created November 27, 2014 21:03
Measures the latency of Beebotte using the C# client SDK
/////////////////////////////////////////////////////////////
// Copyright (c) 2013-2014 Beebotte <contact@beebotte.com>
// This program is published under the MIT License (http://opensource.org/licenses/MIT).
//
// This code uses the Beebotte API, you must have an account.
// You can register here: http://beebotte.com/register
//
// This program measures the latency of Beebotte real time service.
//
// Use the NuGet package manager console install dependencies: