This is the nodejs code:
Here is some relevant troubleshooting I've done:
If I reload the app in HE, I can get it to go past the section of the nodejs code listed in the above thread, but then it stops at the section listed below:
node.request.put({
url: 'http://' + config.server.ip + ':' + config.server.port + '/event',
headers: {
'Content-Type': 'application/json'
},
json: true,
body: {
event: 'event',
data: data
}
},
function (err, response, body) {
if (err) {
log({
error: 'Failed sending event: ' + err
});
}
});
} catch (e) {
log({
error: 'Error parsing event data: ' + e
});
}
}
}
}
} catch (e) {
error('Failed to send event to SmartThings: ' + e);
}
},
This is the repo to the HE app: