Go to advanced search

by yertiz
Thu Nov 19, 2020 12:14 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

Just to finish off this tale, I finally got the original python/msmtp script to work in cron by stripping out the hashbang at the top of the script and calling it with python /home/pi/emailmonitoring.py.

yertiz
by yertiz
Wed Nov 18, 2020 8:31 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

I'm a bit late to the party but I always have my cron jobs call a script which explicitly sets the environment. I'm lazier at home in that I set PATH in the crontab so I don't need full paths (to eg: cjx/cjy) but the same principle applies.. foo@pi18:~ $ sudo crontab -l || crontab -l no crontab for...
by yertiz
Wed Nov 18, 2020 8:27 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

Well I did try to run your python from the command line but it never sent an email. Did not look any further than that , I guess is might be because you are using os.system to to call msmstp from within python, but I have not looked in to it because the are better ways to send mail from python or u...
by yertiz
Wed Nov 18, 2020 1:06 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

You might try one of the examples I posted to see if it works for you or if you get the same error , if you get the same error then it might point to your setup being wrong. I have tried both bash and python scripts from both the command line and cron and both run perfectly without error. (Except f...
by yertiz
Tue Nov 17, 2020 7:57 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

Do you know where $HOME does point to under cron? It is no problem to add another copy of the config file to whatever directory cron thinks is home. It is /home/pi (as you would expect). Done. The first cronjob I ever run on a new platform is: XX * * * * env > /tmp/mycronenv.txt (XX suitably chosen...
by yertiz
Tue Nov 17, 2020 4:53 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

This is an example of sending your mail using a bash file no python required. #!/bin/bash echo "An email to confirm boxtemp is up and running and to keep non-approved app status working on gmail." > /home/pi/message.txt echo "Message timed at " >> /home/pi/message.txt date "...
by yertiz
Tue Nov 17, 2020 4:40 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

But there is nothing in there which I can see which would lead to msmtp replacing the sendto address in the script with pi. Is that the user specific msmtp configuration file? $HOME doesn't point to /home/pi when using cron so msmtp won't be able to find that file. As my original post indicated the...
by yertiz
Tue Nov 17, 2020 12:18 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

trejan » 17 Nov 2020 01:41 Programs run from cron have a different environment than if you had ran it from your shell. You're using the "default" account for msmtp which is read from a config file so your difference is there somewhere. This is the config file. #This is the configuration f...
by yertiz
Tue Nov 17, 2020 12:00 am
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

Re: msmtp fails with cron

The full script is as follows: #!/usr/bin/env python ''' ********************************************************************** * Filename : emailmonitoring.py * Description : a script to send a regular email to confirm the system is up and keep gmail non approved app working * Run Time : set to run...
by yertiz
Mon Nov 16, 2020 8:22 pm
Forum: Troubleshooting
Topic: msmtp fails with cron
Replies: 20
Views: 1175

msmtp fails with cron

I am having problems getting msmtp to work with cron. I have a simple script which should send a message weekly to ensure a gmail account keeps working and reassure me that the system is still up and running. When I send it from the command line using ./emailmonitoring.py it works perfectly. msmtp.l...
by yertiz
Fri Nov 09, 2018 12:15 pm
Forum: Camera board
Topic: uv4l streaming video
Replies: 1
Views: 1143

uv4l streaming video

I think I may be trying the impossible and would appreciate any advice to avoid further frustration. For years I have used netcat and hello_video.bin to stream one or more live video images from pi(s) to pi. I wanted to replicate this, but in a browser, so it was platform agnostic. I downloaded uv4l...
by yertiz
Wed Jan 25, 2017 6:00 pm
Forum: Camera board
Topic: Text Annotation with raspivid
Replies: 16
Views: 6093

Re: Text Annotation with raspivid

https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/raspicam/RaspiCamControl.c#L1482 is converting the value into the underlying structure. Ordered as VUY. The text colour only uses the Y value. U&V will remain the same as the background. https://www.raspberrypi.org...
by yertiz
Wed Jan 25, 2017 1:44 pm
Forum: Camera board
Topic: Text Annotation with raspivid
Replies: 16
Views: 6093

Re: Text Annotation with raspivid

Despite being a bit off base Oskich's post did pique my interest in this issue again. I thought in future it might be interesting to move away from boring black and white and use some colour in my annotations. Yellow text on a dark green background might look good. I'm an RGB hex man myself and know...
by yertiz
Wed Jan 11, 2017 4:59 pm
Forum: Camera board
Topic: stop raspivid process
Replies: 1
Views: 1194

Re: stop raspivid process

Have you tried importing

Code: Select all

picamera
and using

Code: Select all

 camera.start _recording()
and

Code: Select all

camera.stop_recording() 
which usually works for me?
by yertiz
Thu Jan 07, 2016 9:42 am
Forum: Raspberry Pi OS
Topic: STICKY: Jessie (now defunct and replaced with Stretch) Q&A
Replies: 396
Views: 276913

Re: Jessie Q&A

I have a periboard 509 plus mini trackball and keyboard which is a doddle to set up using the new GUI raspi config tool. Simply select United States as Country and English(US with euro on 5) and it works perfectly. I recently downloaded the Jessie Light image and had planned to use the periboard for...
by yertiz
Wed Nov 18, 2015 11:25 am
Forum: Camera board
Topic: Text Annotation with raspivid
Replies: 16
Views: 6093

Re: Text Annotation with raspivid

Thanks for that. I'll remember to always run rpi-update last if I want the latest firmware.

I have been playing with this this morning. It is a great addition. Extremely versatile.
by yertiz
Wed Nov 18, 2015 11:00 am
Forum: Camera board
Topic: Text Annotation with raspivid
Replies: 16
Views: 6093

Re: Text Annotation with raspivid

Many thanks for the speedy response. I'm a little puzzled as I ran "sudo rpi-update", "sudo apt-get update" and "sudo apt-get upgrade" on Tuesday morning to ensure I was up to date. I must have missed an error in the "rpi-update" output. I have run "sudo ...
by yertiz
Tue Nov 17, 2015 5:07 pm
Forum: Camera board
Topic: Text Annotation with raspivid
Replies: 16
Views: 6093

Text Annotation with raspivid

I am having trouble getting formatted dates in a text annotation using raspivid. The numerical codes work fine so: raspivid -t 5000 -a 1036 -o video.h264 gets me a 5 second video using defaults with 15:04:46 11/17/15 on a black background at centre top, exactly as expected. (The seconds are of cours...
by yertiz
Tue Jul 28, 2015 3:36 pm
Forum: Camera board
Topic: raspi_vid and hello_video.bin positioning problems
Replies: 1
Views: 750

raspi_vid and hello_video.bin positioning problems

I'm having trouble getting Dom's special version of hello_video.bin (as used on Gert's Toast E robot) to position the picture correctly on screen. I cannot see any other threads on this so I assume the problem is me rather than the program. I am working on the assumption that the arguments for posit...
by yertiz
Sun Oct 20, 2013 10:16 pm
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

I have a similar project to the OP: transmitting from the house to the garage 30 m away. I tried PowerLine, but it seems to balk at passing through separate power boards (i.e. RCDs etc): one in the garage and one in the house. It works OK within the house, but not to the garage. So, I'm back to wir...
by yertiz
Sun Oct 20, 2013 10:10 pm
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

Without knowing your budget, it's hard to give advice... but, you might want to look here: https://store.ubnt.com/unifi.html Thanks for the link. I was anticipating a total bill in the order of £200 so the Unifi options looks a touch expensive. But if the powerline solution doesn't work I may yet g...
by yertiz
Sat Oct 19, 2013 10:48 am
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

I use them 24/7 to create a network *within* my own home instead of running utp cables. That's all they do - no drivers are needed. They just give you a 'virtual cable' between two points - and those endpoints can be 'meshed' if there are more than 2. This is the product I am using. http://www.tp-l...
by yertiz
Fri Oct 18, 2013 10:48 am
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

I use them 24/7 to create a network *within* my own home instead of running utp cables. That's all they do - no drivers are needed. They just give you a 'virtual cable' between two points - and those endpoints can be 'meshed' if there are more than 2. This is the product I am using. http://www.tp-l...
by yertiz
Fri Oct 18, 2013 12:40 am
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

You can boost your wifi signal by using a parabolic dish this improves transmission and reception by making the radio waves travel in a more directionally manner and thus more powerful. There are plenty of online DIY websites and tutorials on making your own wokfi - http://en.wikipedia.org/wiki/Wok...
by yertiz
Fri Oct 18, 2013 12:26 am
Forum: Networking and servers
Topic: Bridging a wifi gap
Replies: 13
Views: 3772

Re: Bridging a wifi gap

There is no way to get networking cable across the road. The house and stable do share power Are you aware of 'Powerline' network technology? Sort of ethernet-over-mains. If it's legal in your neck of the woods, I wonder if it might work well enough over the distances concerned? I have looked at th...

Go to advanced search