-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-red-node-serialport port selection node addition #1035
Conversation
@dceejay, |
Hi - finally had a chance to check this out... looks like a good idea - but... if we are going to do this then I think it should offer more control over the port. As we have another PR outstanding about stop start control and this would be an opportunity to do both in a not-intrusive manner. When you inject a blank message you only get the current port back - you don't get any of it settings etc - should it not return the complete config ? Also need some help docs for the info tab - iE copy the text from README to locales/en-US/25-serial.json If we add stop start then I think the name should also change to "serial control" - so it then also more closely matches the other serial node names. |
@dceejay, I modified according to your feedback and implemented the stop/start as well and it is now renamed to 'serial control'. |
Hmm - not sure I like a separate config property - I prefer the way you had that before.. just add the properties to the msg.payload level. |
I originally started with a very simple requirement of changing the serial port, and taking your stop/start feedback into the code(btw, I like your requirement), it is now more full blown feature, I guess. When adding the stop/start, I changed my view on the message from the configuration property to the command, because stop/start sounds like a command, so the initially thought property had to be a command, so it turned into the 'config' command. Though the stop and start command looked somewhat awkward with no values. But since it is suggested to see the message as the properties, it now looks to have the better shape and consistency. |
Learning a lot 😉 |
Hi, There are a few small changes I want to make but rather than keep hassling you I will merge this as-is and then tweak before releasing. (Mainly I think the property should be named 'enabled' rather than 'enable', and no need to expose binary and char yet... If there is user demand they can be added - but right now they just add clutter.) Thanks very much for your work on this |
@dceejay , |
Proposed changes
When the node-red starts, the flow(program) picks up the hard-coded serial ports and open them. But when a device re-connects after disconnecting for any reason, it may be possible the port number change, but the end user of the flow can't change the port unless he/she has the access to the node-red editor.
Recently I had to develop a feature on top of node-red-node-serialport that enables the end user of node-red to change the port number/name without the access to the node-red editor.
This PR adds the said functionality to the existing node-red-node-capability
********** This version: IMAP ONLY **********
Checklist
grunt
to verify the unit tests pass