Solving Problem opencv 4.x.x video stream failed


I hope this can help

Change

videocapture = cv2.VideoCapture(0 )

to

videocapture = cv2.VideoCapture(0 , cv2.CAP_V4L )

Enabling Remote VNC in Jetson Nano


Fresh install Jetson Nano

sudo ln -s ../vino-server.service \
    /usr/lib/systemd/user/graphical-session.target.wants

gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false

nmcli connection show

copy the UUID active connection
dconf write /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections "['PASTE HERE YOUR UUID']"

sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml

PASTE THIS INSIDE SCHEMA
<key name='enabled' type='b'>
     <summary>Enable remote access to the desktop</summary>
      <description>
       If true, allows remote access to the desktop via the RFB
       protocol. Users on remote machines may then connect to the
       desktop using a VNC viewer.
      </description>
     <default>false</default>
    </key>
sudo glib-compile-schemas /usr/share/glib-2.0/schemas

export DISPLAY=:1 //OR USE 0

/usr/lib/vino/vino-server

IF success you can use remmina or realvnc client to connect to Jetson Nano



Making systemd service

sudo vim /etc/systemd/system/vinostartup.service

[Unit]
Description = description about the service
After = network.target
[Service]
ExecStart = /usr/lib/vino/vino-server
[Install]
WantedBy = multi-user.target

 

sudo systemctl enable vinostartup.service

 

Done

Happy Coding

Salam Ngoprek

Membuat server monitoring menggunakan docker dan grafana


Seringkali kita ingin visualisasi status dari banyak device yang kita miliki, saya membuat server/komputer/dll monitoring dengan memanfaatkan fitur input ping dari telegraf yang kemudian digabungkan dengan grafana dan influxdb.

Cekidot di github saya disini https://github.com/susiloharjo/docker-grafana-monitoring.

Hasilnya akan seperti ini

Screenshot from 2020-01-12 15-34-17

Screenshot from 2020-01-12 15-39-43

Semoga bermanfaat, selamat mencoba, dan salam ngoprek

Cara install node-red di ubuntu 18.04


Dibawah ini adalah catatan mengenai cara install node-red di ubuntu, pertama tama sebelum kita menginstall node-red maka kita harus menginstall nodejs terlebih dahulu dengan cara

sudo apt update && upgrade -y

curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh

sudo bash nodesource_setup.sh

sudo apt install -y nodejs

#setelah itu lanjut mengintall node-red

sudo npm install -g --unsafe-perm node-red node-red-admin

# done node-red sudah jalan untuk test node-red jalankan perintah dibawah ini

node-red

Nah apabila kalian ingin dijadikan service biar bisa njalanin otomatis pada saat start copy script ini di

sudo nano /etc/systemd/system/node-red.service
[Unit]
Description=Node-RED
After=syslog.target network.target

[Service]
ExecStart=/usr/bin/node-red --max-old-space-size=128 -v
Restart=on-failure
KillSignal=SIGINT

# log output to syslog as 'node-red'
SyslogIdentifier=node-red
StandardOutput=syslog

# non-root user to run as
WorkingDirectory=/home/namauser/
User=namauser
Group=namauser

[Install]
WantedBy=multi-user.target

Lalu jalankan perintah ini maka node-red akan jalan setiap mesin start

sudo systemctl enable node-red.service

Memasang certificate alpha ssl di nginx web server


Catatan biar g lupa, beberapa hari yang lalu beli sertifikat alpha ssl untuk di pasang di web server nginx tapi entah kenapa sertifikat nya selalu ngga valid setelah dipasang, setelah ngoprek2 inilah caranya

  1. Copy ca certificate alpha ssl https://www.alphassl.com/support/install-root-certificate.html
  2. Lalu copy ca certificate yang dikirim oleh provider ssl
  3. Kemudian gabungkan ca tadi dengan command
cat (file ca dari provider.ca) alpha.ca >> bundle.crt,
#setelah selesai maka masukkan file bundle ca ini ke nginx

ssl_certificate /etc/ssl/bundle.crt;

ssl_certificate_key /etc/ssl/host.key;

Done semoga bermanfaat

Happy coding

Salam ngoprek

manual install plugin visual studio code


If you have problem installing plugin or update plugin for visual studio code maybe you can try this, dowload plugin manually and than install it with this command below

code --install-extension plugin.vsix

This is just some note

Happy Coding

Salam ngoprek