Thanks for your feedback. Your time interval is set well. I think that’s the reason that should be OK.
-
Fritzbox WLAN Script SomeOneAtHome
-
@Swen i dont think its a Intervall problem i have also used a long time a short Intervall but i checked thats make no matter because the fritzbox will not refreash the info that fast …so i changed it to a high Intervall.
But i only use the Script for one device, for my other devices i use the ping plugin…maybe it will be a problem with multiple devices.
-
It was definitly the packet drop which caused the problem. Fixed the connection and now it works.
-
Awesome. Thanks for your feedback.
-
Hello, i have a question.
I have copy the Script and it works fine. But how can i put it in Pimatic?
I would to check if my Android Handy is present and then turn on/off a device.Best Regards.
-
you can use here a shell presence sensor
{ "command": "/home/pi/someOneAtHome.php 192.168.178.20 1 0", "id": "test", "name": "WindowsPhone Fritzbox hack", "class": "ShellPresenceSensor", "interval": 150, "autoReset": false }
- in the command is the path to the script
- the rest self explanatory i think
-
Thank you very much. It works
-
Now i have a Problem. When i start the script i became the Message “Illegal instruction”.
From yesterday to today works fine. But since 1 hour i became the Error.
I have restart the FritzBox and the Raspberry on which PiMatic is installed.My Config:
{ "command": "/home/pi/Presence.php AC:37:43:A0:19:B9 1 0", "interval": 120000, "autoReset": false, "xPresentLabel": "Zuhause", "xAbsentLabel": "Nicht Zuhause", "id": "phil-handy", "name": "Philipp", "class": "ShellPresenceSensor" },
-
What does it mean if you write “i start the script”.
Are you starting the php script and get this error? Are you get this error with more information? Where are you get this error?
-
When i start the php Script i become this Output:
user@raspberry:~ $ php /home/pi/Presence.php AC:37:43:A0:19:B9
Illegal instructioni get this Error in Putty and in Pimatic.
-
This post is deleted!
-
#!/usr/bin/php did you have this on first line??? if yes then you don’t need php! you need only path to script and the script must be executable.
-
This post is deleted!
-
@philreis which version of php are you using? Older versions of PHP had an issue with the soap client extensions.
Both versions of the script work fine at my end with PHP 5.6.27-0+deb8u1"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
sudo php presence.php 64:BC:0C:42:91:79
PHP: syntax error, unexpected ‘=’ in /etc/php5/cli/conf.d/20-apcu.ini on line 8And again… If you are using my script its working like bash and you don’t need to start php parser before.
Don’t use php /home/pi/ don’t user php presence.php fi you have this: #!/usr/bin/php on first line it will be execute like a bash script and the parser will be request at start of this script.
-
@Swen said in Fritzbox WLAN Script SomeOneAtHome:
If you are using my script its working like bash and you don’t need to start php parser before.
Well, that right, but calling php should work the same. You can also call a shell script by invoking the sh or bash interpreter.
Another important point for executable scripts is to make sure the execute bit is set on the file. Different to what has been said earlier it should not be required to the world execute bit.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@Swen i use your Script. But i have the same Error when i start your script as bash.
@mwittig my php version is: PHP 5.6.30-0+deb8u1 -
@philreis said in Fritzbox WLAN Script SomeOneAtHome:
When i start the php Script i become this Output:
user@raspberry:~ $ php /home/pi/Presence.php AC:37:43:A0:19:B9
Illegal instructioni get this Error in Putty and in Pimatic.
Why is the User “user” and not “pi”? (“user@raspberry:~ $”) you try to run a script in a homedir from a other user… Linux is everytime hard to deal with permissions, maybe there is the Problem?
mabye check it as root, you can switch to root with “sudo su”.
I use the same script and it works fine by me! But i run it over the User “pi” and pimatic also uses the user “pi”.
-
I have change this to “user” before i post it.
I run the script with user pi too -
Ah okay… i google a little bit … but i only found this:
https://bugs.launchpad.net/raspbian/+bug/1598867
But this not really usefull