Search found 2039 matches

by Egregius
Saturday 20 January 2018 9:04
Forum: Raspberry Pi GPIO ( WiringPi )
Topic: Monitor Belgian watermeter and gasmeter with Pi GPIO
Replies: 16
Views: 931

Re: Monitor Belgian watermeter and gasmeter with Pi GPIO

Guess I ordered the wrong sensors, they're always on :?
Image

Now ordered these:
Image
by Egregius
Thursday 18 January 2018 21:07
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

I think the Telegram changes are on github
by Egregius
Thursday 18 January 2018 20:42
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

I would exclusively put the kodi notification function in the separate php file and not in functions anymore.
I already did that for my telegram notifications. No more delay on sending telegram :)
by Egregius
Thursday 18 January 2018 10:43
Forum: PHP and all others
Topic: Issues with long PHP script
Replies: 1
Views: 306

Re: Issues with long PHP script

You should post your code...
And fork the script in the background so it doesn't block the Domoticz event system.
by Egregius
Thursday 18 January 2018 10:22
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Maybe I'll update Git later. I do that manually, don't use the Git program.
Happend before that I published before removing personal data so don't want that again...
by Egregius
Thursday 18 January 2018 10:18
Forum: Bugs and Problems
Topic: Battery status (%) from ZWave devices
Replies: 17
Views: 1089

Re: Battery status (%) from ZWave devices

Maybe you can do something with PHP like I do, runs totally separate from Domoticz. <?php $db=new mysqli('127.0.0.1','domotica','domotica','domotica'); if($db->connect_errno>0)die('Unable to connect to database ['.$db->connect_error.']'); $sql="SELECT id,date,value FROM battery t1 WHERE t1.date = (S...
by Egregius
Thursday 18 January 2018 9:47
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

No problem ;) Time difference between telegram directly and thru shell is huge: $start=microtime(true); for($x=1;$x<=10;$x++){ $msg='Shell '.$x; shell_exec('/var/www/html/secure/telegram.sh "'.$msg.'" > /dev/null 2>/dev/null &'); } $total=microtime(true)-$start; echo '<hr>Shell Time:'.number_format(...
by Egregius
Thursday 18 January 2018 8:40
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

This should get you in the good direction: Make a file kodinotification.php: <?PHP if(isset($_REQUEST['text'])){ notify_kodi($_REQUEST['text']); } function notify_kodi($destination,$port,$subject,$msg) { .... } ?> Make a bash script that call's the php script kodinotification.sh: #!/bin/bash MSG="$1...
by Egregius
Wednesday 17 January 2018 23:45
Forum: Bugs and Problems
Topic: Battery status (%) from ZWave devices
Replies: 17
Views: 1089

Re: Battery status (%) from ZWave devices

Even the zwcfg xml isn't a reliable source for battery levels.
I check the xml every 4 hours. Some fibaro smoke sensors report 100% while they reported 0% yesterday.
Remind me to post some details tomorrow ;)
by Egregius
Wednesday 17 January 2018 23:34
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Could it be that it only happens when your kodi is offline? In my pass2php the cache status of the device is updated after the device script is executed. Maybe it does strange things because of a timeout in the kodi function. A workaround could be to create a separate script for the kodi notificatio...
by Egregius
Wednesday 17 January 2018 22:40
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Yes, if you post the code...
by Egregius
Wednesday 17 January 2018 21:50
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

I really don't know what to say here. Something must be calling the pass2php script.
by Egregius
Tuesday 16 January 2018 23:09
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Why is the second print not printed?
Can you combine them in one?
by Egregius
Tuesday 16 January 2018 21:30
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Put some prints in the lua script and you'll see that it's domoticz
by Egregius
Monday 15 January 2018 9:56
Forum: Suggestions
Topic: Add dynamic parameters to notifications
Replies: 9
Views: 674

Re: Add dynamic parameters to notifications

All of this can easily be done when you start scripting.
I have different notification settings while I'm at home, or a sleep, or away. Different notification intervals for different scenario's.
If you start scripting only your imagination is your limit.
by Egregius
Saturday 13 January 2018 15:33
Forum: Bash / PowerShell / Batch etc.
Topic: Run script with systemd before restart or shutdown
Replies: 0
Views: 73

Run script with systemd before restart or shutdown

Hi Folks, I'd like to execute a bash script before my system is rebooted or does a shutdown. I would need it on several systems: a) On Domoticz running in Debian to store PHP APCu variables to disk so they can be recovered after boot. b) To transfer camera records of pikrellcam from raspberry to nas...
by Egregius
Saturday 13 January 2018 0:26
Forum: PHP and all others
Topic: Pass2PHP
Replies: 559
Views: 38963

Re: Pass2PHP

Must be that domoticz is sending those values, no?
I've never seen that on any of my 7 door sensors.
by Egregius
Thursday 11 January 2018 17:11
Forum: Compatibility
Topic: How to start a *.sh file at bootup?
Replies: 12
Views: 220

Re: How to start a *.sh file at bootup?

the script is executable? Also for the root user?
Did you try with chmod 755?
by Egregius
Thursday 11 January 2018 16:45
Forum: Compatibility
Topic: How to start a *.sh file at bootup?
Replies: 12
Views: 220

Re: How to start a *.sh file at bootup?

Continuing on this init.d script:
Do you know how to run a script at shutdown and reboot?
I need to run a script before domoticz and apache are stopped. Already tried with a init.d script but no luck so far.
by Egregius
Thursday 11 January 2018 7:19
Forum: Compatibility
Topic: How to start a *.sh file at bootup?
Replies: 12
Views: 220

Re: How to start a *.sh file at bootup?

Add it to cron.
sudo crontab -e
@reboot /path/to/script.sh