diff --git a/98-ds18b20.html b/98-ds18b20.html
index 34d437e..0b4099c 100644
--- a/98-ds18b20.html
+++ b/98-ds18b20.html
@@ -18,7 +18,7 @@
},
oneditprepare: function() {
var configuredSensorId = this.sensorid;
- $.getJSON('/sensors/1wire/',function(data) {
+ $.getJSON('sensors/1wire/',function(data) {
$.each(data, function( index, value ) {
var isSelected = configuredSensorId === value;
$("#node-input-sensorid").append(
diff --git a/98-ds18b20.js b/98-ds18b20.js
index 2b634b4..db6d46c 100644
--- a/98-ds18b20.js
+++ b/98-ds18b20.js
@@ -14,6 +14,8 @@ module.exports = function(RED) {
// TODO error handling
sense.temperature(node.sensorid, function(err, value) {
var msg = { payload: value };
+ msg.sensorid = node.sensorid;
+ msg.topic = node.name;
node.send(msg);
});
}