Giter VIP home page Giter VIP logo

smart-bus's People

Contributors

alydersen avatar caligo-mentis avatar dependabot[bot] avatar markbegma 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smart-bus's Issues

Node-red compatibility

Hello.
Is it possible to change "status" in commands.js to "state" (as example), becouse "status" is a function in node-red?

Typo in commands.js

Hi!

Thank you for all you efforts on this!

I found a typo in commands.js that I believe is preventing getting the status of a channel. I forked and created a pull request - would be good if you could look it over and consider approving it.

#8

BR,
Andreas

DLP Floor Heating crash

Hi!

I'm getting the following error in one of the users site for the Homey App using your library:

buffer.js:977
    throw new RangeError('Index out of range');
    ^

RangeError: Index out of range
    at checkOffset (buffer.js:977:11)
    at Buffer.readUInt8 (buffer.js:1015:5)
    at Command.parse (/node_modules/smart-bus/lib/commands.js:992:23)
    at Command.set (/node_modules/smart-bus/lib/command.js:26:31)
    at new Command (/node_modules/smart-bus/lib/command.js:31:13)
    at Bus.parse (/node_modules/smart-bus/lib/bus.js:116:10)
    at Bus.handler (/node_modules/smart-bus/lib/bus.js:132:22)

I've created a pull request that will take the missing buffer part into account (#13)

Sending out broadcast messages

Hi @caligo-mentis!

I'm trying to figure out with the new version how to send out broadcast messages. There is info in the docs on how to receive them, but as far as I can see nothing on sending them. I've tried to set the target to '255.255', but is doesn't seem to function.

Thanks and take care (in these corona-times)

Andreas

More op codes

Hi,

I've forked this and added a couple more op codes to commands.js which I've found through sniffing traffic to dynamically update the colour of the new colour LED capacitive touch buttons, and also to change the brightness (eg a dusk task to dim all the panels and dawn to wake them up). There's a small gotcha in that for some odd reason the requests for these two op codes need to come from 253.254 regardless of the target subnet/device id.

Would you be interested in integrating this into your package, or should I stick to my fork?

Thanks,
Ben.

RangeError('Index out of range') on temperature

Hi!

Thanks again for creating this library!

I've included it in an app that connects HDL and Homey, but some users are getting the following error:

buffer.js:977
    throw new RangeError('Index out of range');
    ^

RangeError: Index out of range
    at checkOffset (buffer.js:977:11)
    at Buffer.readFloatLE (buffer.js:1154:5)
    at Command.parse (/node_modules/smart-bus/lib/commands.js:1561:29)
    at Command.set (/node_modules/smart-bus/lib/command.js:26:31)
    at new Command (/node_modules/smart-bus/lib/command.js:31:13)
    at Bus.parse (/node_modules/smart-bus/lib/bus.js:116:10)
    at Bus.handler (/node_modules/smart-bus/lib/bus.js:132:22)
    at emitTwo (events.js:126:13)
    at Socket.emit (events.js:214:7)
    at UDP.onMessage [as onmessage] (dgram.js:659:8)

It seems like the

temperature: buffer.readFloatLE(buffer.length - 4)
makes an assumption on the length of the buffer that isn't met. Could we instead do what you do in line
0xE3E8: {
?

Or, we could catch the errors when parsing fails.

Any preferences? As this is not happening on my system, I can not debug it properly.

Thanks,
Andreas

Broadcast Time

Hello!
Please add the command for Broadcast Time

var buffer = new Buffer([
    18, // 2 digits from year (2018)
    01, // month,
    21, // date,
    17, // hours,
    32, // minutes,
    58 // seconds
    ]);
target = '255.255';
code = 55876;

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.