caligo-mentis / smart-bus Goto Github PK
View Code? Open in Web Editor NEWNode.js implementation of HDL SmartBus protocol
License: MIT License
Node.js implementation of HDL SmartBus protocol
License: MIT License
Hello.
Is it possible to change "status" in commands.js to "state" (as example), becouse "status" is a function in node-red?
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.
BR,
Andreas
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)
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
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.
Can I send a command from another device ID (subnet.id)?
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
Line 1561 in 338e8ae
Line 1534 in 338e8ae
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
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;
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.