Have learned much about with this forums i wish to share my setup.
my goal is run REW API with cli environments. its still going on but i successed setup with gui environment.
so this post about setting REW to use API in ARM64 based Linux system
Environment
raspberry pi 4B 8gb
pios with gui (derivated from Bullseye im sure it will also work within Bookworm)
Download
need to download 2 file
suggest to download within default browser. will be much easier then use terminal
* wish to attach url but since its my first post im unable to attach link url. those urls i found in this forum
1. Download REW_linux_no_jre_5_40_beta_20
2. Download java8jdk
* should download Linux ARM64 Compressed Archive
Install
assume your user account is 'user'
assume you have download those files at /home/user/Downloads
following instruction run by terminal
1. install java8
# change directory where java file exists
- cd ~/Downloads
# make directory where java will installed
- sudo mkdir -p /usr/local/java
# unzip downloaded file to "/usr/local/java"
- sudo tar -xvzf jdk-8u391-linux-aarch64.tar.gz -C /usr/local/java
# set JAVA_HOME and PATH variables if needed
- echo 'export JAVA_HOME=/usr/local/java/jdk1.8.0_391' >> ~/.bashrc
- echo 'export PATH=$PATH:$JAVA_HOME/bin' >> ~/.bashrc
# incase you have multiple java then need to select default version
- sudo update-alternatives --install /usr/bin/java java /usr/local/java/jdk1.8.0_391/bin/java 1
- sudo update-alternatives --config java
2. install REW
# after java installed and set java version
- ~/Downloads/REW_linux_no_jre_5_40_beta_20
Test
assume your user account is 'user'
following instruction run by terminal
1. Test REW API
- /home/user/REW/roomeqwizard -api
* if REW installed successfully then REW will launched
2. Test REW API without GUI
- /home/user/REW/roomeqwizard -api -nogui
* in default brower type your localhost with port 4735
* if runs successfully then will see Swagger UI based document
3. Test request
* have tested request within below python scripts
* need to run this script while api running if not will prompt error
* if run successfully then will terminate api
assume python scripts at /home/user/REW_api and file name is test_request.py
- cd /home/user/REW_api
- python test_request.py
thanks to read
my goal is run REW API with cli environments. its still going on but i successed setup with gui environment.
so this post about setting REW to use API in ARM64 based Linux system
Environment
raspberry pi 4B 8gb
pios with gui (derivated from Bullseye im sure it will also work within Bookworm)
Download
need to download 2 file
suggest to download within default browser. will be much easier then use terminal
* wish to attach url but since its my first post im unable to attach link url. those urls i found in this forum
1. Download REW_linux_no_jre_5_40_beta_20
2. Download java8jdk
* should download Linux ARM64 Compressed Archive
Install
assume your user account is 'user'
assume you have download those files at /home/user/Downloads
following instruction run by terminal
1. install java8
# change directory where java file exists
- cd ~/Downloads
# make directory where java will installed
- sudo mkdir -p /usr/local/java
# unzip downloaded file to "/usr/local/java"
- sudo tar -xvzf jdk-8u391-linux-aarch64.tar.gz -C /usr/local/java
# set JAVA_HOME and PATH variables if needed
- echo 'export JAVA_HOME=/usr/local/java/jdk1.8.0_391' >> ~/.bashrc
- echo 'export PATH=$PATH:$JAVA_HOME/bin' >> ~/.bashrc
# incase you have multiple java then need to select default version
- sudo update-alternatives --install /usr/bin/java java /usr/local/java/jdk1.8.0_391/bin/java 1
- sudo update-alternatives --config java
2. install REW
# after java installed and set java version
- ~/Downloads/REW_linux_no_jre_5_40_beta_20
Test
assume your user account is 'user'
following instruction run by terminal
1. Test REW API
- /home/user/REW/roomeqwizard -api
* if REW installed successfully then REW will launched
2. Test REW API without GUI
- /home/user/REW/roomeqwizard -api -nogui
* in default brower type your localhost with port 4735
* if runs successfully then will see Swagger UI based document
3. Test request
* have tested request within below python scripts
* need to run this script while api running if not will prompt error
* if run successfully then will terminate api
assume python scripts at /home/user/REW_api and file name is test_request.py
- cd /home/user/REW_api
- python test_request.py
""" this scripts request terminate application """ import requests command_url = 'localhost:defaultport/application/command' command_data = { "command": "shutdown" } response = requests.post(command_url, json=command_data) if response.status_code == 202: print("Shutdown command sent successfully") else: print(f"Failed to send shutdown command, status code: {response.status_code}, response: {response.text}") |
thanks to read