Go to advanced search

by Shadow_Saunter
Fri Jun 26, 2020 5:10 pm
Forum: Troubleshooting
Topic: Launch MQTT client from crontab
Replies: 4
Views: 156

Re: Launch MQTT client from crontab

Thank you guys, I found the problem. I had rolled a new router for IoT stuff on pfsense, it was blocking 1883/8883.
by Shadow_Saunter
Fri Jun 26, 2020 12:27 pm
Forum: Troubleshooting
Topic: Launch MQTT client from crontab
Replies: 4
Views: 156

Re: Launch MQTT client from crontab

I suspect that your environment is not getting set up as you expect when you run it from Cron and so the MQTT broker is refusing connection. ... Are your environment variables set in .bashrc or /home/sensor/projects/BME_680/BME_680/bin/activate? .bashrc is not parsed when you run the program from C...
by Shadow_Saunter
Thu Jun 25, 2020 9:01 pm
Forum: Troubleshooting
Topic: Launch MQTT client from crontab
Replies: 4
Views: 156

Launch MQTT client from crontab

I'm having trouble getting my python script to function correctly when I launch it from crontab. My script is a python script based off of the pimoroni BME software, and my own mqtt functions. 1. My python script works correctly when i run it manually. 2. My script, called 'autostart.cron' launches ...
by Shadow_Saunter
Wed Apr 29, 2020 10:25 pm
Forum: Raspberry Pi OS
Topic: Symlink and MOTD
Replies: 5
Views: 223

Re: Symlink and MOTD

motd files are usually just text files that are printed, they aren't executed. pam_motd by default prints the contents of /etc/motd and the output of running the scripts in /etc/update-motd.d/ so I'd put your script in there (filename convention is nn-name where nn is a two digit number specifying ...
by Shadow_Saunter
Wed Apr 29, 2020 2:47 am
Forum: Raspberry Pi OS
Topic: Symlink and MOTD
Replies: 5
Views: 223

Re: Symlink and MOTD

I have my symlink pointing to the right place, but now my bash script isn't running, the motd cats the literal bash script rather than running it, ie the motd that is printing is : #!/bin/bash echo "------------------------------------------" echo -n " Connected to:" hostname -s echo "--------------...
by Shadow_Saunter
Wed Apr 29, 2020 2:30 am
Forum: Raspberry Pi OS
Topic: Symlink and MOTD
Replies: 5
Views: 223

Re: Symlink and MOTD

UPDATE: I had also played around with sshd_config earlier and set print motd to 'yes'. I decided that it was a bad idea and commented that line out without setting it back to 'no' and reloading sshd. I set it back to 'no' and reloaded sshd, and the second motd went away. Does this mean that the prev...
by Shadow_Saunter
Wed Apr 29, 2020 1:25 am
Forum: Raspberry Pi OS
Topic: Symlink and MOTD
Replies: 5
Views: 223

Symlink and MOTD

What did I do? I'm just fiddling around trying to understand symlinks, and I made my own MOTD file in "/etc/iptables/my_motd" I then tried to make a symlink to it by running from in /etc thinking that it would overwrite the default motd file: ls -s motd /etc/iptables/my_motd When I log in, the defau...
by Shadow_Saunter
Fri Apr 17, 2020 8:14 pm
Forum: Raspberry Pi OS
Topic: /usr/local/bin/python3 vs /usr/bin/python3
Replies: 1
Views: 132

/usr/local/bin/python3 vs /usr/bin/python3

My colleague recently retired and it has fallen on me to do some of the admin stuff that he used to do. I've discovered that he is running a startup script from crontab, ie crontab runs a .sh script at reboot, and the .sh script has a 30 second delay before it launches a python program. The .sh scri...
by Shadow_Saunter
Fri Apr 17, 2020 7:12 pm
Forum: Raspberry Pi OS
Topic: bash command - log to screen
Replies: 4
Views: 115

Re: bash command - log to screen

Is that Bash, or is it like just a generic shell command?
by Shadow_Saunter
Fri Apr 17, 2020 7:11 pm
Forum: Raspberry Pi OS
Topic: bash command - log to screen
Replies: 4
Views: 115

Re: bash command - log to screen

Thanks! that did it
by Shadow_Saunter
Fri Apr 17, 2020 6:59 pm
Forum: Raspberry Pi OS
Topic: bash command - log to screen
Replies: 4
Views: 115

bash command - log to screen

A coworker who knows linux better than me ran a bash command that I thought was pretty cool, I have no idea what he typed though. He had a log file that was getting frequent entries, and whatever he typed caused the new entries in the log to appear on the screen. Like, he could walk away and it was ...
by Shadow_Saunter
Fri Apr 10, 2020 9:33 pm
Forum: Troubleshooting
Topic: configuring ntp
Replies: 7
Views: 333

Re: configuring ntp

which raspbian version do you use? 2020-02-13-raspbian-buster-lite 2020-02-13-raspbian-buster <- there is for shure no ntp installed by default. 2020-02-13-raspbian-buster-full what do you get, when you type in: dpkg --get-selections | grep ntp the network settings in Jessie are very different from...
by Shadow_Saunter
Fri Apr 10, 2020 2:37 pm
Forum: Troubleshooting
Topic: configuring ntp
Replies: 7
Views: 333

Re: configuring ntp

This is a virgin install. I'm actually trying to duplicate this raspberry network that was originally written on Jessie on a current version of Buster. I'm pretty sure ntpd is running because it has a PID. On another note, since I disabled 'timesynch' my pi seems to keep forgetting its wifi country ...
by Shadow_Saunter
Thu Apr 09, 2020 7:33 pm
Forum: Troubleshooting
Topic: configuring ntp
Replies: 7
Views: 333

Re: configuring ntp

Didn't it install automatically? I'm asking because when I run systemctl status ntp I get: ● ntp.service - Network Time Service Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-04-09 13:17:15 CDT; 11min ago Docs: man:ntpd(8) Pr...
by Shadow_Saunter
Thu Apr 09, 2020 6:57 pm
Forum: Troubleshooting
Topic: configuring ntp
Replies: 7
Views: 333

configuring ntp

I inherited a network of raspberry pi's that are fire-walled off from the open web. The server is also serving time synch via NTP. I need to duplicate this setup on a new network running Buster. I've learned from this thread https://www.raspberrypi.org/forums/viewtopic.php?t=192020 that I need to in...
by Shadow_Saunter
Wed Apr 08, 2020 9:26 pm
Forum: Troubleshooting
Topic: Can't SSH into pi from virtualbox(Ubuntu 18.04)
Replies: 1
Views: 74

Re: Can't SSH into pi from virtualbox(Ubuntu 18.04)

I found the answer. My permissions were too open, I changed from 644 to 600, and it worked.
by Shadow_Saunter
Wed Apr 08, 2020 9:11 pm
Forum: Troubleshooting
Topic: Can't SSH into pi from virtualbox(Ubuntu 18.04)
Replies: 1
Views: 74

Can't SSH into pi from virtualbox(Ubuntu 18.04)

I am trying to SSH into a raspbery pi from within virtualbox. I'm using Ubuntu 18.04 (desktop) in a Windows 10 machine and I am unable to authenticate with public key authentication. I have tried: 1. Logging into the raspberry from the host machine via Putty. This was successful. 2. Logging into the...
by Shadow_Saunter
Sat Feb 15, 2020 6:29 pm
Forum: Troubleshooting
Topic: LEDs lighting at boot
Replies: 1
Views: 83

LEDs lighting at boot

I recently reconfigured one of my pi’s Gpio pinout. I only moved 4 Gpio pins, 3 of which are LED outputs and the last is a button input, but now the LEDs attached to the new pins light dimly at boot. More info on this project: This project is powered by a POE hat. The LEDs that were moved are on GPI...
by Shadow_Saunter
Wed Jan 08, 2020 1:20 pm
Forum: General discussion
Topic: PoE Switch for non PoE device
Replies: 1
Views: 129

PoE Switch for non PoE device

I want to put a pi with a PoE hat in a fairly isolated place. I am shopping for a switch with PoE injection, but I want to be sure that the other devices on that switch that don't have a PoE option won't be damaged.

Can I use non-PoE raspberries on a PoE switch?
by Shadow_Saunter
Mon Mar 25, 2019 1:43 pm
Forum: Networking and servers
Topic: Google Sheets API
Replies: 0
Views: 307

Google Sheets API

I'm having trouble setting up the API for google sheets. I think the setup would be straightforward for a user that was sending data from their main computer, to be viewed on their main computer. The setup instructions for python on their website are: 1. Create a google login. 2. Enable the API by c...
by Shadow_Saunter
Fri Mar 22, 2019 8:29 pm
Forum: Advanced users
Topic: How to disable Keyboard and mouse in raspberry pi 3 [SOLVED]
Replies: 10
Views: 5952

Re: How to disable Keyboard and mouse in raspberry pi 3

pnaven03 wrote:
Mon Apr 24, 2017 12:10 pm
Thanks to all for support,

Issue resolved adding blow line.

sudo nano /etc/udev/rules.d/99-com.rules
SUBSYSTEMS=="usb", DRIVERS=="usbhid", ACTION=="add", ATTR{authorized}="0"

Regards,
Nv
Thanks for posting this, very helpful to my current situation.
by Shadow_Saunter
Wed Mar 13, 2019 10:30 pm
Forum: Troubleshooting
Topic: Cron is not starting my python MQTT script correctly
Replies: 9
Views: 819

Re: Cron is not starting my python MQTT script correctly

DougieLawson wrote:
Wed Mar 13, 2019 6:16 pm
If you do it in systemd you can make your service file dependent on the network
Thanks, I'll try this.
by Shadow_Saunter
Wed Mar 13, 2019 1:32 am
Forum: Troubleshooting
Topic: Cron is not starting my python MQTT script correctly
Replies: 9
Views: 819

Re: Cron is not starting my python MQTT script correctly

Update. I gave up on using systemd to start my script because I can't get it to use a launch a thread within my python script, as pictured above. I instead built a 10 second delay into my python script before it tries to interface with MQTT, and it is running fine. The 10 second delay is to allow ne...
by Shadow_Saunter
Mon Mar 11, 2019 5:48 pm
Forum: Troubleshooting
Topic: Cron is not starting my python MQTT script correctly
Replies: 9
Views: 819

Re: Cron is not starting my python MQTT script correctly

You might get better results by switching to running your script as a systemd service where you can make it dependent on both netwroking and the mqtt broker being up. Hit google for systemd docs. Thanks, adding a systemd service worked fine. For future visitors, this link helped with the setup: htt...
by Shadow_Saunter
Sun Mar 10, 2019 12:56 pm
Forum: Troubleshooting
Topic: uWSGI installation issues - Web server with Flask
Replies: 4
Views: 335

Re: uWSGI installation issues - Web server with Flask

I assume you’re doing the “Full Stack Raspbian” on Udemy?

I remember having a similar problem too.

Make sure that you’re root, and activate your virtual environment before you do the pip install.

Go to advanced search