Skip to content

Instantly share code, notes, and snippets.

Chris Drumgoole cdrum

Block or report user

Report or block cdrum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View soil-monitor.ino
/*********************************************************************
The LAZY GARDENER!
My simple soil moisture detection and pump activation utility.
Copyright (c) Chris Drumgoole 2016
http://www.cdrum.com
https://github.com/cdrum/lazy-gardener
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@cdrum
cdrum / lifx-check.php
Last active Aug 29, 2015
Simple script to check status of lifx bulbs using ruby http api, and display count and last check time
View lifx-check.php
?php
$now = date("r");
// Change these settings to match your environment
const RESTAPI_URL = "http://192.168.1.221:56780";
$result = json_decode(file_get_contents(RESTAPI_URL . "/lights.json"));
View Example output
local http = require('socket.http')
http.TIMEOUT = 20
http.request{url='http://192.168.1.221:56780/lights/d073d5005654/on', method='PUT', headers = {['Content-Length'] = string.len(''),['Content-Type'] = 'application/x-www-form-urlencoded'}}
http.request{url='http://192.168.1.221:56780/lights/d073d5005654/color?hue=0&saturation=0&brightness=0.35138475623713&kelvin=2500', method='PUT', headers = {['Content-Length'] = string.len(''),['Content-Type'] = 'application/x-www-form-urlencoded'}}
http.request{url='http://192.168.1.221:56780/lights/d073d500114b/on', method='PUT', headers = {['Content-Length'] = string.len(''),['Content-Type'] = 'application/x-www-form-urlencoded'}}
http.request{url='http://192.168.1.221:56780/lights/d073d500114b/color?hue=0&saturation=0&brightness=0.28865491721981&kelvin=2500', method='PUT', headers = {['Content-Length'] = string.len(''),['Content-Type'] = 'application/x-www-form-urlencoded'}}
http.request{url='http://192.168.1.221:56780/lights/d073d5008af8/on', method='PUT', headers =
You can’t perform that action at this time.