Go to advanced search

by tpyo kingg
Wed Feb 03, 2021 6:35 pm
Forum: Troubleshooting
Topic: ifconfig grep ip address / cutting not really working *beginner*
Replies: 5
Views: 434

Re: ifconfig grep ip address / cutting not really working *beginner*

You can use awk:

Code: Select all

ifconfig eth0 | awk '$1=="inet"{print $2}'
That checks the lines if the first field is "inet" then prints out the second field.

There is also the python3 module for netifaces which can give the address, with enough configuration.
by tpyo kingg
Mon Feb 01, 2021 2:31 pm
Forum: Python
Topic: Starting in-progresss tasks with 'schedule' module
Replies: 2
Views: 253

Re: Starting in-progresss tasks with 'schedule' module

Thanks. I'll take a look.
by tpyo kingg
Sat Jan 30, 2021 3:17 pm
Forum: Raspberry Pi OS
Topic: Use xz instead of zip for distributions
Replies: 31
Views: 1710

Re: Use xz instead of zip for distributions

In general, the xz format is inadequate for long-term archiving . Achiving might not be the most important factor in this context, but the occasional transmission error might make the robustness relevant: One of the challenges of digital preservation is the evaluation of data formats. It is importan...
by tpyo kingg
Sat Jan 30, 2021 3:08 pm
Forum: Python
Topic: Starting in-progresss tasks with 'schedule' module
Replies: 2
Views: 253

Starting in-progresss tasks with 'schedule' module

I have been using some basic functions in the schedule module to time various actions. That part is fine. I would like to know how to achieve a state based on passed daily events even if a script is started partway through a daily schedule. In other words, if the script below is started in the middl...
by tpyo kingg
Thu Jan 28, 2021 12:15 pm
Forum: General
Topic: Is the Pico flat on one side?
Replies: 19
Views: 1460

Re: Is the Pico flat on one side?

Thanks. I've tried downloading the archive twice, is that the latest one? https://datasheets.raspberrypi.org/pico/RPi-Pico-R3-PUBLIC-20200119.zip Both times KiCad complains about RPI-PICO-R3a-PUBLIC.brd and is unable to read it. When trying to open RPI-PICO-R3a-PUBLIC.brd, there is the warning from ...
by tpyo kingg
Thu Jan 28, 2021 11:58 am
Forum: General
Topic: Is the Pico flat on one side?
Replies: 19
Views: 1460

Re: Is the Pico flat on one side?

Thanks for both answers.

I will take a look at KiCAD.
by tpyo kingg
Thu Jan 28, 2021 11:47 am
Forum: General
Topic: Is the Pico flat on one side?
Replies: 19
Views: 1460

Is the Pico flat on one side?

I've not seen a side view photo yet. Is the Raspberry Pi Pico flat on one side? That is to say are all the components attached on one side so that the other can be flush against whatever it gets mounted on?

Also, which software would open the design files, hidden behind all that javascript?
by tpyo kingg
Mon Jan 25, 2021 11:40 am
Forum: Other programming languages
Topic: Saving MicrosoftWord Doc as LibreOffice from shell
Replies: 3
Views: 686

Re: Saving MicrosoftWord Doc as LibreOffice from shell

I was thinking that you would try the -p option with LibreOffice. There would also be --pt and --printer-name there. That will allow use of OpenDocument Format files directly. Otherwise, you would probably need to convert an extra PDF copy and try sending that to the printer, depending on the printe...
by tpyo kingg
Sun Jan 24, 2021 12:44 pm
Forum: Automation, sensing and robotics
Topic: Photoresistor without ADC
Replies: 6
Views: 1288

Re: Photoresistor without ADC

Just as a follow up, I'm swapping out this R-C circuit with an Adafruit BH1750 ambient light sensor with a small header attached. Though I should have gotten a JST PH connector to be able to plug it in rather than soldering a small header in place. Later when the season requires it, I will move an O...
by tpyo kingg
Sun Jan 24, 2021 10:51 am
Forum: Other programming languages
Topic: Saving MicrosoftWord Doc as LibreOffice from shell
Replies: 3
Views: 686

Re: Saving MicrosoftWord Doc as LibreOffice from shell

See the --headless option for libreoffice. There will also be options to print. man libreoffice libreoffice --headless --outdir /path/to/somewhere/ --convert-to odt /source/path/*.docx It handles the proprietary, legacy formats better than any other program. Note that for historical reasons, the fil...
by tpyo kingg
Wed Jan 20, 2021 1:33 pm
Forum: Advanced users
Topic: Setting X up in Client Server mode
Replies: 15
Views: 1379

Re: Setting X up in Client Server mode

Things have changed a little since the late 1990s in that regard. Maybe you mean X11 forwarding over SSH instead? You can have the heavier program run on the remote machine yet rendered graphically on locally on the Raspberry Pi as you describe. The connection is affected very noticeably by any late...
by tpyo kingg
Tue Jan 19, 2021 3:11 pm
Forum: Beginners
Topic: Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?
Replies: 11
Views: 576

Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?

Thanks. I notice on second reading that the dollar sign is missing from the process substitution, ..?rpid="(awk... should be ..?rpid="$(awk... However, that won't help within autostart. You will still have to make a shell script since autostart is limited and does not have full shell capab...
by tpyo kingg
Tue Jan 19, 2021 2:14 pm
Forum: Beginners
Topic: Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?
Replies: 11
Views: 576

Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?

Here is my code : I presume that is from your /etc/xdg/lxsession/LXDE-pi/autostart file? If not, that would be the place to move it. Also, the last two lines ought to be in their own shells scripts and then those called from autostart. You can put the shell script in /home/pi/bin/ or /usr/local/bin/
by tpyo kingg
Tue Jan 19, 2021 10:34 am
Forum: Troubleshooting
Topic: SSH randomly stopped working
Replies: 4
Views: 255

Re: SSH randomly stopped working

I would look in the SSH daemon's log files on the Raspberry Pi to see what it reports to be going on. The SSH service logs to /var/log/auth.log but is also available via the dreaded systemd:

Code: Select all

sudo less /var/log/auth.log

sudo awk '$5~/^ssh/' /var/log/auth.log | less

sudo journalctl -u ssh
by tpyo kingg
Mon Jan 18, 2021 4:04 pm
Forum: Advanced users
Topic: Child's first computer
Replies: 10
Views: 574

Re: Child's first computer

E2Guardian is a fork of the now defunct DansGuardian project. It might be of use.
by tpyo kingg
Mon Jan 18, 2021 3:03 pm
Forum: Other programming languages
Topic: Open a terminal and execute a command in the terminal from a remote
Replies: 5
Views: 1087

Re: Open a terminal and execute a command in the terminal from a remote

I need to see the app's output in the terminal running on the pi. If the same user is logged in graphicallly at the Raspberry Pi that is connecting via SSH, then you can pass the DISPLAY environment variable to the graphical program. Log in via SSH: DISPLAY=:0.0 lxterminal -e ./path/to/script If yo...
by tpyo kingg
Sat Jan 16, 2021 4:23 pm
Forum: Beginners
Topic: Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?
Replies: 11
Views: 576

Re: Does Raspberry has a unique serial number? Can i get it in LXDP settings?

actually the real problem is i dont know how can use these codes in my file. i need to post this serial id in following command. so , i need to use it like variable, but i dont know how i can do it. chromium-browser --disable-infobars --kiosk 'http://mysite.com/?rid= rasberry id should be defined h...
by tpyo kingg
Fri Jan 15, 2021 7:33 pm
Forum: Python
Topic: Determine which car is in the garage
Replies: 10
Views: 724

Re: Determine which car is in the garage

Each car has its own serialized parking decal with RFID. How would this decal be scanned? With an RFID scanner but the range would depend on the freqency and if the decal is completely without a battery. Maybe the specs are available somewhere so that an appropriate scanner can be found. If the ran...
by tpyo kingg
Fri Jan 15, 2021 5:19 pm
Forum: Python
Topic: Use Python script to execute a list of commands in shell??
Replies: 7
Views: 365

Re: Use Python script to execute a list of commands in shell??

One way would be to use os.system() from the os module , if you have to stay within the bounds of Python3. However, if you are dealing mainly with a just a list of regular programs, you can write a plain shell script. There are a lot of guides around on shell scripting as it is an essential componen...
by tpyo kingg
Fri Jan 15, 2021 11:26 am
Forum: Python
Topic: Determine which car is in the garage
Replies: 10
Views: 724

Re: Determine which car is in the garage

The parking decal might work to distiguish the cars. You might be able to scan that, so that it becomes a choice of car-with-decal or car-without-decal. However, I would also check the tires for RFID. The new ones tend to have RFID and the manufacturers seem to have stated a goal of deploying it in ...
by tpyo kingg
Fri Jan 15, 2021 10:32 am
Forum: General discussion
Topic: Setting up a Pi zero with missing cables?
Replies: 5
Views: 328

Re: Setting up a Pi zero with missing cables?

Yes, you can set it up headless by adding two files to the /boot partition on the microSD card from another machine, https://www.raspberrypi.org/documentation/configuration/wireless/headless.md Just be sure to do it on a peaceful WLAN so that you are the first to log in and change the password for t...
by tpyo kingg
Fri Jan 15, 2021 2:53 am
Forum: Networking and servers
Topic: SSH over 3g/4g LTE
Replies: 24
Views: 3310

Re: SSH over 3g/4g LTE

Would I be correct in saying this is a job for an advanced or professional software engineer? I would say it is solvable by most anybody. Like in many projects, there are multiple steps and picking up the microSD card occasionally really is an option, if delay is not an issue. Sneakernet is a time-...
by tpyo kingg
Thu Jan 14, 2021 8:02 pm
Forum: Networking and servers
Topic: SSH over 3g/4g LTE
Replies: 24
Views: 3310

Re: SSH over 3g/4g LTE

Another way would be to encode the measurements into a file in some way, and then use SFTP or Rsync to transfer the picture and the file with the corresponding measurements. JSON and XML are two heavy-handed ways of carrying data. But even tab-delimited text would work. In a lot of ways, SFTP, from ...
by tpyo kingg
Thu Jan 14, 2021 6:29 pm
Forum: Networking and servers
Topic: SSH over 3g/4g LTE
Replies: 24
Views: 3310

Re: SSH over 3g/4g LTE

yeah, I want to basically publish a command, the pi would receive it, give back data/a picture. So the plan would be like: follow a tutorial on MQTT over TLS, get the thing working on lan, take the pi outside, use port 8883 on the router, and try again? In a nutshell, yes. However, getting there is...
by tpyo kingg
Thu Jan 14, 2021 5:40 pm
Forum: Networking and servers
Topic: SSH over 3g/4g LTE
Replies: 24
Views: 3310

Re: SSH over 3g/4g LTE

My home ISP does allow port forwarding, or at least I see the option to put in the channels and other stuff. I am looking to either just see data like wind speed, Hpa, humidity and pictures come from the pi on cellular to my home network onto the dsl modem-router. Ok. You can double check with an e...

Go to advanced search