mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 21:24:20 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user