This file contains hidden or 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
#!/usr/bin/env sh | |
#################################################################### | |
### ____ _____ ____ ___ _ _ _ ___ _ _ _ __ __ ### | |
### | _ \| ____| __ )_ _| / \ | \ | | / _ \| \ | | | \ \ / / ### | |
### | | | | _| | _ \| | / _ \ | \| | | | | | \| | | \ V / ### | |
### | |_| | |___| |_) | | / ___ \| |\ | | |_| | |\ | |___| | ### | |
### |____/|_____|____/___/_/ \_\_| \_| \___/|_| \_|_____|_| ### | |
#################################################################### | |
####### _ _ ___ _ _ ____ _ _ _ _ _____ _ _ ######## |
This file contains hidden or 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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerName node.yourdomain.com | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html # this does not matter | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
This file contains hidden or 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
from __future__ import print_function | |
import os | |
import time | |
import paho.mqtt.client as mqtt | |
from paho.mqtt.client import MQTT_ERR_SUCCESS, MQTT_ERR_NO_CONN | |
DEVICES_PATH = "/sys/bus/w1/devices" |