Closed qabi closed 1 year ago
Thanks for your suggestions.
This is my first attempt to build a Node-RED node. Therefore, there might be some things to improve.
Previously, I tried to return an object but that didn't work for some reason, therefore I used the map. But I will have a look how to probably return a plain JavaScript object.
The other suggestions also sound useful. I will have a look for them to implement as well.
I would love to help, but unfortunately I have very little time available.
Regarding the payload type, I use literal object declaration:
msg.payload = {};
msg.payload.propertyName = propertyValyue;
The icon is set in the html file, along with color, category, etc. For example icon: "font-awesome/fa-bolt"
For the name I have a configuration input field with id = "node-input-name".
The name and or host name could be included in the result also:
msg.payload.name = config.name;
msg.payload.hostname = config.hostname;
I've implemented your suggestions and will release a new version soon.
I just released version 1.1.0 implementing your suggestions.
Amazing! I just love open source projects, like this, sometimes :)
A few suggestions from a new user: