Skip to content

Instantly share code, notes, and snippets.

View ckarrie's full-sized avatar
🏠
Working from home

Christian Karrié ckarrie

🏠
Working from home
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" configId="0">
<specVersion>
<major>1</major>
<minor>1</minor>
</specVersion>
<device>
<deviceType>urn:ses-com:device:SatIPServer:1</deviceType>
<friendlyName>IPLNB-030601:SAT&gt;IP</friendlyName>
<manufacturer>Inverto Digital Labs</manufacturer>
from xml.dom.minidom import parse
import urllib
IP = "192.168.178.45"
XML_FILE = "status.xml"
DI1_ELEMENT = "DigitalInput1"
OPEN = "OPEN"
CLOSED = "CLOSED"
xmlpath = "http://" + IP + "/" + XML_FILE
import serial
ser = serial.Serial("/dev/ttyUSB0", 9600, timeout=0.1)
while True:
data = ser.read(16)
ser.flushInput()
if len(data) > 1:
data = data.replace("#", "")
Installation
================================
- Zusätzliche Treiber: Firmware für DVB-Kartem -> aktivieren
- synaptic installieren. dort:
- Paketquelle proposed aktivieren
- update + upgrade
- openssh-server + mercurial installieren
- reboot
@ckarrie
ckarrie / pp.py
Last active April 5, 2016 04:31
TVHeadend Python PostProcessing script
"""
Author: ckarrie <ckarrie@gmail.com>
Python PostProcessing script that deletes all duplicate recordings according to their
description and filesize. The script keeps the recording with the largest filesize.
Usage:
1) put this python file somewhere (i.e. /media/daten/tvheadend/pp.py)
2) Add this line to TVHeadend > Configuration > Recording > [your recording settings] > Post-processor command