Go to advanced search

by ebolisa
Wed Nov 06, 2019 10:56 am
Forum: General discussion
Topic: Running a second web server [SOLVED]
Replies: 4
Views: 118

Re: Running a second web server

Soved. Thank you much!!
by ebolisa
Wed Nov 06, 2019 10:48 am
Forum: General discussion
Topic: Running a second web server [SOLVED]
Replies: 4
Views: 118

Re: Running a second web server

Thanks for the info but if I change the default port to 82 for my test web pages then kiosko will stop working.
The idea is for the server is to be listening to two ports, not sure if that can be done.
by ebolisa
Wed Nov 06, 2019 10:18 am
Forum: General discussion
Topic: Running a second web server [SOLVED]
Replies: 4
Views: 118

Running a second web server [SOLVED]

Hi, I'm running kiosko on port 80 and I'd like to serve different pages on port 82. How do I do that? The following addition into the conf file didn't help. <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/...
by ebolisa
Tue Oct 29, 2019 6:25 pm
Forum: General discussion
Topic: Programming the output of HDMI's video/audio [solved]
Replies: 1
Views: 173

Re: Programming the output of HDMI's video/audio

Ok, found out that

Code: Select all

vcgencmd display_power 1/0
turns on and off the video, but how about the sound?

EDIT:
Actually the code above turns on/off both the video and the audio.
by ebolisa
Wed Oct 23, 2019 6:15 pm
Forum: General discussion
Topic: Detect audio on HDMI line
Replies: 1
Views: 203

Detect audio on HDMI line

Hi,

Is it possible to detect the presence of audio (or being outputed through) on the HDMI line via code?

TIA
by ebolisa
Wed Oct 16, 2019 7:00 pm
Forum: General discussion
Topic: Programming the output of HDMI's video/audio [solved]
Replies: 1
Views: 173

Programming the output of HDMI's video/audio [solved]

Hi,

Is there a way to turn ON/OFF the HDMI video and audio outputs via code? Or have the card going into sleep mode during a period of time?

I've a card connected to a monitor 24h and I'd like to stop, at list, the audio so it wouldn't bother at night time.

TIA
by ebolisa
Thu May 16, 2019 4:30 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

Aydan wrote:
Thu May 16, 2019 1:26 pm
You should modify your script so it does not die if the service it depends on is not available.
How can I do that?
by ebolisa
Thu May 16, 2019 4:28 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

Assuming that the server you are depending on is also run from systemd, you should simply be able to add a Requires= line for it and the dependency on it to the 'After=' line in the script's unit file.
[/quote]

Actually, the server is fired from the /etc/rc.local file.
by ebolisa
Wed May 15, 2019 11:24 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

I'm running a Blynk script using Python in this matter: phone app <-> server <-> script. Threfore, if the local server (installed on the same board where my code is running) is not up and running before the script's execution, the service call fails. That's to be expected as it makes sense. I just l...
by ebolisa
Wed May 15, 2019 10:05 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

my service is not starting at power up [SOLVED]

No, no graphics involved. Python code is trying to connectet to a local (127.0.0.1) server.

it appears that the below line helped delaying the script thus solving my issue.

Code: Select all

ExecStartPre=/bin/sleep 30
Thank you.
by ebolisa
Wed May 15, 2019 9:48 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

at a guess Python is printing an error message The file is empty. :? However, this' from my syslog file... May 15 23:42:39 washup python3[757]: ValueError: Connection with the Blynk server 127.0.0.1:8080 failed May 15 23:42:39 washup systemd[1]: blynkscript.service: Main process exited, code=exited...
by ebolisa
Wed May 15, 2019 9:40 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

have you set up the unit file to start it after networking is fully loaded and available? It may be my problem. This' my script [Unit] Description=MyBlynk Service After=multi-user.target [Service] Type=idle ExecStart=/usr/bin/python3 /home/pi/washup/blynkmain.py > /home/pi/washup/blynk.log 2>&1 Res...
by ebolisa
Wed May 15, 2019 7:33 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

Re: my service is not starting at power up

I don't remember but I just did it and rebooted. Still having the same problem.
by ebolisa
Wed May 15, 2019 6:02 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 763

my service is not starting at power up [solved]

Hi, when starting or rebooting the board my service doesn't start. sudo systemctl status blynkscript.service blynkscript.service - MyBlynk Service Loaded: loaded (/lib/systemd/system/blynkscript.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-05-15 19:32:4...
by ebolisa
Thu Apr 25, 2019 4:18 pm
Forum: General discussion
Topic: Have a lib assessible to all users
Replies: 2
Views: 102

Re: Have a lib assessible to all users

Thank you but where will it go. I looked under/usr/lib/locale and cannot see it.

EDIT:
Found it. Thank you.
by ebolisa
Thu Apr 25, 2019 4:02 pm
Forum: General discussion
Topic: Have a lib assessible to all users
Replies: 2
Views: 102

Have a lib assessible to all users

Hi,

I've the Blynk library located at /home/pi/.local/lib/python3.5/site-packages.

When executing a python3 script using said lib as a user, works fine. However, when executing the same script as a service, the lib is not detected.

How can I make the lib accessible to all users?

TIA
by ebolisa
Sun Apr 21, 2019 8:34 am
Forum: General discussion
Topic: Push button detection
Replies: 4
Views: 256

Re: Push button detection

Because I'm sharing the gpio pin with an other program.
by ebolisa
Sat Apr 20, 2019 9:39 am
Forum: General discussion
Topic: Push button detection
Replies: 4
Views: 256

Push button detection

Hi, With the following code, I'm detecting a pushbutton switch. It's important for me to release the gpio pin when not used, for that I'm using the function cleanup(). However, I'm getting "RuntimeError: Failed to add edge detection" probably because the code is not releasing the pin. Any help is ap...
by ebolisa
Mon Apr 08, 2019 1:47 pm
Forum: Other programming languages
Topic: gpio - how to use unexport() correctly (node)
Replies: 2
Views: 846

Re: gpio - how to use unexport() correctly (node)(Solved)

Once executed unexport(), the pin cannot be reused which is what the code was doing. So, said pin needs to be reinitialized before of its use.
by ebolisa
Mon Apr 08, 2019 10:43 am
Forum: Other programming languages
Topic: gpio - how to use unexport() correctly (node)
Replies: 2
Views: 846

gpio - how to use unexport() correctly (node)

Hi, I'm using the code shown below to trigger a relay for a second. Because the relay is shared by various programs, it's imperative that the gpio pin is released from this code. However, the code crushes when unexport() function is reached. Without it, the code works fine. A similar code works fine...
by ebolisa
Tue Apr 02, 2019 6:04 pm
Forum: General discussion
Topic: Question on a code design
Replies: 2
Views: 187

Question on a code design

Hi, I'm designing a button-less clock using a Zero and I'm doing it this way: With a php code I create a .json settings file where I store alarm time, brightness level, etc. then with a python code, I load the libraries, read the settings and display time. If the time matches, sounds an alarm. Becau...
by ebolisa
Sat Mar 16, 2019 11:46 pm
Forum: General discussion
Topic: Connecting relay board far away from rpi
Replies: 12
Views: 729

Re: Connecting relay board far away from rpi

pcmanbob wrote:
Sat Mar 16, 2019 7:06 pm
You could also try it using 5v to power the relay control circuit and then use a ULN2803A at the pi end to just switch a ground.
Unfortunatelly that way the grounds would be shared. Right now I've them totally isolated.
Captura.PNG
Captura.PNG (81.61 KiB) Viewed 545 times
by ebolisa
Fri Mar 15, 2019 6:15 pm
Forum: General discussion
Topic: Connecting relay board far away from rpi
Replies: 12
Views: 729

Re: Connecting relay board far away from rpi

Use two relays. One at the RPi switches 12V/24V. Then a 12V/24V relay near the load switches the main 230V circuit. You can run 12V/24V (up to 48V) over phone cable and it's good for hundreds of metres away from the RPi. Ok, thanks. That's one way to do it and no programming needed for the second b...
by ebolisa
Fri Mar 15, 2019 5:43 pm
Forum: General discussion
Topic: Connecting relay board far away from rpi
Replies: 12
Views: 729

Re: Connecting relay board far away from rpi

Did you consider the possibility of controlling Relays through Arduino (preferably pro min 3.3 V) connected to Raspberry Pi Via Serial ? Hum! But that wont solve the distance problem. The Arduino needs to be next to the relay board thus 8 meters avay from the RPI. I'm using Blynk on the RPI to cont...
by ebolisa
Fri Mar 15, 2019 2:57 pm
Forum: General discussion
Topic: Connecting relay board far away from rpi
Replies: 12
Views: 729

Re: Connecting relay board far away from rpi

longer lengths of thin wire can have a significant resistance and result in a voltage drop further complicating matters, so testing the voltage at the end of the run would be expedient. while a more expensive option with costs of £4 ish for a single relay option to circa £20 for a 4x relay option. ...

Go to advanced search