Coder Social home page Coder Social logo

ccu-addon-howto's Introduction

ccu-addon-howto

Howto für die Entwicklung von Addons für die Homematic CCU und RaspberryMatic

WORK IN PROGRESS. EVERYONE IS INVITED TO PARTICIPATE! PULL REQUESTS WELCOME!

Inhalt

Einführung

...Erläuterung Buildroot basierte Systeme vs. Paketmanagement a la apt/rpm/...

Stuktur eines Addons

Eine Addon Datei ist eine .tar.gz Datei die auf oberster Ebene ein Shellscript update_script enthält. Dieses wird bei der Addon Installation ausgeführt.

Im Folgenden wird ein minimales Addon namens "foobar" beschrieben.

ccu-addon-foobar-1.0.tar.gz
    + foobar
    |- file1
    |- file2 
    |-  ... 
    - update_script
    - rc_script

update_script

#!/bin/sh

ADDONS_PATH=/usr/local/addons/
RC_PATH=/usr/local/etc/config/rc.d/

mount | grep /usr/local 2>&1 >/dev/null
if [ $? -eq 1 ]; then
  mount /usr/local
fi

cp -af foobar $ADDONS_PATH
cp -f rc_script $RC_PATH/foobar

sync
exit 0

Reboot nach Installation steuern (RaspberryMatic)

RaspberryMatic bietet die Möglichkeit über den Exit Code des update_script zu steuern ob ein Addon nach der Installation einen Reboot benötigt. Wird das update_script mit exit 0 verlassen macht RaspberryMatic keinen Reboot, wird ein Reboot benötigt kann dies über exit 10 erzwungen werden. Die CCU3 Firmware bietet dieses Feature nicht, hier wird immer ein Zwangsreboot nach Verlassen des update_script durchgeführt.

rc_script

Das rc_script dient dazu Informationen und Buttons in der Systemsteuerung/Zusatzsoftware bereitzustellen sowie (falls vorhanden) Services des Addons beim Systemstart zu starten.

Commands:

  • info
  • uninstall
  • start (optional)
  • stop (optional)
  • restart (optional)
#!/bin/sh


Button in Systemsteuerung

Zum Anlegen und Entfernen von Buttons im WebUI unter Systemsteuerung ...

Binaries portieren/bauen

Individuelle Webserver Konfiguration

Backup-Ausnahmen (RaspberryMatic)

RaspberryMatic bietet die Möglichkeit Verzeichnisse aus dem Backup auszunehmen. Wird in einem Verzeichnis eine Datei mit dem Namen .nobackup angelegt wird RaspberryMatic dieses Verzeichnis beim Backup nicht sichern. Die CCU3 bietet diese Feature (leider, noch?) nicht.

Dateien in Readonly Partition patchen

Best Practices

Weiterführende Links

  • Dokus, Wiki, Projekte, ...

Lizenz

ccu-addon-howto's People

Contributors

hobbyquaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.