As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.0 This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
# ####################################### | |
# | |
# HAL file for HostMot2 with 3 steppers | |
# | |
# Derived from Ted Hyde's original hm2-servo config | |
# | |
# Based up work and discussion with Seb & Peter & Jeff | |
# GNU license references - insert here. www.linuxcnc.org | |
# | |
# |
# Load our handwheel.py script as handwheel (symlinked from ~/linuxcnc/handwheel.py -> /usr/bin/handwheel) | |
loadusr -Wn handwheel handwheel | |
#net handwheel.plus | |
# Jog Pendant | |
# loadrt encoder num_chan=1 | |
# addf encoder.capture-position servo-thread | |
# addf encoder.update-counters base-thread | |
# |
import re | |
import requests | |
import html | |
# Hole Webseite | |
url = "https://www.abfall-landkreis-waldshut.de/de/termine/abfuhrtage.php?ort=78" | |
r = requests.get(url) | |
# baue Regex der alle notwendigen Mülltypen findet <td>Mülltyp</td><td>Daten</td> | |
trash_types = ["Restmüll","Biotonne","Grünabfälle","Gelber Sack","Blaue Tonne"] |
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
do cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib -DCMAKE_INSTALL_PREFIX=/usr ..
/usr/lib/python3.6/dist-packages/
but we need the in /usr/local/lib/python3.6/site-packages/
, so do a sudo cp /usr/lib/python3.6/dist-packages/cec.py /usr/local/lib/python3.6/site-packages/
and a sudo cp /usr/lib/python3.6/dist-packages/_cec.so /usr/local/lib/python3.6/site-packages/
#!/usr/bin/env python | |
import sys | |
import re | |
if len(sys.argv) != 2: | |
print("please pass .loxone file as argument") | |
sys.exit(1) | |
with open(sys.argv[1]) as lox, open("export.txt","w") as ex: |
#!/usr/bin/env python | |
import sys | |
import re | |
import zipfile | |
if len(sys.argv) != 2: | |
print("Please pass .knxproj file as argument") |
#!/usr/bin/env python | |
import os | |
import sys | |
import re | |
import click | |
import subprocess | |
class WGConfigurator: |
## Working example | |
- platform: template | |
sensors: | |
person_count: | |
friendly_name: "Number of Person at home" | |
unit_of_measurement: 'person' | |
entity_id: | |
- person.person1 | |
- person.person2 |
[Unit] | |
Description=Certbot certificate renewal | |
[Service] | |
ExecStart=/usr/bin/certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" | |
ExecStartPost=/usr/bin/systemctl restart nginx |