Go to advanced search

by pfletch101
Wed Feb 20, 2019 1:14 am
Forum: Advanced users
Topic: I want MySQL instead of MariaDB
Replies: 54
Views: 16711

Re: I want MySQL instead of MariaDB

Debian-based OSs don't provide the very latest of anything. They supply stable older versions of packages that meet their distribution requirements. Which, from many points of view, might be considered to be a good thing. If you want the 'latest and (possibly!) greatest' versions of things, the Pi ...
by pfletch101
Mon Feb 18, 2019 7:55 pm
Forum: Advanced users
Topic: systemd socket issues
Replies: 2
Views: 64

Re: systemd socket issues

Perhaps add " Freebind=true " in [Socket]? Yes, that was it! Thanks! Once one knows about the option, the manpages clearly explain why it is necessary, but there are just so many options, which are (as far as I can determine) presented in no particularly logical order, and most of which are never u...
by pfletch101
Mon Feb 18, 2019 4:38 pm
Forum: Advanced users
Topic: systemd socket issues
Replies: 2
Views: 64

systemd socket issues

I have a collection of dedicated TCP servers running on a Pi which serve environmental data to a master program running on my main Windows PC. The servers have been being started by cron on system startup. The setup has mostly been working well, but following some exchanges on another thread, I have...
by pfletch101
Sun Feb 17, 2019 10:14 pm
Forum: General programming discussion
Topic: Code to take readings automatically from a probe
Replies: 4
Views: 124

Re: Code to take readings automatically from a probe

redirecting stdout to a file sounds way more complex than it is Use ">" and ">>" at the end of your command that usually outputs to screen followed by the path to and file name of the file you want to write to. It won't output to the screen at all. Cron doesn't output to screen unless the code uses...
by pfletch101
Sat Feb 16, 2019 1:48 am
Forum: Advanced users
Topic: connectivity questions
Replies: 6
Views: 143

Re: connectivity questions

Most routers have the option to reserve an IP for a device in their DHCP settings. Once reserved, the same IP will always be assigned to the same device (regardless of software). This is usually simpler than setting static IP on the device itself, and doesn't require any changes to your current sof...
by pfletch101
Fri Feb 15, 2019 11:57 pm
Forum: Networking and servers
Topic: Raspberry Pi Email Server complete solution
Replies: 5
Views: 16102

Re: Raspberry Pi Email Server complete solution

Your warning doesn't entirely make sense. If email traffic and/or traffic to/from the standard SMTP and POP-3 ports were blocked on a network, you could not send or receive email at all, let alone run a mail server. I have run my own local mail server for more than a decade under a number of ISPs, ...
by pfletch101
Wed Feb 13, 2019 3:45 pm
Forum: Automation, sensing and robotics
Topic: High reliability, high accuracy temperature/humidity sensor
Replies: 11
Views: 346

Re: High reliability, high accuracy temperature/humidity sensor

I'm looking for recommendations for sensors that are high accuracy, fast response (preferably on the order of seconds), and will be reliable over the course of weeks when used in high humidity (>50%) conditions. The accuracy and response rate of the temperature sensor is more important the humidity...
by pfletch101
Wed Feb 13, 2019 3:33 pm
Forum: Beginners
Topic: A basic setup that randomly turns on a light for a random time.
Replies: 8
Views: 157

Re: A basic setup that randomly turns on a light for a random time.

If that's all you want, you would better off buying a dedicated plugin switch with this functionality, e.g. https://www.amazon.com/GE-50462-7-Day-Random-Vacation/dp/B0002U3Y0Q . It appears not very random according to the reviews. My 'choice' was not intended as a specific recommendation - just one...
by pfletch101
Wed Feb 13, 2019 3:18 pm
Forum: Beginners
Topic: A basic setup that randomly turns on a light for a random time.
Replies: 8
Views: 157

Re: A basic setup that randomly turns on a light for a random time.

If that's all you want, you would better off buying a dedicated plugin switch with this functionality, e.g. https://www.amazon.com/GE-50462-7-Day-R ... B0002U3Y0Q.
by pfletch101
Tue Feb 12, 2019 6:32 pm
Forum: Python
Topic: How to compare current and next day
Replies: 27
Views: 762

Re: How to compare current and next day

If that's what you really want to see (and I can't imagine why you would want things to work like this :) ), you are going to have to have two separate threads (or processes, but this would probably be overkill), one to reset the count variable every minute and the other to respond to the trigger. ...
by pfletch101
Tue Feb 12, 2019 2:55 pm
Forum: Python
Topic: How to compare current and next day
Replies: 27
Views: 762

Re: How to compare current and next day

It only updates when you trigger the gpio pin because the only change to your counter variable is inside the display_and_clear() function, and that function is only invoked in response to the INPUT_PIN being triggered. If you don't trigger the gpio pin the code could run for hours without the count...
by pfletch101
Fri Feb 08, 2019 11:22 pm
Forum: Python
Topic: Does 'finally:' work if Pi is shut down.
Replies: 4
Views: 103

Re: Does 'finally:' work if Pi is shut down.

Are you running it as a systemd service? Do you have a signal handler in your code? No, and no! You are apparently saying that these answers should be Yes and Yes :) I was rather afraid that systemd was the answer, and will have to dig into it. :( import os import sys import signal def term_receive...
by pfletch101
Fri Feb 08, 2019 10:20 pm
Forum: Python
Topic: Does 'finally:' work if Pi is shut down.
Replies: 4
Views: 103

Does 'finally:' work if Pi is shut down.

If I have code that looks like the dummy snippet below, running from cron, will code in the 'finally:' block be executed before the system shuts down or reboots if these are requested/ordered from the command line? If not (or not by default), is there any way of forcing this to happen? import this i...
by pfletch101
Fri Feb 08, 2019 8:42 pm
Forum: Advanced users
Topic: Device Names of USB Serial ports
Replies: 4
Views: 118

Re: Device Names of USB Serial ports

There are standard udev rules that create predictably-named symlinks under /dev/serial/by-id/, based on the USB descriptors, and /dev/serial/by-path/, based on the physical port numbering. You will need to use by-path if the two devices are otherwise identical. The predictable names are a bit cumbe...
by pfletch101
Fri Feb 08, 2019 8:40 pm
Forum: Advanced users
Topic: Device Names of USB Serial ports
Replies: 4
Views: 118

Re: Device Names of USB Serial ports

nothing virtual about them. they are quite real. I am old enough to believe that a real Serial Port (usually) has a DB9 or DB25 connector to attach a cable that connects it to the outside world, and transmits and receives data according to the RS232C protocol, or one of its variants or more modern ...
by pfletch101
Fri Feb 08, 2019 4:34 pm
Forum: Advanced users
Topic: Device Names of USB Serial ports
Replies: 4
Views: 118

Device Names of USB Serial ports

I now have two USB devices with virtual serial ports (communicating with external devices), plugged into a Pi I use for environmental monitoring. The first one has been configured for a while, and is (logically enough) addressed as ttyUSB0; I recently added the second one, which appeared (again logi...
by pfletch101
Thu Feb 07, 2019 3:57 pm
Forum: Python
Topic: What database to use for timecard project?
Replies: 1
Views: 73

Re: What database to use for timecard project?

You haven't given us a great deal to go on, but the requirements for more than one user to access the database and for 'remote' access makes it likely that SQLite will not be adequate. MariaDB would probably be my choice, and could certainly do anything that you might reasonably want.
by pfletch101
Wed Feb 06, 2019 3:01 pm
Forum: Networking and servers
Topic: Update variables in python script from web input
Replies: 4
Views: 121

Re: Update variables in python script from web input

The way I generally handle this sort of problem is to have the user interface code write the data which is to be used in the (motor) control code to a file in a known location on the server - usually in CSV format - and then have the motor control code read the data from the file. Any of the applica...
by pfletch101
Wed Feb 06, 2019 2:35 pm
Forum: Beginners
Topic: update pi
Replies: 5
Views: 155

Re: update pi

I routinely update my Pis about every other week, but I also always update an individual Pi immediately before installing new application software on it.
by pfletch101
Wed Feb 06, 2019 2:31 pm
Forum: General discussion
Topic: Physical port widths on B+
Replies: 21
Views: 495

Re: Physical port widths on B+

for example Mini USB is 0.000342996898115 of a chain wide :lol: (been a very very bad day here) I would point out that the chain is not actually an obsolete unit - it's still the definitive locational information of each structure on UK railways - the 'chainage' is defined in miles and chains from ...
by pfletch101
Tue Feb 05, 2019 7:59 pm
Forum: Beginners
Topic: Multi output power source options
Replies: 5
Views: 164

Re: Multi output power source options

If I were going to make what you are describing, I'd first figure what the theoretical maximum current requirement would be (16 Pi zeroes is going to be a lot different than 16 Pi 3's). Your supply may have to be able to deliver some real current, so caution is in order. My main point: In any event...
by pfletch101
Tue Feb 05, 2019 7:47 pm
Forum: General discussion
Topic: Auto login
Replies: 7
Views: 262

Re: Auto login

Perhaps the OP is using a version of Rasbian without a desktop and/or boots up in command line mode. Since I always boot up to the desktop, I haven't tried to configure autologin for command mode.
by pfletch101
Mon Feb 04, 2019 10:40 pm
Forum: Python
Topic: WHILE LOOP query
Replies: 28
Views: 585

Re: WHILE LOOP query

You can't have more than one while true loop in your program as the program will get stuck looping in the first while true loop it comes to, so what you need is to have a while true loop for the whole program including the get data part and the display part, then you need to have a second loop to d...
by pfletch101
Mon Feb 04, 2019 1:26 am
Forum: Camera board
Topic: Direct sunlight versus camera board
Replies: 6
Views: 243

Re: Direct sunlight versus camera board

What happens if you use a lens to focus the sun on a piece of paper? I would expect the same thing to happen to a sensor element with the sun's image focused on it. https://www.raspberrypi.org/documentation/hardware/camera/README.md Sensor image area is 3.76 × 2.74 mm / 3.68 x 2.76 mm for v1 / v2 c...
by pfletch101
Sun Feb 03, 2019 3:19 pm
Forum: Camera board
Topic: Direct sunlight versus camera board
Replies: 6
Views: 243

Re: Direct sunlight versus camera board

I don't know why the sensor should break. I once did record directly into bright lamp without issues. Because of 600fps framerate the shutter time was not high though: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=109137&start=300#p1243594 There is a lot of difference (orders of magnitude...

Go to advanced search