This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @authors Michael Ritchie | |
* @twitter @thanksmister | |
* @version Sept 11, 2012 | |
* | |
* Use: | |
* <controls:MaskedImage source="assets/imageToMask.png" height="200" width="200" maskImage="assets/mask.png"/> | |
* The mask image can be any shaped, just make it in Photoshop, but should be smaller than the image you wish to mask. | |
* Try just making a black mask shape and saving it out as .png file with alpha. | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: Michael Ritchie, ThanksMister LLC | |
* Date: 10/16/12 | |
* Web: thanksmister.com | |
* | |
* Extension of <code>TextView</code> that adds listener for ellipses changes. This can be used to determine | |
* if a TextView has an ellipses or not. | |
* | |
* Derived from discussion on StackOverflow: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// data sevice class calling API and returning list of exchanges | |
public class DataService | |
{ | |
private PublishSubject<List<Exchange>> exchangesRequest; | |
public DataService() | |
{} | |
// Get exchanges without any polling which returns results to subscription on time | |
public Subscription getExchanges(final Observer<List<Exchange>> observer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Raspberry Pi with WiFi | |
# Install Paho and eSpeak libraries for Raspberry Pi | |
# Run using "python3 MQTTSpeak.py" | |
# Import MQTT client. | |
import os | |
import time | |
import paho.mqtt.client as paho | |
# MQTT credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/mosquitto/conf.d/mosquitto.conf | |
# Bridge to HA | |
connection snips-ha | |
# bridge_cafile /etc/mosquitto/ | |
bridge_insecure true | |
address 192.168.86.228:1883 | |
cleansession false | |
clientid snips | |
start_type automatic | |
#username _your user_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_view: | |
name: Home | |
view: yes | |
entities: | |
- group.heater_system | |
- group.alarm_system | |
- group.lights | |
- group.outside_cameras | |
- group.air_controls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: cover rain | |
description: Close cover when it rains (or other weather conditions. | |
domain: automation | |
input: | |
cover_entity: | |
name: cover | |
selector: | |
entity: | |
domain: cover |
OlderNewer