Skip to content

Instantly share code, notes, and snippets.

View Brunty's full-sized avatar

Matt Brunt Brunty

View GitHub Profile
@Brunty
Brunty / glowmqtt.md
Created October 13, 2021 09:51 — forked from ndfred/glowmqtt.md

Here is a way to expose most of the Glow Display MQTT information to home assistant through templates. Please make sure you ask Hildebrand support to enable your account for MQTT access before setting everything up.

The first step is to connect Home Assistant to MQTT. If you don't have your own broker hooked up yet, go ahead and set it up (I would suggest using the Integrations UI) and specify your Glow username and password as well as glowmqtt.energyhive.com as the server and 8883 as the port to make sure we're establishing a secure SSL connection.

If you already have your own MQTT server hooked up to Home Assistant, like I do, you will have to set up a bridge between your MQTT server and the Glow one, after that your server will mirror the MQTT messages from the Glow server. You have to do this because Home Assistant does not support connecting to more than one MQTT server.

I will assume you are using Mosquitto as an MQTT server. Start by creating a file named `/etc/mo

@Brunty
Brunty / glowmqtt.py
Created October 13, 2021 09:51 — forked from ndfred/glowmqtt.py
Fetch data from a Hildebrand Glow device over MQTT
import datetime
import logging
import json
import paho.mqtt.client as mqtt # pip3 install paho-mqtt
GLOW_LOGIN = "GLOW_LOGIN"
GLOW_PASSWORD = "GLOW_PASSWORD"
GLOW_DEVICE_ID = "GLOW_DEVICE_ID"
# Fields gathered from the ZigBee Smart Energy Standard document
@Brunty
Brunty / post.md
Last active May 10, 2021 08:55
The title of the gist goes here

Test

Test McTestFace

  • Something
  • Else
  • Here
@Brunty
Brunty / configuration.yaml
Last active July 30, 2020 13:34
Message announcement in HA
# https://github.com/snarky-snark/home-assistant-variables
var:
media_volume_living_room:
friendly_name: "Living Room Media Volume"
initial_value: 0
media_volume_matt_office:
friendly_name: "Matt Office Media Volume"
initial_value: 0
@Brunty
Brunty / dokku-mysql-list-info.sh
Created July 7, 2017 14:04
list all the mysql containers, get the info about them, and print only the DSN for each one
dokku mysql:list | awk '!/NAME/{print $1}' | xargs -I % dokku mysql:info % | awk '/Dsn:/{print $2}'
<?php
#if (${NAMESPACE})
namespace ${NAMESPACE};
#end
#if (${NAMESPACE} && !${TESTED_NAMESPACE})
use ${TESTED_NAME};
#elseif (${TESTED_NAMESPACE} && ${NAMESPACE} != ${TESTED_NAMESPACE})
use ${TESTED_NAMESPACE}\\${TESTED_NAME};
<?php
namespace App\Context;
use Behat\Behat\Context\Context;
use Symfony\Component\Process\Process;
class ServerContext implements Context
{
const TIMEOUT = 10;
@Brunty
Brunty / Jenkinsfile
Created September 30, 2016 15:10
UAT deployments
stage("Deploy to UAT" ) {
node {
def gitCommit = gitCommit()
ansiblePlaybook extraVars: [release_version: "$gitCommit"],
inventory: 'ansible/inventories/uat',
playbook: 'ansible/deploy-uat.yml'
}
}
#!/usr/bin/env groovy
stage("Setup Project") {
node() {
sh "ls -lah"
// clean out all files within this workspace
deleteDir()
sh "ls -lah"
// Check out our repository