Skip to content

Commit 6dc7712

Browse files
openhabianopenhabian
authored andcommitted
fix global python dependencies
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 parent d65606f commit 6dc7712

3 files changed

Lines changed: 16 additions & 23 deletions

File tree

functions/grott-install.bash

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ install_grott() {
3535

3636
echo "$(timestamp) [openHABian] Installing Grott Proxy with extension URL: $EXT_URL "
3737

38-
# Update system and install dependencies
38+
# Update system and install dependencies. NOTE: paho-mqtt is a required dependency (even if disabled)
3939
sudo apt update
40-
sudo apt install -y python3 python3-pip
41-
sudo pip3 install paho-mqtt requests # paho-mqtt is a required dependency (even if disabled)
40+
sudo apt install -y python3 python3-pip python3-paho-mqtt python3-requests
4241

4342
# Prepare installation directory
4443
sudo -u "$USERNAME" mkdir -p -m 755 "$INSTALL_DIR"
@@ -130,6 +129,8 @@ download_grott_files() {
130129
local GROTT_EXT_PY_FILE="grottext.py"
131130
local file url
132131

132+
echo "Installing files to $INSTALL_DIR "
133+
133134
# Download Grott main program Python files
134135
for file in "${GROTT_PY_FILES[@]}"; do
135136
url="${GROTT_FILE_URL}/${file}"

functions/grott-install.bats

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ teardown_file() {
2626

2727
## Check grott service is running
2828
echo -e "# ${COL_CYAN}$(timestamp) [openHABian] Checking if Grott Proxy service is running...${COL_DEF}" >&3
29-
run systemctl status grott
30-
echo "Grott service status: $status"
31-
echo "Grott service status: $output"
32-
3329
run systemctl is-active --quiet grott
34-
run systemctl is-active grott
35-
echo "Grott service is-active returned: $status"
36-
[ "$status" -eq 0 ] || { echo "Grott Proxy service failed to start"; systemctl status grott; exit 1; }
37-
3830
if [ "$status" -ne 0 ]; then echo "$output" >&3; fi
3931
[ "$status" -eq 0 ]
4032
echo -e "# ${COL_GREEN}$(timestamp) [openHABian] Grott Proxy service is running.${COL_DEF}" >&3

includes/grott.ini

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ ip = default
1919
port = 5279
2020

2121
# To blocks commands from outside (to channge inverter and shine devices settings) specify blockcmd = True,
22-
# Specify noipf = True if you still want be able to set the destination ip addres from growatt server (advice
22+
# Specify noipf = True if you still want be able to set the destination ip addres from growatt server (advice
2323
# only to use this for a short time)
24-
#blockcmd = True
24+
#blockcmd = True
2525
#noipf = True
2626

27-
# Time = auto/server parameter enable/disable date/time retrieval from data record (server), default is
28-
# auto: grott decides which time is used (data record if valid otherwise Server)
27+
# Time = auto/server parameter enable/disable date/time retrieval from data record (server), default is
28+
# auto: grott decides which time is used (data record if valid otherwise Server)
2929
# If time = server Grott server time is alwas used
30-
#time = auto
30+
#time = auto
3131

3232
# Sendbuf = True / False parameter to enable / disable sending historical (buffered) data. Default is sendbuf = True.
33-
#sendbuf = True
33+
#sendbuf = True
3434

35-
# Compat is True and valoffset needs to be set if offset / growatt protocol has been changed.
35+
# Compat is True and valoffset needs to be set if offset / growatt protocol has been changed.
3636
compat = False
3737
#valueoffset = 6
3838

@@ -45,14 +45,14 @@ invtype = sph
4545
# >2.1.0 if compat = false!)
4646
#decrypt = True
4747

48-
[Growatt]
48+
[Growatt]
4949
# Server name/IP address and port of Growatt server
5050
# specify only if the IP address of server.growatt.com is changed
5151
# The address as of Nov 2022 is 47.91.67.66
5252

5353
ip = server.growatt.com
5454
#ip = 47.91.67.66
55-
#port = 5279
55+
#port = 5279
5656

5757
[MQTT]
5858
# Mqtt parameters definitions
@@ -70,7 +70,7 @@ nomqtt = True
7070
# PVOutput parameters definitions
7171

7272
pvoutput = False
73-
#apikey = yourapikey
73+
#apikey = yourapikey
7474
# Data upload limit (in minutes)
7575
#pvuplimit = 5
7676
# Use this if you have one inverter
@@ -98,9 +98,9 @@ pvoutput = False
9898
#password = growatt2020
9999
#token = "influx_token"
100100
#org = "grottorg"
101-
#bucket = "grottdb"
101+
#bucket = "grottdb"
102102

103-
[extension]
103+
[extension]
104104
# grott extension parameters definitions
105105
extension = True
106106
extname = grottext

0 commit comments

Comments
 (0)