Is it possible to get domoticz values other then via JSON URLs?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Timmiej93
Posts: 64
Joined: Saturday 26 December 2015 0:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Is it possible to get domoticz values other then via JSON URLs?

Post by Timmiej93 »

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?
User avatar
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?

Post by Egregius »

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
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?

Post by Timmiej93 »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest