Closed nabbl closed 7 years ago
Different Buttons to send from need to be implemented (maybe generating nodes on the fly?)
i do have a somewhat rough generic telegram encoder/decoder script i'm currently working on that could be of help here...
maybe it's best to only have a simple button, and to put more complex nodes in seperate repositories...
Allow multiples of the same Listener Node and reuse connection
shouldn't this be automatic when using config nodes?
This encoder/decoder script sounds great! I had a look at your button implementation and this should work for at least a simple example. But something more dynamic would be nice to have.
Yes we should seperate more complex stuff maybe. It would be great to have a normal Rocker-Switch as Standard and if you want a Dimmer or whatever you can get additional nodes from NPM.
i would suggest the following changes:
don't pollute the global scope. move the enocean declaration into the config node.
function EnOceanConfig(n) {
RED.nodes.createNode(this, n);
this.config = n;
var enocean = require("node-enocean")({
sensorFilePath:"/knownSensors.json",
configFilePath:"/config.json",
timeout:30 //make this a config, too?
});
try {
this.enocean.listen(this.config.serialport);
...
would certainly make sense.
Made some changes. There is a button to send telegrams to actuators now. I can't send and then receive the same telegram though. Makes me wonder if the telegram is actually sent.
need to check when I am at home...
i would really like to merge so i can play around with this myself ;-)
I am going to make some last commits and then it is ready to go :)
Please don't merge yet. Several things left to do. Using the PR to keep track of ToDo: