Go to advanced search

by jehutting
Sat Nov 26, 2016 7:11 am
Forum: Nederlands
Topic: Relay schakelen via python bij zonsondergang tot zonsopgang
Replies: 10
Views: 2304

Re: Relay schakelen via python bij zonsondergang tot zonsopg

Fijn dat je het werkend hebt en bedankt voor de update. Goed bezig.
Succes verder met je project!
by jehutting
Wed Nov 23, 2016 8:34 pm
Forum: Nederlands
Topic: Relay schakelen via python bij zonsondergang tot zonsopgang
Replies: 10
Views: 2304

Re: Relay schakelen via python bij zonsondergang tot zonsopg

Je kunt in de Controller.status_check() -die elke 0.5 seconde aangeroepen wordt- de actuele daytime().status opvragen. Als deze veranderd is (tov een bewaarde status), dan kan je de lamp(en) waarvan de auto_sun de waarde "true" heeft, overeenkomstig de nieuwe status schakelen. De Light.set_auto_sun(...
by jehutting
Tue Nov 22, 2016 7:24 pm
Forum: Nederlands
Topic: Relay schakelen via python bij zonsondergang tot zonsopgang
Replies: 10
Views: 2304

Re: Relay schakelen via python bij zonsondergang tot zonsopg

Hoi Max, Je 'hardware' ziet er goed uit. Als de status 'night' is schakelt de relais weliswaar in, echter door de else-tak van de if status == 'day' wordt de self.last_action op 'None' gezet. Je moet de if status == 'day' veranderen in elif status == 'day'. def set_auto_sun(self, value): self.auto_s...
by jehutting
Sun Nov 20, 2016 1:39 pm
Forum: Nederlands
Topic: Relay schakelen via python bij zonsondergang tot zonsopgang
Replies: 10
Views: 2304

Re: Relay schakelen via python bij zonsondergang tot zonsopg

Hoi Max, Allereerst, ik was gewoon geinteresseerd hoe het een en ander werkt met ajax/javascript/python/etc. Voor de gein heb ik een switch aan de buitenlamp toegevoegd waarmee de automatische zonsondergang en -opgang functie gerealiseerd kan worden. Ik heb het een en ander bijelkaar gegoogled om da...
by jehutting
Sat Nov 05, 2016 8:44 am
Forum: Nederlands
Topic: Phyton
Replies: 1
Views: 706

Re: Phyton

Als je je programma executeert dan krijg je waarschijnlijk onderstaande: $ python3 main.py File "main.py", line 8 def __init__(self) ^ SyntaxError: invalid syntax Als je dan de "foute regel" bestudeert dan zie je dat de functie definitie regel niet afgesloten is met het dubbele punt karakter ':' , w...
by jehutting
Wed Oct 05, 2016 3:53 am
Forum: Nederlands
Topic: KAKU
Replies: 7
Views: 5734

Re: KAKU

Fijn dat je het met pilight werkend hebt. Al zoekend op het internet kwam ik pimatic tegen. Misschien is dat ook wat voor jou. Heb vluchtig gekeken of ik kon achterhalen wat pilight verstuurd, maar kwam er niet snel achter. Vreemd dat je unitcode en id de waarde 1 zijn bij pilight en bij het kaku pr...
by jehutting
Wed Oct 05, 2016 3:16 am
Forum: Troubleshooting
Topic: stuck in omxplayer loop
Replies: 3
Views: 1727

Re: stuck in omxplayer loop

Code: Select all

sudo killall omxplayer.bin
Notice the .bin. The executable omxplayer is a wrapper script which calls omxplayer.bin.
by jehutting
Sun Oct 02, 2016 6:39 am
Forum: Nederlands
Topic: volledig beeld omxplayer
Replies: 1
Views: 673

Re: volledig beeld omxplayer

@Berry56 zijn de witte balken echt taakbalken of is het een witte console achtergrond? Maw gebruik je de grafische schil (GUI) of rechtstreeks de console (dus geen GUI). Wat zie je als je in de console omxplayer --blank=0xffff0000 <file> geeft. Zie je dan een rode achtergrond en is deze beeldvullend?
by jehutting
Sun Oct 02, 2016 6:25 am
Forum: Nederlands
Topic: KAKU
Replies: 7
Views: 5734

Re: KAKU

@Remuko, ik heb helaas geen KAKU modules. Misschien heb je het al werkende gekregen, anders... Wat ik heb zijn ELRO modules. Ik heb de code uit de door nl3prc geposte link gebruikt, en heb de modules hiermee aan kunnen sturen. Het elro programmaatje werkt zowel op een Raspberry Pi Model B als op een...
by jehutting
Wed May 11, 2016 8:49 am
Forum: General discussion
Topic: RTSP from a IP camera
Replies: 36
Views: 62830

Re: RTSP from a IP camera

@nicsergio Thanks for the logging. The problem with your stream is that omxplayer detects it has video AND audio. BUT..your stream doesn't deliver any audio packets. These audio packets are 'driving' a play clock. So omxplayer is waiting for them...well endlessly, giving you the impression it is fro...
by jehutting
Tue May 10, 2016 1:27 pm
Forum: General discussion
Topic: RTSP from a IP camera
Replies: 36
Views: 62830

Re: RTSP from a IP camera

A liitle bit late but nevertheless...

@vedranius: Maybe you can use raspi2png

@ooobelix: omxplayer ouputs the video directly to the HDMI/analog port. I don't know of a /dev/video0 on RPI.

@nicsergio: use omxplayer -g option to get a omxplayer.log file. Maybe it reveals the error.
by jehutting
Tue May 10, 2016 12:27 pm
Forum: C/C++
Topic: Hacking the omxplayer
Replies: 4
Views: 1514

Re: Hacking the omxplayer

I would go for OMXCore.cpp function COMXCoreComponent::DecoderFillBufferDone. But I doubt if you will have your pulse at the frame point in time; I simply don't know how this callback function is related in time to the frame shown on your display. Edit: ...and a sleep in this callback is asking for ...
by jehutting
Fri May 06, 2016 5:50 am
Forum: Troubleshooting
Topic: OMXplayer
Replies: 1
Views: 384

Re: OMXplayer

You need to

Code: Select all

os.system('omxplayer /home/pi/Smartdoor/deurbel3.mp3')
When the mp3 is fully played it continues with the GPIO statements below this call.
by jehutting
Sun Apr 17, 2016 10:09 pm
Forum: Python
Topic: Permissions Issue [IOError: [Errno 13] Permission denied: 'B
Replies: 15
Views: 14769

Re: Permissions Issue [IOError: [Errno 13] Permission denied

I don't see it too :-)
I duplicated your folders and code, but every time I run 'php buzzer.php' the time logging is appended ?!
(Hmmm...on a linux mint PC).
by jehutting
Sun Apr 17, 2016 9:37 pm
Forum: Python
Topic: Permissions Issue [IOError: [Errno 13] Permission denied: 'B
Replies: 15
Views: 14769

Re: Permissions Issue [IOError: [Errno 13] Permission denied

Are you sure you are looking in /var/www/html for Buzzer.log?
by jehutting
Sun Apr 17, 2016 6:52 pm
Forum: Python
Topic: Permissions Issue [IOError: [Errno 13] Permission denied: 'B
Replies: 15
Views: 14769

Re: Permissions Issue [IOError: [Errno 13] Permission denied

Typo, should be chmod 0777 html.
What does 'ls -la' give on /var/www?
by jehutting
Sun Apr 17, 2016 6:31 pm
Forum: Python
Topic: Permissions Issue [IOError: [Errno 13] Permission denied: 'B
Replies: 15
Views: 14769

Re: Permissions Issue [IOError: [Errno 13] Permission denied

Just try it out: chmod 777 /var/www/html and see if the log file gets created in the /var/www/html folder.
by jehutting
Sun Apr 17, 2016 1:27 pm
Forum: Python
Topic: N00B Script issue
Replies: 4
Views: 766

Re: N00B Script issue

In file 4-driving.py you are missing the ')' char of the last '#set the GPIO Pins' line (line number 16).
by jehutting
Sun Apr 17, 2016 1:19 pm
Forum: Python
Topic: Permissions Issue [IOError: [Errno 13] Permission denied: 'B
Replies: 15
Views: 14769

Re: Permissions Issue [IOError: [Errno 13] Permission denied

Maybe your php-file tries to append (/create) logging to Buzzer.log in the same folder /var/www/html (and not what you expect in /var/www/scripts), and doesn't have permission to write in /var/www/html. Assuming that the php file is called by a webbrowser, you must use the full absolute path in Buzz...
by jehutting
Wed Apr 13, 2016 4:18 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 running Jessie, OMXPlayer not running right
Replies: 13
Views: 4602

Re: Raspberry Pi 3 running Jessie, OMXPlayer not running rig

That's the date linux shows when it "doesn't know the creation date". Strange. Does all you (/usr/bin) files show this date? May be something went wrong during installation / copy files? I don't know if using this or other files with a wrong date is causing your problem. I also don't know if a fresh...
by jehutting
Sat Apr 09, 2016 8:54 pm
Forum: Troubleshooting
Topic: ALSA lib (snd_pcm_open_noupdate) Unknown PCM hw
Replies: 2
Views: 3959

Re: ALSA lib (snd_pcm_open_noupdate) Unknown PCM hw

Try to change the hw definition

Code: Select all

"hw  $0,0" 
to

Code: Select all

"hw:0,0" 
by jehutting
Sat Apr 09, 2016 6:42 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 running Jessie, OMXPlayer not running right
Replies: 13
Views: 4602

Re: Raspberry Pi 3 running Jessie, OMXPlayer not running rig

Just updated, upgraded and installed php5. $ which php /usr/bin/php $ php --version PHP 5.6.19-0+deb8u1 (cli) (built: Apr 2 2016 20:48:04) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zen...
by jehutting
Sat Apr 09, 2016 5:43 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 running Jessie, OMXPlayer not running right
Replies: 13
Views: 4602

Re: Raspberry Pi 3 running Jessie, OMXPlayer not running rig

The omxplayer.log file is created in the folder where you execute omxplayer. xxx@xxx:/tmp $ /usr/bin/omxplayer -g MP3 Audio codec mp3 channels 2 samplerate 44100 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 Stopped at: 00:00:04 have a nice day ;) xxx:/tmp $ ls -l total 184 -rw-...
by jehutting
Fri Apr 08, 2016 7:12 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3 running Jessie, OMXPlayer not running right
Replies: 13
Views: 4602

Re: Raspberry Pi 3 running Jessie, OMXPlayer not running rig

OK. I see now

Code: Select all

$ ls -l /usr/bin/X11
lrwxrwxrwx 1 root root 1 Apr  1  2014 /usr/bin/X11 -> .
So just a link to current folder.

Omxplayer has a -g option to generate logging. The logging is saved in omxplayer.log.
by jehutting
Fri Apr 08, 2016 4:57 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3 running Jessie, OMXPlayer not running right
Replies: 13
Views: 4602

Re: Raspberry Pi 3 running Jessie, OMXPlayer not running rig

Are you sure the location of omxplayer is /usr/bin/X11?
Mine resides in /usr/bin.
Find yours with

Code: Select all

which omxplayer
on a commandline.

Go to advanced search