Setting up NextCloud on Raspberry Pi

NextCloud

I have a NAS running OMV which also hosts the PLEX media server, which serves all my media needs, but when it comes to documents and software which I always download a lot, it is always a cumbersome process to manage them all. I download lots of datasheets and software for different projects which I tend to store to avoid the repetitive download of the same items. So I thought of trying out som one premise file hosting solutions like OwnCloud and NextCloud. I checked both and settled with Next…

Read More

LockDown PC based on availability of Bluetooth Device

programming

This article describes a method of locking the PC when the user is not around.Actually it detects the user mobile phone’s bluetooth (And yes it has to be turned on all the time.) and if the application can’t find the phone it sends a command to lock down the workstation.The codes are written in  JAVA and it uses the Bluecove library ,which is a open source one. The app uses the bluetooth MAC address instead of the name so as to provide security. So first we need to find out…

Read More

Automatic Backup of my Home Automation System (OpenHAB, InfluxDB, Grafana, Node-RED, MonogoDB)

RAK831 LoRa Gateway

I use different tools like OpenHAB, InfluxDB, Grafana, Node-RED, MonogoDB etc. in my Home Automation System. There is always a chance any tool may crash or the server may crash or HDD may fail or due to some other causes can lead to data loss. This has happened to me earlier also where I again had to start my setup from scratch but it taught me a lesson, backups are really important. So I went ahead and wrote a simple shell script to do the backup tasks automatically with a…

Read More

Raspberry Pi as Torrent Machine

I wanted to download torrent contents and for that, I was not interested to use my PC as most of the time it gets switched off (Due to my day job), and I was looking for uninterrupted download. So I picked up a Raspberry Pi, laying around and set it up with deluge and VPNBook free VPN. So basically the post is all about how I set it up. Here we will be setting up the deluge daemon and the web UI as well to the raspberry pi. The Deluge…

Read More

JFrame that pops-up from the taskbar like notifications.

programming

Here i have given the JAVA code to make a popup that happens exactly like the gmail desktop application does.It uses a JFrame to make the window. package com.oksbwn.popUp; import java.awt.*; import java.awt.event.*; import javax.swing.*; import com.oksbwn.ErrorHandling.handleExceptions; import resources.RscLoader; public class popMe extends JFrame { private static final long serialVersionUID = 1 L; public static void main(String[] args) throws Exception { new popMe(“hi”, “from Bikash”, “ok”, 15, 125); } public popMe(String message, String header, String image, final int time, int height) { Runnable r = new newThreadPop(message, header, image, time,…

Read More

Get System IP address in JAVA

programming

This is a code snippet to get the current IP address of a system.   import java.net.InetAddress; import java.net.UnknownHostException; public class IpAdress { //public static void main(String[] args){ public static InetAddress getIP() { InetAddress ip; try { ip = InetAddress.getLocalHost(); return ip; } catch (UnknownHostException e) { e.printStackTrace(); } return null; } }    

Read More

Automatic project structure/git creation in Windows

automatic project creator

While working in projects on a daily basis, as I do for YouTube videos, we tend to create the same folder structure and related repositories every time, as we move to the next project.  For me, it is like creating folders for video, code, uploaded video, schematics and so on and in my most of the video for YouTube, I always create almost same folders. Along with that, I create GitHub repository to host the codes that I use in the project or tutorial to distribute. And I hate doing the…

Read More

ESP32 LoRaWAN Node using Arduino

To test out the recent addition in my lab that is the LoRa gateway, I needed one LoRa node also. LoRa modules are available to be used with Arduino as well as Raspberry Pi and are pretty cheap too. However, you can get complete LoRa module with ESP32 and OLED display at pretty low price from Banggood, and they fit the purpose. And by using these, you don’t need to jumble around jumpers. In this post, I have covered how to make a simple, cheap LoRa node that can send…

Read More

Making a Java Swing JFrame Transparent

programming

This is how you can create a transparent JFrame in JAVA. public class transparentJFrame { public static void main(String[] args) { new transparentJFrame(Date, Head, Detal); } public transparentJFrame(String Date, String Head, String Detal) { JFrame frame = new JFrame(); frame.setUndecorated(true); frame.setBackground(new Color(Color.black.getRed(), Color.black.getGreen(), Color.black.getBlue(), 1)); //Change value of ‘1’ above to have diff transparency ((JComponent) frame.getContentPane()).setBorder( BorderFactory.createMatteBorder(3, 2, 2, 2, Color.black)); frame.setBounds(100, 50, 500, 400); frame.getContentPane().setLayout(null); final JLabel lblX = new JLabel(“X”); lblX.setBounds(frame.getWidth() – 15, 5, 15, 15); lblX.setForeground(new Color(255, 255, 255)); lblX.setToolTipText(“Closern”); lblX.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent…

Read More