So I had written some scripts for my RPi, which basically do this:
- Get current dimmer value for all lights (via JSON URL)
- Turn lights x, y, & z off (if on)
- If light a's dimmer level is <5%, set to 5, if <10%, set to 10, etc.
This all works fine, but does take quite some time. I'm guessing/hoping that this can be sped up by getting the values directly from the device itself, instead of going through the interwebs (script runs on the same device as domoticz, RPi with Raspbian).
So, is it possible to get the values in Domoticz from the device itself, or is getting them via the JSON URL's the only way?
Is it possible to get domoticz values other then via JSON URLs?
Moderators: leecollings, remb0
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Is it possible to get domoticz values other then via JSON URLs?
Getting all values using JSON shouldn't take longer than hundred milliseconds.
Something I do to speed it up (for my own custom web interface) is using roomplans so I only get the devices I need in that script.
My main script is recently changed. For that I sent all device statusses to a PHP script. In my case there's only 8 milliseconds between signal of a pir and switching the switch. You don't even notice that.
The code of that can be found at http://www.domoticz.com/forum/viewtopic ... 23&t=12343
Something I do to speed it up (for my own custom web interface) is using roomplans so I only get the devices I need in that script.
My main script is recently changed. For that I sent all device statusses to a PHP script. In my case there's only 8 milliseconds between signal of a pir and switching the switch. You don't even notice that.
The code of that can be found at http://www.domoticz.com/forum/viewtopic ... 23&t=12343
-
Timmiej93
- Posts: 64
- Joined: Saturday 26 December 2015 0:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Is it possible to get domoticz values other then via JSON URLs?
I just did a test, and all the latency is indeed coming from the NodOn switch. Too bad, nothing I can do about that. Thanks anyway.
Who is online
Users browsing this forum: No registered users and 1 guest