Go to advanced search

by tpyo kingg
Wed Dec 11, 2019 7:54 am
Forum: The MagPi
Topic: Conquer the Command Line, 2nd Edition
Replies: 12
Views: 421

Re: Conquer the Command Line, 2nd Edition

Stock Raspbian always (as far as I know) makes new SSH keys in /etc/ssh/ upon first boot nowadays, even if there are ones already in place. I run mostly headless, including first boot, and run into that every time I use SSH instead of serial connections. There are probably several easier work-around...
by tpyo kingg
Sat Dec 07, 2019 2:07 pm
Forum: General discussion
Topic: Apache Server, FTP -SSL Servrr, YouTubeTv, Netflix & Emulators on a Pi 4 4GB (Multiply if necessary)
Replies: 13
Views: 672

Re: Apache Server, FTP -SSL Servrr, YouTubeTv, Netflix & Emulators on a Pi 4 4GB (Multiply if necessary)

My reason for thinking I could do everything with just 1 Pi4 was the little (too little) reading I had done and how everybody was talking about how much if an upgrade the 4GB Pi4 was to the 3 in "brute power", and that was me, probably thinking it could do everything I needed and also got sucked in...
by tpyo kingg
Sat Dec 07, 2019 7:48 am
Forum: General discussion
Topic: Apache Server, FTP -SSL Servrr, YouTubeTv, Netflix & Emulators on a Pi 4 4GB (Multiply if necessary)
Replies: 13
Views: 672

Re: Apache Server, FTP -SSL Servrr, YouTubeTv, Netflix & Emulators on a Pi 4 4GB (Multiply if necessary)

Obviously the HTTP SSL & FTP-SSL servers would be running and the machine would be running 24/7. Unless you really have a specific, inflexible use-case for either FTP or FTP-SSL (aka FTPS) in particular, I would avoid it and stay with regular SFTP. The protocols FTPS and SFTP are quite different in...
by tpyo kingg
Fri Dec 06, 2019 2:24 pm
Forum: Automation, sensing and robotics
Topic: Photoresistor without ADC
Replies: 2
Views: 121

Re: Photoresistor without ADC

Thanks.
by tpyo kingg
Fri Dec 06, 2019 1:47 pm
Forum: Automation, sensing and robotics
Topic: Photoresistor without ADC
Replies: 2
Views: 121

Photoresistor without ADC

I've got a photoresistor that I'd like to use to check whether an area is lit brightly or not. I don't need an exact measurement, just a vague bright or dim notification. I've seen the instructions using the MCP3008 analog to digital converter . I don't have an MCP3008 and can't conveniently get one...
by tpyo kingg
Fri Dec 06, 2019 9:18 am
Forum: General discussion
Topic: open file in idle or other text editor over ssh from linux
Replies: 6
Views: 175

Re: open file in idle or other text editor over ssh from linux

I am wondering if there is a way to open a python file on my computers text editor (idle, sublime, etc...) while I am ssh'd into the pi. Which Operating System are you connecting from? Possibilities vary depending on what you have. In general, though, some editors support remote access using the SF...
by tpyo kingg
Fri Dec 06, 2019 8:47 am
Forum: General discussion
Topic: Run a python script from PHP
Replies: 7
Views: 172

Re: Run a python script from PHP

The first one is dangerous and should not be used. Same for the first and second lines of your second example. There should never be a NOPASSWD: ALL in there. However, although the second one is close you need to put the actual string used to invoke your python script. If you were to write it out in...
by tpyo kingg
Sun Dec 01, 2019 9:56 am
Forum: General discussion
Topic: SSH brute force attacks?
Replies: 16
Views: 613

Re: SSH brute force attacks?

I used to have One Time passwords set for emergency access if I had to remote in from a system that didn't have the right keys on. It was a set of random single-use passwords that had to be used in combination with a keyword. If you're into testing things, an upcoming release of OpenSSH will begin ...
by tpyo kingg
Fri Nov 29, 2019 1:34 pm
Forum: General discussion
Topic: SSH brute force attacks?
Replies: 16
Views: 613

Re: SSH brute force attacks?

Or another option like fail2ban is to use sshguard which, despite the name, can cover a lot more than SSH.

Then again, you don't need either (except to quiet the logs) if you've set up SSH key-based or SSH certificate-based authentication and disabled remote password authentication.
by tpyo kingg
Thu Nov 28, 2019 9:45 am
Forum: Automation, sensing and robotics
Topic: Straightforward / bulletproof temperature logger
Replies: 15
Views: 546

Re: Straightforward / bulletproof temperature logger

1. Take pcmanbob's script above and put it in a file in /home/pi/bin/temperature-reader.py and make the bin directory if necessary. 2. Make sure the first line of the script is #!/usr/bin/python3 and that you've put in the actual IDs of your own probes in the right place. 3. Make sure the script is ...
by tpyo kingg
Thu Nov 28, 2019 7:37 am
Forum: Automation, sensing and robotics
Topic: Straightforward / bulletproof temperature logger
Replies: 15
Views: 546

Re: Straightforward / bulletproof temperature logger

The above script has a 'while True' loop with a 600 second delay. So if you invoke it, whether manually, via cron, or via systemd, then it should keep running and writing temperatures to the file without further intervention. I'd say cron would be the easiest way to launch it. See 'man 5 crontab' an...
by tpyo kingg
Tue Nov 26, 2019 9:26 am
Forum: Automation, sensing and robotics
Topic: Straightforward / bulletproof temperature logger
Replies: 15
Views: 546

Re: Straightforward / bulletproof temperature logger

How do you want to or intend to retrieve or view the temperature readings? Getting the readings is just a few lines of python plus maybe a line in a cron tab. Again, displaying the readings depends on how you want to get them. Please say more. I have Apache2 running on my setup and just save the rea...
by tpyo kingg
Thu Nov 21, 2019 6:51 pm
Forum: Beginners
Topic: Copy files from pi to web
Replies: 2
Views: 93

Re: Copy files from pi to web

If you have SFTP, and not nasty insecure FTP, then copying can be automated. Follow a recent guide on setting up key-based authentication for SSH. Then when you can log in with it to your remote machine, try SFTP from the Raspberry Pi using batch mode: echo 'put /home/pi/temperatur/t.txt' \ | sftp -...
by tpyo kingg
Wed Nov 13, 2019 1:39 pm
Forum: General discussion
Topic: file transfer via ssh
Replies: 3
Views: 213

Re: file transfer via ssh

Or in the file manager on another machine press ctrl-l and then enter sftp://pi@192.168.1.100/ or whatever the IP address of the Pi is.
by tpyo kingg
Fri Nov 08, 2019 1:30 pm
Forum: General discussion
Topic: What is CGI script, TCP/IP and Web socket programming in context of the IoT Project?
Replies: 16
Views: 455

Re: What is CGI script, TCP/IP and Web socket programming in context of the IoT Project?

Meh. There are a lot of ways to solve the same problem. CGI and FastCGI are quite convenient, especially the latter, and easy to implement in a wide choice of programming languages or scripting languages. The former is slowish though and should be avoided these last 20 or so years. Either allow java...
by tpyo kingg
Thu Nov 07, 2019 12:26 pm
Forum: General discussion
Topic: Interesting interview with Eben in Physics World
Replies: 41
Views: 2243

Re: Interesting interview with Eben in Physics World

The only difference perhaps is that SD cards are tiny and cheap, so maybe people don't take as much care of them as they did for expensive large spinning rust drives. I've had only two microSD cards go bad so far, out of ten or so. One just stopped working and couldn't be rewritten. Another seemed ...
by tpyo kingg
Wed Nov 06, 2019 10:54 am
Forum: General discussion
Topic: Running a second web server [SOLVED]
Replies: 4
Views: 348

Re: Running a second web server

You're most of the way there. You can set Apache2 to listen to both ports at the same time:

https://httpd.apache.org/docs/2.4/vhost ... .html#port
by tpyo kingg
Sun Oct 27, 2019 4:54 am
Forum: Troubleshooting
Topic: rsync issue for newbie
Replies: 23
Views: 1104

Re: rsync issue for newbie

Normally I just type crontab -e and whatever one that is, is the one I have been trying to edit and make work. If you want to use that cron, stick your stuff in /etc/cron.d The first would be a user cron file and the second the system cron file. Both aproaches are valid. The do have slightly diffre...
by tpyo kingg
Fri Oct 25, 2019 5:40 pm
Forum: Troubleshooting
Topic: Starting pygame applet from SSH using host display
Replies: 3
Views: 162

Re: Starting pygame applet from SSH using host display

Try setting the $DISPLAY variable:

Code: Select all

DISPLAY=:0.0 lxterminal --command=python3 ./bbcTimer.py 15 4 3
or

Code: Select all

export DISPLAY=:0.0 
lxterminal --command=python3 ./bbcTimer.py 15 4 3
That would be for the default display attached to the Raspberry Pi.
by tpyo kingg
Sun Oct 20, 2019 6:00 pm
Forum: Beginners
Topic: Website listing all the terminal commands to install all software?
Replies: 1
Views: 125

Re: Website listing all the terminal commands to install all software?

The utility is "apt" and you can get the full reference manual through "man apt" However, you can find an overview of it on the web here:

https://www.raspberrypi.org/documentati ... are/apt.md

There are other utilities, but that is the main one these days.
by tpyo kingg
Thu Oct 17, 2019 9:30 am
Forum: Troubleshooting
Topic: System has started ignoring I2C PCF8523 Real Time Clock
Replies: 8
Views: 571

Re: System has started ignoring I2C PCF8523 Real Time Clock

It's got a battery so it does save the time even without the network. The trick is restoring the automatic nature of the time synchronization. The system clock was syncing to the hardware clock nicely under stretch. It only gave the illusion of syncing under buster because it was indavertantly in ra...
by tpyo kingg
Thu Oct 17, 2019 8:52 am
Forum: Troubleshooting
Topic: System has started ignoring I2C PCF8523 Real Time Clock
Replies: 8
Views: 571

Re: System has started ignoring I2C PCF8523 Real Time Clock

Yes, thanks, I've run timectl but that has no effect on the clock. The manual page for it lacks examples related to this use-case, one where I have added a realtime clock to the system and wish to use that. $ sudo timedatectl Local time: Thu 2019-02-14 12:14:38 EET Universal time: Thu 2019-02-14 10:...
by tpyo kingg
Wed Oct 16, 2019 7:11 pm
Forum: Troubleshooting
Topic: System has started ignoring I2C PCF8523 Real Time Clock
Replies: 8
Views: 571

Re: System has started ignoring I2C PCF8523 Real Time Clock

From what I read, it should have been enough to just add dtoverlay=i2c-rtc,ds3231 to /boot/config.txt : dtoverlay=i2c-rtc,ds3231 However, that seems to have no effect. I ended up having to make a systemd unit file, hwclock-DS3231.service and enabling it: [Unit] Description=DS3231 Time Synchronizatio...
by tpyo kingg
Wed Oct 16, 2019 5:59 am
Forum: Troubleshooting
Topic: rsync issue for newbie
Replies: 23
Views: 1104

Re: rsync issue for newbie

What is in your cron job for the pi account?

Code: Select all

whoami
crontab -l
by tpyo kingg
Tue Oct 15, 2019 7:07 am
Forum: Troubleshooting
Topic: SSH Connection refused on 2 of my Pi Zero W
Replies: 5
Views: 243

Re: SSH Connection refused on 2 of my Pi Zero W

How is the signal to and from the affected units while they have problems as compared to when they are close enough to work?

Code: Select all

sudo iwlist wlan0 scan | sed '/Cell/,/Quality/!d'
Then the same question for the other Raspberry Pi Zero Ws that don't have any problems.

Go to advanced search