bpmurray / node-red-contrib-dht-sensor

Node-RED node to process DHT11/22 sensor data
Apache License 2.0
7 stars 8 forks source link

RFE - add sensor type to output #7

Closed juggledad closed 7 years ago

juggledad commented 7 years ago

I have a case where I use multiple dhtxx's and ds18b20's. I want to have one subflow to process the data that I get and store both location and the sensor type. Currently this node only passes back the sensor model or the node name. I'd like to see the name (as location), topic and sensor model.

RFE: pass the node name (as msg.location), the node topic (as msg.topic) and the sensor model (as msg.sensorid). This can be done by editing and changing line 86 from: msg.topic = node.topic || node.name; to: msg.location = node.name; msg.topic = node.topic; msg.sensorid = 'dht' + node.dht;

bpmurray commented 7 years ago

I'll keep the current msg.topic setting just in case anyone depends on it, but adding the others is fine.

juggledad commented 7 years ago

Awesome, thanks!

juggledad commented 7 years ago

You might want to update the readme with the new information

bpmurray commented 7 years ago

All updated now.