Search found 2114 matches

by Egregius
Friday 22 June 2018 17:48
Forum: PHP and all others
Topic: Pass2PHP
Replies: 632
Views: 52611

Re: Pass2PHP

I think I would do something like this: <?php if($status=='On'){ $pushbutton=apcu_fetch('pushbutton'); if($pushbutton=='on'){ //do stop action apcu_store('pushbutton','onstop'); }elseif($pushbutton=='onstop'){ //do off action apcu_store('pushbutton','off'); }elseif($pushbutton=='off'){ //do stop act...
by Egregius
Friday 22 June 2018 15:51
Forum: PHP and all others
Topic: Pass2PHP
Replies: 632
Views: 52611

Re: Pass2PHP

You want ON - STOP - OFF - STOP - ON - STOP - OFF - ...?
No matter what the current status of the blinds is?
And it's a button that acts independently from the blinds? I mean, without script the blinds don't respond to the button?
by Egregius
Wednesday 20 June 2018 22:58
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

I think you need to learn how the code works and debug it yourself. With just a screen shot and no code it hard to find out the issue.
by Egregius
Wednesday 20 June 2018 20:20
Forum: PHP and all others
Topic: Pass2PHP
Replies: 632
Views: 52611

Re: Pass2PHP

Great!
Enjoy pass2php ;)
by Egregius
Wednesday 20 June 2018 14:56
Forum: PHP and all others
Topic: Pass2PHP
Replies: 632
Views: 52611

Re: Pass2PHP

That's the one ;) https://github.com/Egregius/LUA-Pass2PHP-for-Domoticz/blob/master/secure/cron.sh You can adjust the sleeps in it and remove lines as needed. Add it to cron with sudo crontab -e * * * * * /path/to/script/cron.sh The script will also check if domoticz is still online and reboot if ne...
by Egregius
Tuesday 19 June 2018 23:36
Forum: PHP and all others
Topic: Pass2PHP
Replies: 632
Views: 52611

Re: Pass2PHP

If you don't trigger the script by cron yes. If you have lot's of devices it gets triggered automatically.
I shall post my cron script tomorrow, or it could be on github.
by Egregius
Monday 18 June 2018 23:38
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

Qdd a echo $data; line to see what's in there.
Or better, add such line after each data= line
by Egregius
Monday 18 June 2018 9:42
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

But you didn't do anything since my last post? You didn't try stuff? <?php $data=file_get_contents('http://192.168.0.12/tanklevl1'); $data=strafter($data,'</span><br>'); $data=strbefore($data,'%'); $idx=33; $nvalue=0; $svalue=$data; $url='http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx...
by Egregius
Sunday 17 June 2018 22:34
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Webserver
Replies: 4
Views: 201

Re: Webserver

What's the problem of running 2 servers?
What you also could consider : run domoticz only in home network and use your web server to host a self created interface for it. That way you only need to expose 1 server externally.
by Egregius
Sunday 17 June 2018 15:31
Forum: Installation, Compiling, Permissions, Security and Starting
Topic: Webserver
Replies: 4
Views: 201

Re: Webserver

Why would you want that?
by Egregius
Sunday 17 June 2018 7:27
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

Did you manage to get this working yet?
What did you do in the mean time?
by Egregius
Wednesday 13 June 2018 18:09
Forum: Suggestions
Topic: Remotec ZRC-90 Scene Master
Replies: 46
Views: 9566

Re: Remotec ZRC-90 Scene Master

No, not noticed yet. Both remotes work as expected here.
by Egregius
Monday 11 June 2018 22:49
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

Then it should also work from php.
by Egregius
Monday 11 June 2018 22:48
Forum: General Discussion
Topic: Longer log
Replies: 8
Views: 290

Re: Longer log

It's open source, you can contribute.
Personally I don't see a point for that. If you want to see the full history of the log you can easily open it in a text editor.
Or use a php script like I do :P
by Egregius
Monday 11 June 2018 17:39
Forum: LUA
Topic: Script for faster, more efficient bulk control of devices (eg everything off)
Replies: 9
Views: 737

Re: Script for faster, more efficient bulk control of devices (eg everything off)

Damn, I always like how much code is needed in lua to achieve such simple things :lol:
In pass2php that would just be:

Code: Select all

sw(array('Main Bedroom','Main Bedroom Hallway','Main Bathroom','Main Entrance Hallway','Second Bathroom'),'Off',true);
by Egregius
Monday 11 June 2018 17:35
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

You need to place the url between quotes...
Also, please try google... He knows a lot ;)
by Egregius
Monday 11 June 2018 17:34
Forum: General Discussion
Topic: Longer log
Replies: 8
Views: 290

Re: Longer log

Probably yes, but then you need to dig into the Domoticz code.
After that make the change after each update or place a pull request at github.
by Egregius
Monday 11 June 2018 7:41
Forum: General Discussion
Topic: Longer log
Replies: 8
Views: 290

Re: Longer log

use tail -f in a shell and you'll see all the lines.
Or open the logfile in a text editor.
by Egregius
Sunday 10 June 2018 22:42
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

No. This command:
curl -s "url..."
by Egregius
Sunday 10 June 2018 20:16
Forum: Utility
Topic: Water tank level (from other webserver)
Replies: 44
Views: 2662

Re: Water tank level (from other webserver)

You can't use 127.0.0.1 on your computer of course.
Do you have authentication enabled?
What is you curl the url in a shell?