add: second controller in testing

This commit is contained in:
Tobias Reisinger 2020-08-27 21:35:26 +02:00
parent dc71d7ea10
commit cecf9856fe
5 changed files with 136 additions and 22 deletions

View file

@ -1,7 +1,7 @@
# Maintainer: Tobias Reisinger <tobias@msrg.cc>
pkgname=emgauwa-controller-testing
pkgver=0.3.7
pkgrel=1
pkgrel=2
epoch=
pkgdesc=""
arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
@ -16,14 +16,18 @@ conflicts=('emgauwa-controller')
backup=('etc/emgauwa/controller.ini')
source=("https://git.serguzim.me/emgauwa/controller/archive/testing-v$pkgver.tar.gz"
"controller.ini"
"controller2.ini"
"emgauwa-controller-testing.service"
"emgauwa-controller-testing2.service"
"emgauwa-controller-testing.sysusers"
"emgauwa-controller-testing.tmpfiles")
sha256sums=('569acded9108ebf0e8c8fc5dcd0b27e8872d63b5cdf07b3e960f97bd996e8827'
'5bfbe580ef1a373e3c025f28f3de591ba7ce57c4aba20bd1cc62555043d7bd13'
'16c4fb3323a6d74657c6fd57720406547a89e7fc0af5441ab2d155829a818541'
'b91003f435b89726b7d578a55f53aa49d344a13118306e61911637f72eb22959'
'0bbc44d680be2011800c553ae863663148be0820f08349993578c88e9a23b143'
'6cd1f42a50e6023566120416309d46f89238f47c4f9bda9332510251ccaf7d5d'
'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798'
'e62f47b41f0c4f116007ca0e05e0a50b45446763ccfa91b946b9d451c83ff5b4')
'81f3872318a669e21a8a7b31c97fa3e14dc10f8aed1df74fb983b417ba74be89')
prepare() {
cd "controller"
@ -40,7 +44,9 @@ package() {
install -Dm755 "controller/build/controller" "${pkgdir}/usr/bin/emgauwa-controller"
install -Dm660 "controller.ini" "${pkgdir}/etc/emgauwa/controller.ini"
install -Dm660 "controller2.ini" "${pkgdir}/etc/emgauwa/controller2.ini"
install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
install -Dm644 "${pkgname}2.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}2.service"
install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"

View file

@ -13,53 +13,51 @@ log-level = debug
log-file = /var/log/emgauwa/controller.log
[relay-0]
driver = piface
pin = 0
inverted = 0
[relay-1]
driver = piface
pin = 1
inverted = 0
[relay-2]
driver = gpio
pin = 5
inverted = 1
[relay-3]
[relay-1]
driver = gpio
pin = 4
inverted = 1
[relay-4]
[relay-2]
driver = gpio
pin = 3
inverted = 1
[relay-5]
[relay-3]
driver = gpio
pin = 2
inverted = 1
[relay-6]
[relay-4]
driver = gpio
pin = 1
inverted = 1
pulse-duration = 3
[relay-7]
[relay-5]
driver = gpio
pin = 0
inverted = 1
pulse-duration = 3
[relay-8]
[relay-6]
driver = gpio
pin = 16
inverted = 1
[relay-9]
[relay-7]
driver = gpio
pin = 15
inverted = 1
[relay-8]
driver = piface
pin = 1
inverted = 0
[relay-9]
driver = piface
pin = 0
inverted = 0

View file

@ -0,0 +1,97 @@
[controller]
name = second emgauwa device
: 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
discovery-port = 4420
: 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
mqtt-port = 1884
mqtt-host = localhost
relay-count = 10
database = /var/lib/emgauwa/controller/db2.sqlite
log-level = debug
log-file = /var/log/emgauwa/controller2.log
[relay-0]
driver = gpio
pin = 8
inverted = 0
[relay-1]
driver = gpio
pin = 9
inverted = 0
[relay-2]
driver = gpio
pin = 7
inverted = 0
[relay-3]
driver = gpio
pin = 0
inverted = 0
[relay-4]
driver = gpio
pin = 2
inverted = 0
[relay-5]
driver = gpio
pin = 3
inverted = 0
[relay-6]
driver = gpio
pin = 12
inverted = 0
[relay-7]
driver = gpio
pin = 13
inverted = 0
[relay-8]
driver = gpio
pin = 14
inverted = 0
[relay-9]
driver = gpio
pin = 11
inverted = 0
[relay-10]
driver = gpio
pin = 10
inverted = 0
[relay-11]
driver = gpio
pin = 6
inverted = 0
[relay-12]
driver = gpio
pin = 5
inverted = 1
pulse-duration = 5
[relay-13]
driver = gpio
pin = 4
inverted = 1
pulse-duration = 5
[relay-14]
driver = gpio
pin = 1
inverted = 1
pulse-duration = 2
[relay-15]
driver = gpio
pin = 16
inverted = 1
pulse-duration = 2

View file

@ -5,3 +5,4 @@ d /var/log/emgauwa 0750
Z /var/log/emgauwa - emgauwa emgauwa
z /etc/emgauwa 0755 root emgauwa
z /etc/emgauwa/controller.ini 0660 root emgauwa
z /etc/emgauwa/controller2.ini 0660 root emgauwa

View file

@ -0,0 +1,12 @@
[Unit]
Description=Emgauwa Controller [Testing] 2 Launcher
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/lib/emgauwa/controller/
ExecStart=emgauwa-controller start -c /etc/emgauwa/controller2.ini
Restart=on-failure
[Install]
WantedBy=multi-user.target