- :1883 will be for local use only
- :8083 websocket secure
- :8883 mqtt secure
sudo apt-get install mosquitto
Don't forget to change the domain and allow port 443 through firewall
#!/usr/bin/env python | |
import RPi.GPIO as gpio | |
from time import sleep | |
import re | |
import sys | |
gpio.setmode(gpio.BCM) | |
red = 23 | |
yel = 24 |
### Keybase proof | |
I hereby claim: | |
* I am drmaq on github. | |
* I am shinobi (https://keybase.io/shinobi) on keybase. | |
* I have a public key whose fingerprint is E03A F081 95AA 01CC FA1D 1C84 D4CF B203 5892 DB05 | |
To claim this, I am signing this object: |
Docs - LXD Helpful Docs: | |
https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/ | |
https://www.flockport.com/flockport-first-look-at-lxd/ | |
http://insights.ubuntu.com/2016/03/14/the-lxd-2-0-story-prologue/ | |
Docs - Installation: | |
http://insights.ubuntu.com/2016/03/14/the-lxd-2-0-story-prologue/ | |
Docs - API: | |
https://linuxcontainers.org/lxd/getting-started-cli/ |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# config.vm.box = "ubuntu/xenial64" | |
#config.vm.network "private_network", ip: "10.0.0.10" | |
config.vm.define "webscraper" do |webscraper| | |
webscraper.vm.box = "ubuntu/xenial64" | |
webscraper.vm.network "forwarded_port", guest: 80, host:8080 | |
webscraper.vm.network "private_network", ip: "10.0.0.10" |
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
#!/bin/bash | |
function mosquitto-show-short-info { | |
echo "Mosquitto Installer for Hassbian" | |
} | |
function mosquitto-show-long-info { | |
echo "Installs the Mosquitto package for setting up a local MQTT server" | |
} |
# Instructions | |
## Content | |
1. Install OS | |
2. Connecting to the Pi | |
3. Setting up Raspian | |
4. Enable secure login | |
5. Install openHAB | |
6. Install mosquitto |
# Make a directory | |
mkdir ~/mosquitto | |
cd ~/mosquitto | |
# Get mosquitto for CentOS 6 and locally unpack it | |
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/oojah:/mqtt/RedHat_RHEL-6/x86_64/mosquitto-1.2-6.1.x86_64.rpm | |
rpm2cpio mosquitto-*.rpm | cpio -idmv | |
mosquitto-*.rpm | |
# Set up ~/service on uberspace |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int