News:

The Latest electronic and computer Tips that work!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - branx86

#181
I used this trick to point my solar panel at the sun and makes a big difference in power generation. Just watch the video. So Simple



#182
Ctrl + Shift + Delete
#183
#184
General Discussion / Weld with jumper cables in a Pinch
January 13, 2016, 05:08:43 PM
#185
#186
Create a sh file with :
#!/bin/sh
(sleep 30;
mount -t cifs -o username=user,rw //192.168.0.30/tvseries /storage/tvseries;
)&


Then put and line in the rc.local file above the exit 0 to point to the file.sh you just created.
#187
General Discussion / HP Printers with RFU Error Message
January 08, 2016, 12:17:49 PM
:) :o
Clearing RFU Error Message
1. Turn the printer power off.
2. Power on the printer and watch for the memory count to begin.
3. Holds down the STOP button when you see the memory counts begin. Continue holding down the STOP button until all three printer control-panel lights flash once and then remain on. This might take up to 10 seconds.
4. Press the SELECT (Checkmark) button and then the MENU Button.
5. Scroll down until you see "Clear All RFU Errors".
6. Press the Select button twice until the highlighted cursor is the letter "C" in the word "Clear".
7. Scroll down until you see "Set Runmode to Manual".
8. Press the Select button once until the highlighted cursor is on the letter "R" in the word "Runmode".
9. Scroll down until you see "Set RFU Error Off".
10. Press the Select button twice until the highlighted cursor is on the letter "S" in the word "Set"
11. Turn the printer off and power up the printer.
#189
Raspberry Pi / Mount network Drive on Raspberry Pi
December 24, 2015, 02:00:28 PM
manual mounting
  mount //192.168.1.251/directory   /tmp/directory -o username=Of server or Nas,password=Of server or Nas
Example: mount -t cifs //192.168.1.251/FrontDoorCam /tmp/motion/video -o username=administrator,password=?#?$$#$,rw,file_mode=0777,dir_mode=0777

auto mounting using etc/FSTAB
//192.168.1.251/directory   /tmp/directory  cifs defaults,username=Of server or Nas,password=Of server or Nas  0  0

//server/share /mnt/name cifs defaults,rw,username=username,password=password,domain=domain 0 0
#190

#Save from ip camera
ffmpeg -i http://admin:admin@192.2.2.1:554/dd-a -c copy -map 0 -f segment -segment_time 300 -segment_format mp4 "outfile.mp4"

# Save the streams using ffmpeg at 30 fps, stopping the capture after 900 seconds (15 minutes). Add more lines if you have more than 2 cameras
# The file name. I use the date to make finding files easier.
name="`date +%Y-%m-%d_%H.%M`"
# Where the videos will be saved
BASEpath='/path/to/surveillance/folder'
RECpath=$BASEpath'/video'
ffmpeg -i rtsp://username:password@192.168.1.201:80/videoMain -r 30  -vcodec copy -an -t 900 $RECpath/cam01/$name.mp4 </dev/null >/dev/null 2>/tmp/cam01.log &

#Cronjob- It looks into the archive folders, looking for directories, as each day has its own, older than 5 days
0 4 * * * find /path/to/surveillance/folder/archive -mindepth 3 -type d -mtime +5 -exec rm -r {} \;
#191
Raspberry Pi / Display IP address at boot
December 23, 2015, 05:41:36 PM
This script goes in etc/rc.local to show ip address at boot up.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
printf "My IP address is %s\n\nRaspbian GNU/Linux\n\n" "$_IP" > /etc/issue
else
  printf "Raspbian GNU/Linux\n\n" > /etc/issue
fi

exit 0
#192
Windows Fixes / FireFox Keeps Crashing
December 17, 2015, 10:03:51 AM
Start over with a fresh profile. Backup bookmarks then Navigate to:

C:\Users\(CurrentUser)\AppData\Local\Mozilla
Then delete : Profiles

Restart firefox should create new profile.
#193
Raspberry Pi / Mini Rapsberry install
December 16, 2015, 04:23:01 PM
sudo rm -rf python_games
sudo apt-get autoremove x11-common
sudo apt-get autoremove midori
sudo apt-get autoremove python*
sudo apt-get autoremove lxde-icon-theme
sudo apt-get autoremove omxplayer
sudo rm -rv /usr/share/icons/*
sudo rm -rv /opt/vc/src/*
#194
  nano /etc/network/interfaces
add the following under eth0 or wlan? The address is your Static IP and netmask scheme and your gateway.

iface (eth0 or wlan?) inet static


Your File should look like the one below for dhcp to eth0 and static wlan0.

auto lo



iface lo inet loopback

iface eth0 inet dhcp



allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet static

address 192.168.1.102

netmask 255.255.255.0

network 192.168.1.0

gateway 192.168.1.1


OR

auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 10.232.1.99
    netmask 255.255.255.0
    gateway 10.232.1.1
    wpa-passphrase password
    wpa-ssid myssid

#195
Get the Operating System Version
  uname -a

uname -a lets you know the current version of the Operating System of the Raspberry Pi you are using. Below is an example output of the command which shows the current version of my Raspberry Pi.

Download the Driver
wget https://dl.dropboxusercontent.com/u/80256631/mt7601-(version and build number).tar.gzor download from the forum.

For example, my Raspberry Pi's version and build number is 3.18.11-v7+ #781. By following the instructions, I should end up with the following URL.

https://dl.dropboxusercontent.com/u/80256631/mt7601-3.18.11-v7-781.tar.gz


Extract and Install the Driver
tar xzf (filename)
./install.sh


Restart the Raspberry Pi


#196
General Discussion / Embed Image into Webpage (Webcam)
December 11, 2015, 02:59:37 PM
Open notepad and insert html below with ipaddress and port don't forget to save as html.

<img src="http://ip address:port/?action=stream" height="300" width="340" />

                               OR

<!-- Add this line to your website's landing page to include video-->
<iframe src="http://<PI-IP>:8081" height="750" width="1300"></iframe>
#197
Raspberry Pi / Raspberry PI IP Camera Parts List
December 11, 2015, 12:40:14 PM
Turn key IP Camera
150Mbps Mini USB WiFi Wireless Adapter Network LAN Card 802.11n/g/b PC Receiver  $1.89
Mini USB 5M Retractable Clip WebCam Web Camera Laptop DT Net weight: 35g Item size: 40*29*28mm  $2.30
USB male to USB micro male cable $1.00
Self protrait Stick with bendable mount $1.00
8MB Micro SD card $1.67
Raspberry Pi B+ Development Board  $19.99

Total Cost $27.85


DIY IP Camera
150Mbps Mini USB WiFi Wireless Adapter Network LAN Card 802.11n/g/b PC Receiver  $1.89
Mini USB 5M Retractable Clip WebCam Web Camera Laptop DT Net weight: 35g Item size: 40*29*28mm  $2.30
USB male to USB micro male cable $1.00
Self protrait Stick with bendable mount $1.00
8MB Micro SD card $1.67
Raspberry Pi Zero Development Board  $5.00

Total Cost $12.86
#198
Solar Power / Cheap Battery FOr Solar
December 07, 2015, 04:33:46 PM
Everstart 27DC with 115amp hour @ $82.00 Best bang for the buck for inexpensive solar setup.

This battery is good if you keep it topped off with distilled water and keep it charged.
#199
Linux Fixes / Send Mail via Google
December 04, 2015, 04:18:28 PM
SMTP  = ssl://smtp.gmail.com:465port
      copy the smtp address in your address spot put the port number in your port spot and put in your gmail credentials and everything should work.
#200


One (at minimum) USB external hard drive for simple network backups and file serving



Once you have gathered up the hardware, followed along with the Getting Started with Raspberry Pi tutorial to get up to speed (and are running Raspian) it's time to start setting up your Pi as a NAS.
Once you're at the command line the first thing you need to do is to add in support to Rasbian for NTFS-formatted disks. To do so type the following command: sudo apt-get install ntfs-3g 

Then do: sudo fdisk -l


The first disk /dev/mmcb1k0 is the SD card inside the Raspberry Pi that houses our installation of Raspbian. We're going to leave that one completely alone.
The second disk, /dev/sda is our first 1TB external hard drive. Make a note of the hard drive names.

Before we can mount the drives, we need to create a directory to mount the drives to. For the sake of simplicity we're going to simply make directory called USBHDD1 and USBHDD2 for each drive. First we have to make the drives. At the command line enter the following commands:  sudo mkdir /media/USBHDD1
After you've created the directory, it's time to mount the external drive to each location.
sudo mount -t auto /dev/sda1 /media/USBHDD1

Time to install Samba so we can access the storage from elsewhere on the network. At the command line enter: sudo apt-get install samba samba-common-bin

Make a backup copy of the Samba configuration file in case we need to revert to it. At the command line, type the following command line: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old

Do some basic editing in the Samba config file. Type the following at the command line:  sudo nano /etc/samba/smb.conf
You should see something like the following in your terminal window:


The workgroup identifier, by default workgroup = WORKGROUP. If you're using a different name for your home workgroup.
Turn on user authentication for our samba storage, otherwise anyone with general access to our network (like guest Wi-Fi users) will be able to walk right in. Scroll down in the Samba config file until you get to the section that reads:


Remove the # symbol from the security = user line (by highlighting it with the cursor and pressing delete) to enable username/password verification for the Samba shares.

add an entirely new section to the configuration file. Scroll all the way down to the very bottom of the file and enter the following text:
[Backup]
comment = Backup Folder
path = /media/USBHDD1/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no


Note: Whatever you put in the brackets in the top line is going to be the name of the folder as it appears on the network share. If you want another name other than "Backup" now is the time to edit it.

Press CTRL+X to exit, press Y when asked if you want to keep changes and overwrite the existing configuration file.
Then do: sudo /etc/init.d/samba restart

Add in a user that can access the Pi's samba shares.  You can make your username and password whatever you wish. To do so type the following commands:
sudo useradd backups -m -G users
sudo passwd backups



To make a legitimate Samba user. Enter the following command:  sudo smbpasswd -a backups
Now go to your windows computer and put in the Raspberry Pi address:

When prompted, enter the credentials you created in the previous steps.

Configure our Pi so that when it restarts it will automatically mount the external hard drives. To do so we need to fire up the nano editor and make a quick edit. At the command line type:  sudo nano /etc/fstab

Add a few quick entries. Within the nano editor add the following lines:   /dev/sda1 /media/USBHDD1 auto noatime 0 0

So far our Raspberry Pi NAS is hooked up to the network.
sudo apt-get install rsync

Once rsync is installed, it's time to set up a cron job to automate the process of copying files from the USBHDD1
At the command line enter the following command:  crontab -e

The command will open up your cron scheduling table in the nano text editor which should be rather familiar to you at this point in the tutorial.  Go ahead and scroll down to the bottom of the document and enter the following line:   

0 5 * * * rsync -av --delete /media/USBHDD1/shares /media/OtherHDD/shares/


This command specifies that every day at 5:00AM (the 0 5 part), every single day (* * *, wild cards in the year, month, day spots), we want rsync to compare the two directories, copying everything from HDD1 to HDD2 and deleting anything in the backup directory that no longer matches something in the primary directory—i.e. if we have a movie file on HDD1 we delete, we also want that file to be removed from the backup on the next synchronization.

If you wish to run the rsync immediately to get the data mirrored faster and make the initial cron job a little lighter on the system, go ahead and enter the same rsync command you put into the crontab at the command line like so:   rsync -av --delete /media/USBHDD1/shares /media/OtherHDD/shares/

That's it!