Go to advanced search

by Andyroo
Wed Sep 18, 2019 1:50 pm
Forum: Beginners
Topic: How to change Client Name of Raspberry from "Unkown" in AP's DHCP List ?
Replies: 2
Views: 61

Re: How to change Client Name of Raspberry from "Unkown" in AP's DHCP List ?

dhcpcd has a few options for registering the host name with the DHCP server and by blanking the file out you have removed the default. I would have as a minimum: interface wlan0 hostname = web.local clientid persistent option domain_name_servers, domain_name, domain_search, host_name option classles...
by Andyroo
Wed Sep 18, 2019 1:33 pm
Forum: Networking and servers
Topic: creat UDP connection
Replies: 6
Views: 99

Re: creat UDP connection

The Real Python site has a good walkthrough for sockets programming at https://realpython.com/python-sockets/ I would stick with TCP rather than UDP as it is possible the UDP packets get lost (not good in a control system) or out of order (very strange text file could result)... If you want to try U...
by Andyroo
Wed Sep 18, 2019 10:16 am
Forum: Beginners
Topic: launch executable without prompt
Replies: 3
Views: 68

Re: launch executable without prompt

Thank you for that clear explanation :D
by Andyroo
Wed Sep 18, 2019 2:46 am
Forum: Beginners
Topic: launch executable without prompt
Replies: 3
Views: 68

Re: launch executable without prompt

Its in the options for the file manager. I do not have a machine handy with a GUI but if you open the program and look at its options you will see a tick box that says something along the lines of ‘prompt what to do’. Sorry it’s a bit vague but it’s 4AM here and my memory is a bit duff :lol: I did f...
by Andyroo
Wed Sep 18, 2019 2:42 am
Forum: Python
Topic: Setting the output of a subprocess to a variable
Replies: 10
Views: 115

Re: Setting the output of a subprocess to a variable

You need to add a loop using the while command Have a read of https://realpython.com/python-while-loop/ especially the bit about infinite loops. If you think about the logic flow of your program, it needs to look like: set up GPIO START loop Wait for button press Act on the button press Go back to t...
by Andyroo
Wed Sep 18, 2019 1:11 am
Forum: Python
Topic: Setting the output of a subprocess to a variable
Replies: 10
Views: 115

Re: Setting the output of a subprocess to a variable

The command you are running is a console command so it will end the line with the newline character to be tidy else you would get display_power=1pi@web:~ $ rather than display_power=1 pi@web:~ $ (Assuming pi@web is your computer of course) This is the same as: print("Line one", end ="") print(" stil...
by Andyroo
Wed Sep 18, 2019 12:42 am
Forum: Python
Topic: Setting the output of a subprocess to a variable
Replies: 10
Views: 115

Re: Setting the output of a subprocess to a variable

You may have a hidden line feed at the end of the text so let’s try adding \n to the text...

Code: Select all

if i.decode('ascii') == "display_power=1\n":
Still on my iPad so I cannot test.
by Andyroo
Wed Sep 18, 2019 12:37 am
Forum: Beginners
Topic: Turning on raspberry pi wirelessly.
Replies: 8
Views: 164

Re: Turning on raspberry pi wirelessly.

I’ve not seen a device to do that.

Some HATs have a timer wake up function but I’m sure it would not be hard to create a device using an ESP WiFi chip to do this.

By the way - WOL is not supported
by Andyroo
Wed Sep 18, 2019 12:35 am
Forum: Troubleshooting
Topic: Can fstab be adjusted for time delay when spin-up of disk takes longer ?
Replies: 2
Views: 55

Re: Can fstab be adjusted for time delay when spin-up of disk takes longer ?

You could try adding boot_delay=x to config.txt to slow the whole boot process by ‘x’ seconds. Try adding a file called timeout (no extension) to the /boot directory, that’s designed to add a wait in to the process for a tin disk to start to boot from. The only other thing I have seen is the https:/...
by Andyroo
Wed Sep 18, 2019 12:26 am
Forum: Python
Topic: Setting the output of a subprocess to a variable
Replies: 10
Views: 115

Re: Setting the output of a subprocess to a variable

Any error message?
by Andyroo
Tue Sep 17, 2019 11:53 pm
Forum: Raspbian
Topic: How to go fro CLI to GUI raspbian ?
Replies: 2
Views: 60

Re: How to go fro CLI to GUI raspbian ?

To make your Pi restart in the GUI after a restart run

Code: Select all

sudo raspi-config
From a terminal session
Take option 3 then B1 and select your option from there.

You can do this is the GUI but I’ve no idea where :lol: :roll: :lol:
by Andyroo
Tue Sep 17, 2019 11:49 pm
Forum: Beginners
Topic: Leak sensor too sensitive
Replies: 4
Views: 80

Re: Leak sensor too sensitive

No idea electronically but I would treat it in software like a keyboard bounce.

Only class a valid trigger as one where the alarm condition exists for a second or so constantly.

A few extra moments may only cost you a pint or two extra water :shock:
by Andyroo
Tue Sep 17, 2019 11:47 pm
Forum: General discussion
Topic: VPN
Replies: 6
Views: 149

Re: VPN

Hi There following on from a previous post about accessing raspberry pi remotely to allo transfer of files over the internet such as updating movies for Kodi etc. is there a free VPN not one of the cloud based ones. that allow me to create a private connection between my rasberry pi and my computer...
by Andyroo
Tue Sep 17, 2019 11:44 pm
Forum: General discussion
Topic: Installing Visual Studio Code
Replies: 10
Views: 251

Re: Installing Visual Studio Code

Have you seen the Headmelted install at https://code.headmelted.com/ ? I’ve not tried it under Buster. You HAVE TO BE AT A SUPER USER shell and not use sudo, so make sure you use sudo -s first. Note this is built on updates from Microsoft so you may have the odd glitch till M/S solves it :lol: The o...
by Andyroo
Tue Sep 17, 2019 8:23 pm
Forum: Python
Topic: Setting the output of a subprocess to a variable
Replies: 10
Views: 115

Re: Setting the output of a subprocess to a variable

It is returning the correct data as from the command line you get: vcgencmd display_power display_power=1 the ‘b’ denotes a binary string so you need to convert that to a string you can compare: if i.decode('ascii') == "display_power=1": will do the job. Note above untested as I have no Pi easily re...
by Andyroo
Tue Sep 17, 2019 8:17 pm
Forum: Troubleshooting
Topic: The mystery of 3 dead pi4s
Replies: 14
Views: 392

Re: The mystery of 3 dead pi4s

PSU could be faulty...
by Andyroo
Tue Sep 17, 2019 8:15 pm
Forum: Beginners
Topic: MQTT Publisher Troubleshooting
Replies: 5
Views: 64

Re: MQTT Publisher Troubleshooting

I’ll ask the obvious and question if you have board and BCM PIN numbers mixed up?

Does the switch actually work?

Check the voltage at and through the switch with a multi-meter reference to the Pi ground.
by Andyroo
Tue Sep 17, 2019 7:05 pm
Forum: Troubleshooting
Topic: The mystery of 3 dead pi4s
Replies: 14
Views: 392

Re: The mystery of 3 dead pi4s

Welcome to the forum, Shame you have to come here with a problem as your first post... First thought is you do not mention a case - could the physical environment shorting anything? Any other hardware plugged in? Did you try without the SSD? Any power brown outs / clocks on cookers etc resetting and...
by Andyroo
Tue Sep 17, 2019 5:22 pm
Forum: Beginners
Topic: Using Dropbox
Replies: 3
Views: 68

Re: Using Dropbox

You could try this https://github.com/andreafabrizi/Dropbox-Uploader The official Linux client is x86 code so will not run on the Pi and the ExaGear client is long gone so those ways will not work. I've just been using the web client for the limited use I do now. Edit: Sorry - duplicate advice in th...
by Andyroo
Tue Sep 17, 2019 5:16 pm
Forum: General discussion
Topic: trying to buy more than 1 pi zero
Replies: 18
Views: 477

Re: trying to buy more than 1 pi zero

The first is discounted by the RPT/RPF as an intro to computing as a loss.

If you want more than one then its correct that you pay the actual price and support them and the Foundations aims and not try to rip them off.
by Andyroo
Tue Sep 17, 2019 4:37 pm
Forum: General discussion
Topic: Disable LCD Touchscreen Display
Replies: 3
Views: 100

Re: Disable LCD Touchscreen Display

You could have to copies of the config.txt file and swap them around as you need. It may be possible to detect if the monitor is connected using the [EDID=] filter in the file as detailed https://www.raspberrypi.org/documentation/configuration/config-txt/conditional.md Never tried either to be hones...
by Andyroo
Tue Sep 17, 2019 4:23 pm
Forum: General discussion
Topic: New Raspbian Buster and Thonny idle, "hate at first sight"
Replies: 15
Views: 390

Re: New Raspbian Buster and Thonny idle, "hate at first sight"

The python command defaults to V2 to maintain compatibility with upstream Debian. python3 is the program you need. As Thonny is part sponsored by the RPT/RPF folk, they took the decision (correctly in my mind) to go forward with v3 so new code created by schools etc using Thonny is the correct versi...
by Andyroo
Tue Sep 17, 2019 4:18 pm
Forum: Python
Topic: Read serial port using pyserial problem
Replies: 9
Views: 120

Re: Read serial port using pyserial problem

Have you tried restarting the program as top guy suggested?

I would also try

Code: Select all

lsusb
in another terminal session to see if the adapter has 'dropped off' the USB.

One other thought is the new line character is getting lost in the transmutation somehow so the read line is never completing...
by Andyroo
Tue Sep 17, 2019 4:13 pm
Forum: Networking and servers
Topic: wordpress host
Replies: 9
Views: 268

Re: wordpress host

Its a bit rough around the edges but for Buster https://www.raspberrypi.org/forums/view ... 1&t=249882 will get you up and running.

I've not got a Pi handy at the mo to finish the work (see my last post here) but you may not need those modules.

Go to advanced search