Go to advanced search

by Canedje
Sat May 16, 2015 1:33 pm
Forum: Nederlands
Topic: P1 uitlezen en naar file schrijven
Replies: 7
Views: 1412

Re: P1 uitlezen en naar file schrijven

Hallo allemaal Ik ben een slimme meter aan het uitlezen en deze gegevens naar een bestand aan het schrijven. Nu wil ik voor iedere dag een file hebben met de datum als ik het volgende doe pi@raspberrypi ~ $ python P1.py >> `date +"%d-%m-%Y"`.txt dan wordt er een file aangemaakt met de datum.txt en ...
by Canedje
Fri May 15, 2015 10:16 am
Forum: Troubleshooting
Topic: Protect a webpage director by .htaccess
Replies: 2
Views: 570

Re: Protect a webpage director by .htaccess

Laurens-wuyts wrote:Have a look here, it can be helpful. ;)
https://help.ubuntu.com/community/Enabl ... ccessFiles

Laurens
Thanks
It is working fine now
by Canedje
Fri May 15, 2015 9:22 am
Forum: Troubleshooting
Topic: Protect a webpage director by .htaccess
Replies: 2
Views: 570

Protect a webpage director by .htaccess

I try to protect a web page by using .htaccess. I did make a file .htaccess in the protected directory with the next code: AuthUserFile /var/www/thermostaat/.htpasswd AuthGroupFile /dev/null AuthName "Password Protected Area" AuthType Basic <limit GET POST> require valid-user </limit> I di also make...
by Canedje
Tue May 12, 2015 6:38 am
Forum: Other programming languages
Topic: change a butto at clicking on it
Replies: 2
Views: 518

Re: change a butto at clicking on it

Using just HTML5 you can do this: <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <script> function changeIt() { "use strict"; var elem = document.getElementById('img1'); console.log("Clicked;", elem); if...
by Canedje
Mon May 11, 2015 7:38 pm
Forum: Other programming languages
Topic: change a butto at clicking on it
Replies: 2
Views: 518

change a butto at clicking on it

I like to have a selfmade on or off buttonin jpg or png format and toggle between both buttons at clicking on them in a website (In HTML/PHP of JS what is needed to get it done).
Can anybody give some advice or example?
by Canedje
Sun May 10, 2015 9:17 pm
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

[...] The Phone of one off my son's is not Always detected if he is still in house Can there be a setting at the Phone that it only is connetcted to wifi if active doing something with wifi? You could try something using a wifi adapter in monitor mode. I am not aware of one that will do this for th...
by Canedje
Sat May 09, 2015 1:59 pm
Forum: Automation, sensing and robotics
Topic: max lengtth of DS18B20 cable
Replies: 15
Views: 13429

Re: max lengtth of DS18B20 cable

I did add about 20 meter of CAT 5 cable to the sensor.
By proving I can tell that it works perfectly well
Thanks for the help everybody
by Canedje
Sat May 09, 2015 1:18 pm
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

Hi I did something like this where I scanned for unknown devices on my network. You could modify my stuff to meet your needs It uses nmap and bash script. Files found here.... http://dumb-looks-free.blogspot.fr/2014/05/nmap-script-to-check-for-new-devices.html good luck I tested this method. It wor...
by Canedje
Fri May 08, 2015 6:59 am
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

These are techniques to determine if a device is active on your network, but I'm understanding that you want to control your heating only when people are active and present. The moment you ping your router, whether manually or by program, it will think something's "alive". If your RPi is your DHCP ...
by Canedje
Thu May 07, 2015 1:03 pm
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

Hi I did something like this where I scanned for unknown devices on my network. You could modify my stuff to meet your needs It uses nmap and bash script. Files found here.... http://dumb-looks-free.blogspot.fr/2014/05/nmap-script-to-check-for-new-devices.html good luck Thanks this looks like a ver...
by Canedje
Thu May 07, 2015 10:37 am
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

I do think I need the do something with MAC addresses. Yes, usually. Is this 'your' setup, or someone else's? Most routers can be setup to give static addresses... and to do that you need to know the mac address of the device that will be attaching and then you assign the static address to match th...
by Canedje
Thu May 07, 2015 10:34 am
Forum: Nederlands
Topic: PWM uitlezen met firmata of tkinter
Replies: 3
Views: 877

Re: PWM uitlezen met firmata of tkinter

Je geeft toch ergens in je programma de PWM waarde op neem ik aan om de helderheid te bepalen?
Als je die waarde bewaart en wegschrijft in je setpointfile en uitleest in het andere programma om de LED aan te sturen.?
by Canedje
Thu May 07, 2015 9:48 am
Forum: Automation, sensing and robotics
Topic: max lengtth of DS18B20 cable
Replies: 15
Views: 13429

Re: max lengtth of DS18B20 cable

rpdom wrote:Some people have used cables of over 10m without any problems. I think they just used ordinary cat5 cable.
Thanks!
That will be enough :D
by Canedje
Thu May 07, 2015 9:46 am
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

Is there a way or code in Python to detect if mobile phones are connected to the router/ local network? Thinking aloud. (Or should that be 'thinking allowed?') Most things you can do from the command line can also be scripted in python. There are command line tools such as nmap that can scan for ac...
by Canedje
Thu May 07, 2015 9:34 am
Forum: Nederlands
Topic: PWM uitlezen met firmata of tkinter
Replies: 3
Views: 877

Re: PWM uitlezen met firmata of tkinter

Ik weet niet of dit is wat je bedoelt en je helpt.
Maar wat ik doe in gevallen dat informatie tussen twee programma's gedeelt moet worden is het maken van een setpoint.txt file welke ik door beide programma's laat lezen en/of schrijven met waardes die bewaard of overgenomen moet worden
by Canedje
Thu May 07, 2015 9:30 am
Forum: Automation, sensing and robotics
Topic: max lengtth of DS18B20 cable
Replies: 15
Views: 13429

max lengtth of DS18B20 cable

I'm using a DS18B20 temp sensor with is standard having about 1 meter cable.
I do like to extend this cable.
Does anybody now the limit of length to be used?
Is there something to be taken care off beside the length?

Thanks
by Canedje
Thu May 07, 2015 9:04 am
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

Re: find mobiles at local network/ router

Nobody?
by Canedje
Wed May 06, 2015 10:40 am
Forum: Other programming languages
Topic: PHP/ JS ->Show analog clock
Replies: 10
Views: 2050

Re: PHP/ JS ->Show analog clock

Create a file called /var/www/hc.clock.js (with the Javascript analog clock code from that website). Create a HTML file /var/www/hc.clock.html <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Analog clock</title> <script src='http://code.jquery.com/jquery-1.9...
by Canedje
Wed May 06, 2015 8:55 am
Forum: Other programming languages
Topic: PHP/ JS ->Show analog clock
Replies: 10
Views: 2050

Re: PHP/ JS ->Show analog clock

DougieLawson wrote:Please post a link to the PHP code you've downloaded.

I tried to make this code working:
http://jsfiddle.net/gh/get/jquery/1.9.1 ... uge-clock/

I do use other codes from this side which are working
by Canedje
Wed May 06, 2015 8:46 am
Forum: Python
Topic: find mobiles at local network/ router
Replies: 17
Views: 5078

find mobiles at local network/ router

Is there a way or code in Python to detect if mobile phones are connected to the router/ local network?

I like to use that for switching off heating by my smart thermostat?
Because if a phone is connected somebody is at home

help appriciated
by Canedje
Wed May 06, 2015 8:33 am
Forum: Other programming languages
Topic: PHP/ JS ->Show analog clock
Replies: 10
Views: 2050

PHP/ JS ->Show analog clock

I tried to use the analog clock from Highcharts. This is not working at PHP on the Raspberry.

Does somebody knows a nice analog clock to present in PHP/ JS on a Rasberry?

Thanks in advance.
by Canedje
Tue May 05, 2015 4:09 pm
Forum: Python
Topic: compare times
Replies: 4
Views: 1063

Re: compare times

Can you give an example where the 5 minutes is not working? Your example code is an interval of 9 minutes. May be my fault. I think "total_seconds" is a method so would need to be terminated with "()" or you can just use "delta.seconds" EDIT: Ah - looks like you've found the issue already and it wa...
by Canedje
Tue May 05, 2015 3:22 pm
Forum: Python
Topic: compare times
Replies: 4
Views: 1063

Re: compare times

I think timedelta objects only store days, seconds and microseconds. So: from datetime import datetime s1 = '21:07' s2 = '21:16' delta = datetime.strptime(s2, '%H:%M') - datetime.strptime(s1, '%H:%M') if (delta.total_seconds > 300): print "> 5 minuten" Thanks for the swift answer. No error indeed. ...
by Canedje
Tue May 05, 2015 3:00 pm
Forum: Python
Topic: compare times
Replies: 4
Views: 1063

compare times

I like to compare to time strings to check if the time between is more then 5 minutes. I use the next code: from datetime import datetime s1 = '21:07' s2 = '21:16' delta = datetime.strptime(s2, '%H:%M') - datetime.strptime(s1, '%H:%M') if (delta.minutes > 5): print "> 5 minuten" but receive the next...
by Canedje
Wed Apr 29, 2015 7:41 pm
Forum: Nederlands
Topic: PHP code thermostaat
Replies: 9
Views: 1774

Re: PHP code thermostaat

Ondertussen ben ik aardig op dreef. Ik heb de UI grof voor elkaar. De huidige temperatuur en het setpoint wordt weergegeven. het setpoint wordt uit een weekschema gehaald welke is aan te passen. met een knop geef ik aan of de verwarming aan of uit is. Wat ik nu nog wil maken is een tijdelijke temper...

Go to advanced search