usb drive in PC
start RPI imager
device: RPI4
OS: Raspberry Pi OS (64 bit )
storage: uSD … USB drive ( 250GB NVME WD BLACK in USB 3 ORICO )
[NEXT][edit settings]
+ name RPI4 …
+ user pi
+ password ( like for SSH login )
– wifi ( as we build a server )
+ enable SSH
BURN with settings YES
try to boot the RPI with it
( i work headless so i just have to wait and see the new IP in network )
but even without, i use the Bitvise SSH client
it finds RPI4 ( login with my preset password ) sudo raspi-config
+ Interface options enable VNC
i want fix IP: sudo nmcli c show
sudo nmcli c mod 'Wired connection 1' ipv4.addresses 192.168.1.104/24 ipv4.method manual
sudo nmcli con mod 'Wired connection 1' ipv4.gateway 192.168.1.1
sudo nmcli con mod 'Wired connection 1' ipv4.dns "10.10.30.1 8.8.8.8 8.8.4.4"
and i can connect
send (publish) at boot a hello and a 1 min empty template report
and to show it, use like the local client from that RPI4 in terminal: mosquitto_sub -h localhost -u "uPICOW" -P "pPICOW" -v -t "#"
and do also MQTT OPERATION ( like in a second terminal ): mosquitto_pub -h localhost -u "uPICOW" -P "pPICOW" -t "PICOW/D215/set" -m "R1ON"
mosquitto_pub -h localhost -u "uPICOW" -P "pPICOW" -t "PICOW/D215/set" -m "R1OFF"
because i have on that PICO W a 4 RELAY board installed ( and i see RELAY 1 is working )
in RPI4 open browser and do
https://downloads.arduino.cc/arduino-1.8.19-linuxaarch64.tar.xz?_gl=1*1v5vec3*_up*MQ..*_ga*MTA3MjU4ODUwMy4xNzQxMDY2NzU1*_ga_NEXN8H46L5*MTc0MTA2Njc1NC4xLjAuMTc0MTA2Njc1NC4wLjAuNDY3OTQ2MDk3
or on terminal use WGET ...
that i got from https://www.arduino.cc/en/software
the 1.8.19 linux arm 64 bit
cd Downloads
find arduino-1.8.19-linuxaarch64.tar tar -xvf arduino-*.tar
cd arduino-1.8.19
sudo ./install.sh
find in menu / programming /
Arduino IDE
i have not done that for a long time,
actually work win 10 PC Arduino IDE 2
but it still makes sense:
-a- my RPIs are headless
-b- i work VNCviewer ( on windows / linux / android )
so when connect to USB of RPI,
can use THONNY or Arduino IDE to code
* Arduino
* ESP
* RPI PICO
boards in
* Arduino
* MicroPython
* CircuitPython ( use MU editor )
from everywhere inside LAN ( sorry, beach is too far away )
after setup ( and run ) you find path:
/home/pi/Arduino _____________// already with path /libraries in it
there you can copy your projects
but first make a
BACKUP
made a SD card copy ( to uSD 8GB / 317MB free only )
as RPI4 master / BACKUP
test it is running with mosquitto and node-red
now can start CONFIG work
that's the thing, with Arduino IDE not only program Arduinos
to allow use PICO W and ESP32...
and in
/tools/board/board Manager/
search esp or pico
and install like :
Raspberry Pi Pico/RP2040/RP2350 by Earle F. Philhower, III
and then select a board in
/tools/board/
here as example start with ESP32S3 WEBSERVER MQTT ( a combined project works also for PICO W / PICO 2 W
but first get ERROR about missing Library 'PubSubClient'
also must config your WIFI settings
select the board ESP32S3 Dev
connect the board to RPI USB and select that port in /tools/ menu
press download ( what does SAVE / COMPILE / FLASH )
and check serial in-comming ( best press reset on board again to see the start / webpage ... )
cd IOTstack/
./menu.sh
++ select
Grafana
InfluxDB
Mosquitto
Node-RED
Portainer-CE
now all that preparation actually results in ONE file used to setup the containers docker-compose.yml
could just use that and docker compose up -d docker-compose ps
PORTAINER
https://192.168.1.104:9443
admin
new password
for database
http://192.168.1.104:1880
( not come with project ( or password ) option )
try mqtt_in mqtt_out ( not have password option )
use 'CHANGE' and 'influxdb out' to save to database 'data' table 'data' column 'num' and 'text'
GRAFANA
http://192.168.1.104:3000
( first login admin admin )
set new password:
admin
new password
data source
influxdb
HTTP URL
http://192.168.1.104:8086
Database 'data'
GET
2
[SAVE & TEST]
ADD dashboard NEW add panel
data num
name panel
name dashboard save
Summary:
+ + now have a ?professional? database instead SQLITE
+ + GRAFANA Trend menu i could never do in NR dashboard trend SQL... possibly just install additionally
- see problems:
- - MQTT (in docker ) setup without password // can do later?
- - Node-Red no Project / Password options setup
try link to our sqlite file
[/home/pi/Projects/PICO_W/data.sqlite3]
[file:]
[]
[] mode=ro&_ignore_check_constraints=1
[0]
but: permission error for sqlite plugin Forum
In documentation for Sqlite plugin defined this trouble.
# edit (override) the grafana systemd configuration
systemctl edit grafana-server
add the following lines
[Service]
ProtectHome=false
reload the systemd config and restart the app