Originally posted by ECS
View Post
Web API's like this JSON interface is meant for external triggered events to interact with homeseer. Consuming the list of references to obtain the reference id to make additional JSON requests should not cause performance issues.
Running getstatus&ref=all against my system from a second server within the same network retrieved 616 devices in 0.25 seconds and in reality only used 0.008 seconds of cpu time.
time curl -s 'http://homeseer.lras.net:82/JSON?request=getstatus&ref=all' > /dev/null
real 0m0.250s
user 0m0.008s
sys 0m0.000s
If you futher restrict the JSON query to either location1 or location2 information, then the response time is considerably less. The following resulted in 12 devices returned by restricting on the homeseer room name.
time curl -s 'http://homeseer.lras.net:82/JSON?request=getstatus&ref=all&location1=backup'
real 0m0.028s
user 0m0.004s
sys 0m0.000s
Personally and just my opinion, unless you expect a incredibly large amount updates from your "other applications", I would not worry about the intermediate program and just utilize JSON for multiple queries when your external applications have changes to send to homeseer.
Leave a comment: