Search found 1842 matches

by Egregius
Friday 28 April 2017 7:04
Forum: Other questions and discussions
Topic: Summing several counters
Replies: 16
Views: 211

Re: Summing several counters

lg is a function of pass2php to log a message in the Domoticz log: function lg($msg){file_get_contents('http://192.168.2.2:8080/json.htm?type=command&param=addlogmessage&message='.urlencode('=> '.$msg));} The 3 at the end is a parameter of the number_format function defining the number of de...
by Egregius
Thursday 27 April 2017 14:23
Forum: General Discussion
Topic: Domoticz and Scripting
Replies: 2
Views: 84

Re: Domoticz and Scripting

I don't have that problem with pass2php :P
All scripts are aware of each other so they don't interfere.
I must add to that that it costs quite some time to have everything setup that way.
by Egregius
Thursday 27 April 2017 6:16
Forum: Other questions and discussions
Topic: Summing several counters
Replies: 16
Views: 211

Re: Summing several counters

This should work: <?php$sumusage=0;$sumtoday=0;$domoticz=json_decode(file_get_contents('http://127.0.0.1:8080/json.htm?type=devices&plan=3'),true);if($domoticz){    foreach($domoticz['result'] as $dom){        $usage=number_format(str_replace(' Watt','',$dom['Usage']),0);        $sumusage=$sumus...
by Egregius
Tuesday 25 April 2017 12:22
Forum: Other questions and discussions
Topic: Summing several counters
Replies: 16
Views: 211

Re: Summing several counters

Create a time script where you update a virtual device with the sum of the others.
Code could be lua, php, bash, whatever you like.
If you like to go with PHP I can help you or even provide a example.
by Egregius
Saturday 22 April 2017 8:26
Forum: LUA
Topic: Motion and light timer
Replies: 5
Views: 206

Re: Motion and light timer

mrf68 wrote:You can bypass that problem by adding to the statement "more than 5 minutes" : "but no more than 6 minutes".

Why not just check the state of the light at that moment?
If pir = off and lasttime > 300 and light = on do switch light off.
by Egregius
Friday 21 April 2017 17:05
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

I don't see MySQL in your list.
Start with removing that one. Could already be the solution.
by Egregius
Friday 21 April 2017 16:36
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

If you have a good backup you could consider reinstalling a new SD card and start over.
Then, only install what you really need. You'll see that it'll be lots faster and stable.
by Egregius
Friday 21 April 2017 16:25
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

There you see the most memory hungry threads.
Do you need them all? Are you sure you want to run MySQL on a Pi?
And what do you do with Python? Seems that Python took already lots of cpu time.
by Egregius
Friday 21 April 2017 16:19
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

try "top -o %MEM" to have top sorted by memory.
You have lots of memory in use, even part of your swap is in use. I never have that on any of my Pies.

If you add "Motherboard sensors" to the Domoticz hardware you'll get graphs of cpu and memory usage.
by Egregius
Friday 21 April 2017 10:56
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

Do you have internal sensors activated? What does the memory and cpu usage say?
by Egregius
Thursday 20 April 2017 22:37
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

Why do you need temps every sec? :?
by Egregius
Tuesday 18 April 2017 8:10
Forum: Blocky
Topic: No motion for 30 minutes
Replies: 3
Views: 186

Re: No motion for 30 minutes

In pass2php that would be like this: <?phpif($status=='Open'){    if(apcu_fetch('spir')=='Off' && apcu_fetch('tpir')<time-1800)sw('light','On');}  Only when the door opens ($status) and the status of pir is off and the last updatetime of the pir is more tha...
by Egregius
Sunday 16 April 2017 20:01
Forum: PHP and all others
Topic: Pass2PHP
Replies: 398
Views: 18228

Re: Pass2PHP

Start with one pir, feel the difference and then add the rest one by one.
If you don't want to spent some time in then don't bother starting with this.
by Egregius
Sunday 16 April 2017 19:04
Forum: PHP and all others
Topic: Pass2PHP
Replies: 398
Views: 18228

Re: Pass2PHP

You don't need to change your devices, only the script.
by Egregius
Sunday 16 April 2017 16:46
Forum: Other questions and discussions
Topic: Domoticz.., iam done with you!
Replies: 31
Views: 1619

Re: Domoticz.., iam done with you!

What is theee to say?
I am very very happy with Domoticz as backend. Runs fast and stable.
I control it completely from php and it does everything I want.
by Egregius
Wednesday 05 April 2017 8:22
Forum: Scripts [cleaning in progress]
Topic: Scripts doesn't work in domoticz
Replies: 13
Views: 460

Re: Scripts doesn't work in domoticz

Use the absolute path to executables.
Make sure the users that run's Domoticz has rights to the scripts and executables.
Add a echo 'script executed' > /temp/test.log to see of the script is called from domoticz
...
by Egregius
Monday 03 April 2017 17:33
Forum: Suggestions
Topic: Burn rate of energy
Replies: 3
Views: 169

Re: Burn rate of energy

Why not just use the text device for it? Update it with a script and you're ready.
by Egregius
Sunday 02 April 2017 6:14
Forum: Blocky
Topic: Newbie needs help with SMS notifications
Replies: 3
Views: 195

Re: Newbie needs help with SMS notifications

Why use blockly if you know how to write python?
Use a real time based script in Python, Lua, php and you'll have lot's more possibilities.
by Egregius
Saturday 01 April 2017 4:55
Forum: General Discussion
Topic: Unused z-wave devices, would it be safe to delete them?
Replies: 7
Views: 362

Re: Unused z-wave devices, would it be safe to delete them?

You can add the info again to the XML by using the 'Refresh Node Information' command in OZWCP.
by Egregius
Friday 31 March 2017 23:14
Forum: General Discussion
Topic: Unused z-wave devices, would it be safe to delete them?
Replies: 7
Views: 362

Re: Unused z-wave devices, would it be safe to delete them?

As they aren't used it shouldn't make a big difference. But, for example: unused power meters do store their data in database, so extra writes are done It's safe to delete them, after all you don't use them. Keep in mind that you should edit the zwave xml file. Otherwise upon next restart all device...

Go to advanced search