Giter Club home page Giter Club logo

node-tradfri's Introduction

Hi there ๐Ÿ‘‹

I'm a Full-Stack Developer working in Hungary at SAP.

โšก Talk to me about

  • Front-end development using Vue.JS, ReactJS
  • Back-end development using NodeJS, Electron, TypeScript
  • Asynchronous messaging services like RabbitMq, Google PubSub
  • Architectural design for PostgreSQL, MongoDb
  • Creating scalable cloud architecture using Kubernetes, Heroku

node-tradfri's People

Contributors

iamralpht avatar morzzz007 avatar nidayand avatar thorinair avatar tomgidden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-tradfri's Issues

Light Status - Disconnected

Hello
Is it possible to know when light are disconnected ? ( no power )

it can be very usefull ...

Yeelight for exemple can say Status and Online

Add license

Love this library! Thanks for all the effort. Under which license are you making this available?

Adding group

Hi, the group feature is great. But it don't get how exactly to group the bulbs in one group. Is there a "addDeviceToGroup(deviceId, groupId)" method? Thanks for the great library.

Setting light colour with {color: 'ffffff'} sets light to an orange.

Hey!

Whenever I set my light's colour through:

await tradfri.setDeviceState(65541, { color: 'ffffff' });

It sets the colour instead to an orange, '#efd275', specifically.

I can change states through setDeviceState, but not brightness, and using colorX and colorY worked.

I had a weird issue before, where after adjusting the brightness on the dimmer steering device, it sort of glitched in and out of the colour I set, and the orange-y one it seems to love so very much.

Set state on group

Ok, not really an issue but an enhancement request. It would be great if another method is added to set state (and possibly brightness) on groups as well. As it was missing I assumed that the same setDevice statement can be used for group ids but it doesn't work.

Love the pkg though!

Misspelling of lodash/isUndefined

Hi!

Had to change the ...
const isUndefined = require('lodash/isundefined');
... lines to "lodash/isUndefined" to make this work for me.

Also the coap client can be downloaded from https://libcoap.net/files/ if you don't want to build them yourself.

Anyway, great work! Thank you! :)

command response parsing error

On my machine, when executing any command, I get the following error:

Invalid response: SyntaxError: Unexpected token u in JSON at position 0

The soap-client used from upstream seems to be working, for example, executing tradfri.getDevices in the background runs /usr/bin/coap-client -m get -u "xxx" -k "yyy" "coaps://some-ip:5684/15001"
and returns

stdOut: '[65536,65537,...]\n'

The line producing the error is in CoapClient.makeRequest(): resolve(JSON.parse(stdOut.split('\n')[3]));
When I change this to

let split = stdOut.split('\n');
resolve(JSON.parse(split[3] || split[0]));

Everything works again.

My main question is where this magic number 3 comes from. Is this a misconfigured libcoap on my end? Or is the 3 variable across environments (and would warrant a PR)?

My system:

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.