Merge remote-tracking branch 'origin/main'

This commit is contained in:
Noe 2024-07-23 14:52:18 +02:00
commit f87f7bb2aa
5 changed files with 41 additions and 39 deletions

View File

@ -6,10 +6,10 @@ app="/opt/victronenergy/dbus-fzsonick-48tl/dbus-fzsonick-48tl.py"
args="$tty" args="$tty"
# Start aggregator.py in the background # Start aggregator.py in the background
/opt/victronenergy/dbus-fzsonick-48tl/aggregator.py & #/opt/victronenergy/dbus-fzsonick-48tl/aggregator.py &
# Start dbus-fzsonick-48tl.py using the start command # Start dbus-fzsonick-48tl.py using the start command
start $args start "$args"
# Wait for all background processes to finish # Wait for all background processes to finish
wait #wait

View File

@ -7,18 +7,19 @@ set -e
echo -e "\n============================ Deploy ============================\n" echo -e "\n============================ Deploy ============================\n"
ip_addresses_usb0=("10.2.2.118" "10.2.4.155" "10.2.3.244" "10.2.4.127" "10.2.4.96") #10.2.2.36 and 10.2.4.96 are Cerbo with fork usb0
ip_addresses_usb1=("10.2.0.179" ) ip_addresses_usb0=("10.2.2.118" "10.2.4.155" "10.2.3.244" "10.2.4.127")
ip_addresses_usb1=("10.2.0.179" "10.2.1.241" )
for ip_address in "${ip_addresses_usb0[@]}"; do for ip_address in "${ip_addresses_usb0[@]}"; do
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB0" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB0"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
@ -32,10 +33,10 @@ for ip_address in "${ip_addresses_usb1[@]}"; do
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB1" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB1"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/"

View File

@ -6,11 +6,11 @@ app="/opt/innovenergy/dbus-fzsonick-48tl/dbus-fzsonick-48tl.py"
args="$tty" args="$tty"
# Start aggregator.py in the background # Start aggregator.py in the background
/opt/innovenergy/dbus-fzsonick-48tl/aggregator.py & #/opt/innovenergy/dbus-fzsonick-48tl/aggregator.py &
# Start dbus-fzsonick-48tl.py using the start command # Start dbus-fzsonick-48tl.py using the start command
start $args start "$args"
# Wait for all background processes to finish # Wait for all background processes to finish
wait #wait

View File

@ -7,7 +7,8 @@ set -e
echo -e "\n============================ Deploy ============================\n" echo -e "\n============================ Deploy ============================\n"
ip_addresses_usb0=("10.2.0.155" "10.2.1.97" "10.2.0.104" "10.2.1.159" "10.2.0.224" "10.2.0.209" "10.2.0.227") #10.2.2.36 and 10.2.4.96 are Cerbo with fork usb0
ip_addresses_usb0=("10.2.0.155" "10.2.1.97" "10.2.0.104" "10.2.1.159" "10.2.0.224" "10.2.0.209" "10.2.0.227" "10.2.2.36" "10.2.4.96")
ip_addresses_usb1=("10.2.1.35") ip_addresses_usb1=("10.2.1.35")
@ -15,16 +16,16 @@ for ip_address in "${ip_addresses_usb0[@]}"; do
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB0" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB0"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "signals.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "signals.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "signals.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "signals.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "service/run" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/service" # scp "service/run" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/service"
scp "service/run" "root@"$ip_address":/data/dbus-fzsonick-48tl/service" # scp "service/run" "root@"$ip_address":/data/dbus-fzsonick-48tl/service"
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./start-tty.sh ttyUSB0" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./start-tty.sh ttyUSB0"
@ -36,16 +37,16 @@ for ip_address in "${ip_addresses_usb1[@]}"; do
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB1" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./stop-tty.sh ttyUSB1"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "dbus-fzsonick-48tl.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "aggregator.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/" scp "start.sh" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "signals.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/" # scp "signals.py" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/"
scp "signals.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/" # scp "signals.py" "root@"$ip_address":/data/dbus-fzsonick-48tl/"
scp "service/run" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/service" # scp "service/run" "root@"$ip_address":/opt/victronenergy/dbus-fzsonick-48tl/service"
scp "service/run" "root@"$ip_address":/data/dbus-fzsonick-48tl/service" # scp "service/run" "root@"$ip_address":/data/dbus-fzsonick-48tl/service"
ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./start-tty.sh ttyUSB1" ssh "$username"@"$ip_address" "cd /opt/victronenergy/serial-starter && echo '$root_password' | ./start-tty.sh ttyUSB1"

View File

@ -100,15 +100,15 @@ async def main(remote_host):
#### 3. import pika #### #### 3. import pika ####
print("Import pika!") print("Import pika!")
print(await import_pika(remote_host)) print(await import_pika(remote_host))
##### 4. stop battery service ###### # ##### 4. stop battery service ######
print("Stop battery service!") # print("Stop battery service!")
print(await stop_battery_service(remote_host)) # print(await stop_battery_service(remote_host))
##### 5. run rc.local ###### ##### 5. run rc.local ######
print("Run rc.local to set password, timezone and cp battery folder!") print("Run rc.local to set password, timezone and cp battery folder!")
print(await run_rclocal(remote_host)) print(await run_rclocal(remote_host))
##### 6. start battery service ###### # ##### 6. start battery service ######
print("Start battery service!") # print("Start battery service!")
print(await start_battery_service(remote_host)) # print(await start_battery_service(remote_host))
else: else:
sys.exit("It's not Venus GX!") sys.exit("It's not Venus GX!")