Add reset to OCCU (#235)

* Update config.json

* Update run.sh

* Update CHANGELOG.md

* Update config.json

* Update run.sh

* Update config.json

* Update CHANGELOG.md
This commit is contained in:
Pascal Vizeli
2018-01-19 14:21:35 +01:00
committed by GitHub
parent a3adccafa7
commit f7530f2b30
3 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 2.31.25-p1
- Add `reset` options for RF modules
## 2.31.25-p0
- Update OCCU to 2.31.25
## 2.31.23-p0
- Update OCCU to 2.31.23

View File

@@ -1,6 +1,6 @@
{
"name": "HomeMatic OCCU",
"version": "2.31.25-p0",
"version": "2.31.25-p1",
"slug": "homematic",
"description": "HomeMatic central based on OCCU",
"url": "https://home-assistant.io/addons/homematic/",
@@ -18,7 +18,8 @@
"rf": [
{
"type": "CCU2",
"device": "/dev/ttyAMA0"
"device": "/dev/ttyAMA0",
"reset": false
}
],
"wired_enable": false,
@@ -35,7 +36,8 @@
"rf": [
{
"type": "match(CCU2)",
"device": "match(^/dev/.*$)"
"device": "match(^/dev/.*$)",
"reset": "bool?"
}
],
"wired_enable": "bool",

View File

@@ -30,6 +30,7 @@ if [ "$RF_ENABLE" == "true" ]; then
# Init GPIO
RESET=$(jq --raw-output ".rf[$i].reset // false" $CONFIG_PATH)
if [ ! -d /sys/class/gpio/gpio18 ]; then
echo 18 > /sys/class/gpio/export
sleep 2
@@ -38,6 +39,12 @@ if [ "$RF_ENABLE" == "true" ]; then
echo out > /sys/class/gpio/gpio18/direction
sleep 2
fi
if [ "$RESET" == "true" ]; then
echo 1 > /sys/class/gpio/gpio18/direction
sleep 0.5
fi
echo 0 > /sys/class/gpio/gpio18/direction
sleep 0.5
fi
done