Git Product home page Git Product logo

deconz-rest-doc's People

Contributors

chrishae avatar d0b3rm4n avatar deviantintegral avatar djoos avatar ebaauw avatar jcn avatar jkuchta avatar jogjayr avatar koomar avatar koriroys avatar lax avatar lorensr avatar lukasknuth avatar lzcabrera avatar manup avatar mimiix avatar mjpieters avatar pierredup avatar plusjade avatar pradeep1288 avatar ramonakira avatar sdball avatar segfaultax avatar sstarr avatar studiomohawk avatar swoopx avatar tommyblue avatar vattay avatar xtine avatar zehir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deconz-rest-doc's Issues

HSV to int mapping documentation

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.

Inactive Scheduler activates after reboot

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.

Wrong UTC time

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?

considering adding this example python code to the docs

  • 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())


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.