dresden-elektronik / deconz-rest-doc Goto Github PK
View Code? Open in Web Editor NEWdeCONZ REST-API Documentation
deCONZ REST-API Documentation
The documentation is incorrect here :
deconz-rest-doc/docs/endpoints/lights/index.md
Lines 222 to 226 in 31e0a3c
The value of state.effect
is not a number
As the title says: the API documentation doesn't mention resourcelinks
.
To set the color of a light, the documentation currently states:
Set the color hue of the light. The hue parameter in the HSV color model is between 0°–360° and is mapped to 0–65535 to get 16-bit resolution.
However, it's completely unclear to me, how to come from the three values h, s and v to this integer value. I tried to calculate it like this: round(h * 65535 / 360)
however this only produces white light. I guess I need to combine the three values together and somehow map it into the 0–65535 range.
Maybe an example in the documentation how to come from H, S and V to this integer value would help to understand it better.
https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/configuration/#get-configuration
The description of the swupdate
/ softwareupdate
object's fields is missing.
Hello,
after rebooting a Pi3b with Image "Phoscon_Gateway_Headless_2020-06-19.xz" where a deactivated schedule exist, the schedule is activated again. I think that this isn't desired.
As it seems endpoint rules
field action.method
can have value of BIND as well. I have not tested or used this feature; I just noticed the apparent discrepancy in the docs.
Just as seen in the example right below the table.
It seems the rest api documentation is missing information for schedules with a random time pattern.
Original issue/commit where random time was added:
dresden-elektronik/deconz-rest-plugin#3062
dresden-elektronik/deconz-rest-plugin@8009689
Documentation and code need to be updated to say "Zigbee" instead of "ZigBee" as the official Zigbee Alliance changed the Zigbee name stylization from “ZigBee” to “Zigbee”, as in they are no longer writing Zigbee with a capital “B” in the middle of the name.
Where: https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/configuration/#get-configuration
What: In the example response the field is called swupdate
while in the table it is called softwareupdate
.
When i do a GET request i always got the wrong UTC time:
UTC | "2021-11-19T11:45:03"
UTC must be +1 so 12:45:03.
What i'm doing wrong?
Needs to be updated to reflect the current API.
Where: https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/configuration/#get-full-state
What: The fields config
, groups
, lights
, schedules
, sensors
, rules
lack a description of their fields.
Where: https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/rules/#create-rule
What: Mismatch of the value of action.method
in the parameters table and the example request data. "BIND" is not in the table.
The documentation under https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/lights/ states that the response contains state.effect twice (as a number 0 - 7 or as a string). This looks like an error to me.
I tried to figure out which is right and it seems only the string variant is sent in the current API version.
i wrote this script while trying out the conbee II
i think it would great to have some python example code in the docs
if you think it is a good ideal feel free to use the code sample below
i think the conbee II, deconz app, phoscon app are great...i am very happy...thank you.
import requests, pprint
# ***** use must have the deconz app or service running for this to work ******
# this was test using a ConBee II on windows and raspberry pi
# - to install the deconz app follow these instructions: https://phoscon.de/en/conbee2/install
# - on windows: from start menu run the 'deCONZ app' - it defaults to port 80
# - on pi from app on cmd line w/ ui: > /usr/bin/deCONZ --http-port=8080
runThisApi = 0
port = '80'
ipAddr = 'http://192.168.2.103:' + port
key = '57XXXXXX74' # put your key here after running runThisApi = 0
outlet1 = '1'
# ---------------- get api key
# do this first
# 1) start the 'phoscon app' from the 'deconz app' ui
# 2) enable 'authenticate app' in 'phoscon app'-gateway-advanced then run this cmd
# 3) set runThisApi = 0 and run the code and you will receive an api key
if (runThisApi == 0):
payload = {"devicetype": "my application"}
r = requests.post(ipAddr+'/api/', json=payload)
# [{'success': {'username': '4EXXXXXXB6'}}]
# ---------------- turn light or socket on
if (runThisApi == 1):
payload = {"on": True}
r = requests.put(ipAddr+'/api/'+key+'/lights/'+outlet1+'/state', json=payload)
# ---------------- turn light or socket off
if (runThisApi == 2):
payload = {"on": False}
r = requests.put(ipAddr+'/api/'+key+'/lights/'+outlet1+'/state', json=payload)
# ---------------- get light or socket state
if (runThisApi == 3):
r = requests.get(ipAddr+'/api/'+key+'/lights')
pprint.pprint(r)
pprint.pprint(r.json())
The PR brings a lot of new features and extents what is available in the REST-API.
Description can be found in the PR and needs to be included in the documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.