Skip to content

Commit 0a20332

Browse files
committed
update with repo release
1 parent ce66747 commit 0a20332

File tree

12 files changed

+108
-282
lines changed

12 files changed

+108
-282
lines changed

DEBIAN/control

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Package: soma-connect
2+
Version: 2.2.0
3+
Section: base
4+
Priority: optional
5+
Architecture: armhf
6+
Depends: ifplugd
7+
Maintainer: SOMA <support@somasmarthome.com>
8+
Description: SOMA Connect
9+

DEBIAN/postinst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -e
2+
3+
systemctl daemon-reload || true
4+
/bin/hciconfig hci0 down || true
5+
sed -i 's/AutoEnable=true/AutoEnable=false/g' /etc/bluetooth/main.conf || true
6+
sed -i 's/^dtparam=pwr_led_trigger=none//' /boot/config.txt || true
7+
sed -i 's/^dtparam=pwr_led_activelow=off//' /boot/config.txt || true
8+
systemctl stop smbd || true
9+
systemctl disable smbd || true
10+
rm /etc/dhcp/dhclient-enter-hooks.d/samba || true
11+
systemctl start soma-connect.service || true
12+
systemctl restart rsyslog || true
13+
crontab /etc/soma-connect-crontab.conf || true
14+

DEBIAN/preinst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if [ "`systemctl is-active soma-connect.service`" == "active" ]
4+
then
5+
systemctl stop soma-connect.service
6+
fi
7+

LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

README.md

Lines changed: 47 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,59 @@
11
# SOMA Connect
2+
This is the application running on the SOMA Connect bridges. You can download and install it directly on your Raspberry Pi.
23

3-
This is the application running on the SOMA Connect bridges. You can download and install it directly on your raspberry pi.
4+
## Installation
5+
We publish this to our repository server. So first you need to add the HOOBS repository to your sources.
46

7+
```
8+
wget -qO- https://support.hoobs.org/setup | sudo -E bash -
9+
```
510

6-
## Important Notes before installing
11+
Now you can install SOMA Connect.
712

8-
**Supported Devices**
9-
- Raspberry Pi 3B
10-
- Raspberry Pi 3B+
11-
- Raspberry Pi 4
13+
```
14+
sudo apt install soma-connect
15+
```
1216

13-
**HOOBS must be connected via Wi-Fi, not ethernet cable**
17+
## Add SOMA Connect to Homekit
18+
1. Download and install the iOS app [Smart Shades](https://apps.apple.com/us/app/smart-shades/id1016406862) on your iPhone / iPad
19+
2. Use the Smart Shades app to calibrate your shades motor
20+
3. From the left hand menu, click on SOMA Connect inside the Smart Shades App
21+
4. Hold your iPhone / iPad close to your Raspberry Pi
22+
5. When prompted, select your home wifi network and input the wifi password (if you tried to add this to Homekit before, you must click Empty Homekit Cache)
23+
6. (Optional) Write down the MAC Address prompted if you want to configure it to work with Alexa later
24+
7. Exit setup then go into the Home App
25+
8. Click Add Accessory then click Don't have a Code or Can't Scan?
26+
9. You should see the smart shades accessory appear there. Click on it then enter the following code: **031-45-154**
27+
10. Configure the name and room of the accessory.
28+
29+
## Building
30+
This is a binary release, so the build process simply creates the .deb package. Since we sign our packages, you will need to clone our security repository to get access to our GPG keys.
1431

32+
```
33+
cd ~/HOOBS
34+
git clone https://github.com/hoobs-org/security.git
35+
```
1536

16-
## Installation Instructions - Run these commands from the HOOBS UI Terminal
37+
> Note these files are protected. You will need to login to clone. You also need to be a member of the HOOBS orginization.
1738
18-
Download and save release file
39+
Now you need to import the GPG keys to your key chain.
1940

20-
```sudo wget https://github.com/hoobs-org/soma-connect/releases/download/1.8.37/soma-connect_1.8.37_armhf.deb -O soma-connect.deb```
21-
22-
Install dependencies
23-
24-
```sudo apt-get install ifplugd```
25-
26-
Install package
27-
28-
```sudo dpkg -i soma-connect.deb```
29-
30-
Application must be run as service. Here's how to create and start the service:
31-
32-
1. Create service file
33-
34-
```sudo nano /etc/systemd/system/soma-connect.service```
35-
36-
2. Paste the following in it then press ctrl+x to exit nano and press y then enter to save file changes:
37-
38-
```
39-
[Unit]
40-
Description=Soma-Connect Server
41-
After=syslog.target network-online.target
41+
```
42+
cd ~/HOOBS
43+
gpg --import ./security/repo/publickey.gpg
44+
gpg --allow-secret-key-import --import ./security/repo/privatekey.gpg
45+
```
4246

43-
[Service]
44-
Type=simple
45-
ExecStart=/usr/lib/soma-connect/soma-connect
46-
Restart=on-failure
47-
RestartSec=10
48-
KillMode=process
47+
Now check your keys to see if the hoobs key is there.
4948

50-
[Install]
51-
WantedBy=multi-user.target
52-
```
53-
3. Reload daemon
54-
55-
```sudo systemctl daemon-reload```
56-
57-
4. Enable service
58-
59-
```sudo systemctl enable soma-connect```
60-
61-
5. Start service
62-
63-
```sudo systemctl start soma-connect```
64-
65-
To check the status of the service you can type ```systemctl status soma-connect```
66-
To view the logs from the application you can type ```journalctl -f -u soma-connect```
67-
68-
69-
## Add Soma Connect to Homekit
70-
71-
1. Download and install the iOS app [Smart Shades](https://apps.apple.com/us/app/smart-shades/id1016406862) on your iPhone / iPad
72-
73-
2. Use the Smart Shades app to calibrate your shades motor
74-
75-
3. From the left hand menu, click on SOMA Connect inside the Smart Shades App
76-
77-
4. Hold your iPhone / iPad close to your Raspberry Pi
78-
79-
5. When prompted, select your home wifi network and input the wifi password (if you tried to add this to Homekit before, you must click Empty Homekit Cache)
80-
81-
6. (Optional) Write down the MAC Address prompted if you want to configure it to work with Alexa later
82-
83-
7. Exit setup then go into the Home App
84-
85-
8. Click Add Accessory then click Don't have a Code or Can't Scan?
86-
87-
9. You should see the smart shades accessory appear there. Click on it then enter the following code: **031-45-154**
88-
89-
10. Configure the name and room of the accessory.
90-
91-
92-
93-
49+
```
50+
gpg --list-keys | grep hoobs
51+
```
52+
53+
The output should look something like this.
54+
```
55+
uid [ultimate] hoobs <info@hoobs.org>
56+
```
57+
58+
## Legal
59+
HOOBS and the HOOBS logo are registered trademarks of HOOBS Inc. Copyright (C) 2020 HOOBS Inc. All rights reserved.

etc/rsyslog.d/soma-connect.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
if $programname == 'soma-connect' then ~

etc/soma-connect-crontab.conf

Whitespace-only changes.

lib/systemd/system/devrepoinit.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash -e
2+
3+
MAC="$(ip addr show wlan0 | awk '/ether/{print $2}' || true)"
4+
if [[ "$MAC" =~ ^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$ ]] ; then
5+
CODENAME="$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release || true)"
6+
URL="deb http://soma-dev-repo.s3.amazonaws.com/id/$MAC/apt/raspbian $CODENAME main"
7+
echo $URL > /etc/apt/sources.list.d/soma-dev-repo-id.list || true
8+
fi

0 commit comments

Comments
 (0)