Programie / node-red-aircon-rac-wf

Node-RED nodes for interacting with Mitsubishi Aircon RAC-WF WiFi modules
https://flows.nodered.org/node/@programie/node-red-aircon-rac-wf
MIT License
0 stars 0 forks source link

Suggestions #1

Closed qabi closed 1 year ago

qabi commented 1 year ago

A few suggestions from a new user:

Programie commented 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.

qabi commented 1 year ago

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;
Programie commented 1 year ago

I've implemented your suggestions and will release a new version soon.

Programie commented 1 year ago

I just released version 1.1.0 implementing your suggestions.

qabi commented 1 year ago

Amazing! I just love open source projects, like this, sometimes :)