Skip to content

Instantly share code, notes, and snippets.

View jhalbrecht's full-sized avatar
💭
Grinning; It works! XamarinForms Mqtt secure mosquitto broker connection.

Jeff Albrecht jhalbrecht

💭
Grinning; It works! XamarinForms Mqtt secure mosquitto broker connection.
View GitHub Profile
Here is example of configuring the SPI0 pins.
First, verify cape unverisal is loaded:
[quote]
root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln
@jhalbrecht
jhalbrecht / mqttclient.cs
Last active November 4, 2017 00:13 — forked from mauroa/mqttclient
System.Net.Mqtt client sample
//Note that you can set more properties and also not set the port,
//in which case the MQTT default will be used
var configuration = new MqttConfiguration { Port = 55555 };
//Creation of the MQTT client
var client = await MqttClient.CreateAsync("192.168.1.29", configuration);
//MQTT connection of the client. You can pass optional args to the
//ConnectAsync method and credentials
await client.ConnectAsync(new MqttClientCredentials("testClient"));
@jhalbrecht
jhalbrecht / HomeAssistantRfButtonStuff.yaml
Created December 10, 2018 15:36
Home Assistant sensor and automation .yaml to toggle a SonOff light with a 433mhz RF Bridge w/tasmota for the buttons...
Given this topic make sensor/button unique in this working example any button on that topic will fire the automation.
tele/homeamation/sonoff02/STATE {"Time":"2018-12-10T16:30:27","Uptime":"30T22:46:46","Vcc":3.121,"POWER":"OFF","Wifi":{"AP":1,"SSId":"ADP","BSSId":"F8:32:E4:AE:00:F8","Channel":3,"RSSI":100}}
# commented lines are failed attempts
in sensors....
#
# button
#
# 12/9/2018
@jhalbrecht
jhalbrecht / PirParts.yaml
Created June 12, 2019 16:01
Home assistant sonoff tasmota rf bridge pir configuratiion
# binary_sensors.yaml
- platform: template
sensors:
test_pir_00:
value_template: '{{ is_state("sensor.sonoff_rf_bridge", "EA0FDE") }}'
# delay_off: '00:05:30'
delay_off: '00:00:30'
device_class: motion
friendly_name: "PIR One"
@jhalbrecht
jhalbrecht / Readme.md
Last active July 9, 2019 19:08 — forked from sarmis/foldergallery.html
Justified Image Gallery as Hugo shortcode

Forked and making some changes to better support how I'm using page resources in a Hugo Page bundle.

Usage { {< foldergallery src="imgs" >} } I changed this to;

{ {< foldergallery src="." >} } Which picks up all the files in my leaf page bundle including index.md

I want to change the "imgs" in the shortcode to something like;

{{ with .Resources.ByType "image" }}