Skip to content

Instantly share code, notes, and snippets.

@hollie
hollie / nimbits.pl
Created December 23, 2013 19:13
Example gist by Kevin on using nimbits in the MisterHouse home automation program.
# Category = Charting
#@ Charts data points to nimbits cloud
use JSON;
$nimbits_proc = new Process_Item;
$house_wattage = new Generic_Item;
if ($Reload){
@hollie
hollie / gist:8384866
Created January 12, 2014 14:00
Interfacing to the HMO2024 on OS X with sigrok
sigrok-cli --driver hameg-hmo:conn=/dev/cu.usbserial-00001014 -p D0,D1 --frames 5
@hollie
hollie / mh_download.html
Created June 24, 2014 18:15
File that triggered the error
[{"name":"v3.1","zipball_url":"https://api.github.com/repos/hollie/misterhouse/zipball/v3.1","tarball_url":"https://api.github.com/repos/hollie/misterhouse/tarball/v3.1","commit":{"sha":"24b71a57f26187ffc1dfb54019ec47abaef73ec0","url":"https://api.github.com/repos/hollie/misterhouse/commits/24b71a57f26187ffc1dfb54019ec47abaef73ec0"}},{"name":"v3.0","zipball_url":"https://api.github.com/repos/hollie/misterhouse/zipball/v3.0","tarball_url":"https://api.github.com/repos/hollie/misterhouse/tarball/v3.0","commit":{"sha":"b3ba252c0b0d471ffa4b5ba114dd85f07fc21f41","url":"https://api.github.com/repos/hollie/misterhouse/commits/b3ba252c0b0d471ffa4b5ba114dd85f07fc21f41"}},{"name":"v2.200","zipball_url":"https://api.github.com/repos/hollie/misterhouse/zipball/v2.200","tarball_url":"https://api.github.com/repos/hollie/misterhouse/tarball/v2.200","commit":{"sha":"e88748aa0e257f258872440a7c636506931c4967","url":"https://api.github.com/repos/hollie/misterhouse/commits/e88748aa0e257f258872440a7c636506931c4967"}},{"name":"v2-
@hollie
hollie / kustweer.pl
Created October 4, 2014 06:52
Example web site parsing
#Category=Weather
my $kwb_file = "$config_parms{data_dir}/web/kwb.html";
my $kwb_voice = "/Volumes/Media/speech/kustweer.wave";
my $last_fetched_kwb; # To keep track of the last type of fetched weather report
my $weerbeeld;
$v_get_kwb = new Voice_Cmd "Check kustweerbericht [mini,prof]";
$v_process_kwb = new Voice_Cmd "Vertel het kustweerbericht";
@hollie
hollie / samsung_tv_control.pl
Created January 11, 2015 19:14
MisterHouse control for a Samsung Smart TV (by Brian Klier via the mailling list)
######################################################
# Klier Home Automation - Samsung TV Control Module #
# Version 1.00 #
# By: Brian Klier #
# January 11, 2015 #
# E-Mail: brian@kliernetwork.net #
# Webpage: http://kliernetwork.net #
######################################################
#
# Based on a post on the SamyGO forum from "pjnewman" on May 10, 2011
@hollie
hollie / ia7_interface.pl
Last active August 29, 2015 14:23
Example code to set the 'status' button in the MisterHouse IA7 web interface
#noloop=start
$ia7_status = new Generic_Item();
$ia7_status -> set_states("online","offline");
#noloop=stop
if ($New_Minute) {
$ia7_status->set('online');
print_log("State set to online");
@hollie
hollie / SWO_SetupForPrint.c
Created October 20, 2015 07:11
SWO setup for printinf on Gecko controllers too.
/**
* @brief Configures the SWO pin so that it can be used to print out debug info. Fixed for Gecko controllers
*/
void SWO_SetupForPrint(void) {
/* Enable GPIO clock. */
CMU ->HFPERCLKEN0 |= CMU_HFPERCLKEN0_GPIO;
/* Enable Serial wire output pin */
GPIO ->ROUTE |= GPIO_ROUTE_SWOPEN;
@hollie
hollie / ia7_config.json
Last active October 26, 2015 20:28
Setting direct control in IA7
{
"prefs" : {
"header_button" : "yes",
"state_log_show" : "yes",
"state_log_entries" : "4",
"always_double_buttons" : "yes",
"fp_icon_size" : "32",
"fp_state_popovers" : "yes",
"substate_percentages" : "20",
"disable_current_state" : "yes"
@hollie
hollie / kustweer.pl
Created November 11, 2015 20:43
Scrape the 'kustweerbericht' local weather page and convert it to speech
#Category=Weather
# noloop=start
my $kwb_file = "$config_parms{data_dir}/web/kwb.html";
my $kwb_voice = "/Volumes/Media/speech/kustweer.wave";
my $last_fetched_kwb; # To keep track of the last type of fetched weather report
my $weerbeeld;
my $kwb_player = "keuken"; # Default player
$v_get_kwb = new Voice_Cmd "[korte,volledige] weerbericht";
@hollie
hollie / mh_temp.user_code
Created March 20, 2016 20:02
v4.0 generated usercode
# List of X10_Item objects
use vars qw($backyard_light $bedroom_light1 $bedroom_light2 $garage_light $test_light1 $test_light2);
# List of X10_Appliance objects
use vars qw($fountain);
# List of Voice_Cmd objects
use vars qw($my_test1 $organizer_check $restart_tts $test_speak_mode $test_speech_flags $test_volume $v_clear_cache $v_debug $v_debug_toggle $v_fountain $v_garage_light $v_get_ical_data $v_http_control $v_list_debug_options $v_list_serial_items $v_list_voice_cmds $v_list_x10_items $v_listen $v_mhdl_page $v_mode $v_mode_toggle $v_read_tables $v_reboot $v_reboot_abort $v_reload_code $v_reload_code2 $v_repeat_last_spoken $v_restart_mh $v_set_password $v_show_debug $v_speed_benchmark $v_test_light2 $v_test_lights $v_undo_last_change $v_update_docs $v_uptime $v_version $v_voice_cmds_help $v_what_speed);
# List of Timer objects