Check your current network status with
ifconfig
If your wifi has an ip address, it is still connected and active. Deactivate it temporarily with
sudo ifconfig wlan0 down
To permanently deactivate the wifi you can add a line to your crontab. Open it with
sudo crontab -e
If it is the first of crontab it asks for your favorite editor. I normally use nano, choice 1 in my case. Then add this line
@reboot ifconfig wlan0 down
Or if the deactivation should only be done 5 minutes after startup (then you can still connect without ethernet if you need to)
@reboot sleep 300 && ifconfig wlan0 down
This should look like this here
Save with CTRL+O and exit with CTRL+X.
E.g. create file with sqlite3 iobroker.sqlite
and then transfer ownershop with
/opt/iobroker/iobroker-data/sqlite $ sudo chown iobroker:iobroker iobroker.sqlite
Like described here: https://pimylifeup.com/raspberry-pi-postgresql/
sudo apt update
sudo apt install postgresql
sudo su postgres
createuser pi -P --interactive
Answer this question with y
Shall the new role be a superuser? (y/n) y
Then start psql
psql
Create a database for the new user and find out the config for external connections
create database pi;
SHOW config_file
Use that path in the following commands to edit it and scan for some more information
sudo nano /etc/postgresql/13/main/postgresql.conf
Now uncomment or change this line to allow connections from external hosts
listen_addresses = '*'
Now we need to allow the user external connections, so look for the pg_hba.conf
file in your postgresql.conf
grep pg_hba.conf /etc/postgresql/13/main/postgresql.conf
Edit that file and add this line at the end. Read instructions in this file if you want other settings.
host all all 0.0.0.0/0 md5
View status of the database and restart it
sudo systemctl status postgresql
sudo systemctl restart postgresql
Then use a tool like sqlelectron
to connect to that database
free -m
shows you something like
pi@rpi:~ $ free -m
total used free shared buff/cache available
Mem: 923 683 100 14 139 200
Swap: 99 98 1
The swap file is always pretty small and it can be increased. Good link to increase the swap on rasperry pi: https://pimylifeup.com/raspberry-pi-swap-file/
sudo reboot