bbrookfield / alexa-radiothermostat

8 stars 6 forks source link

Where do I put my Thermostat URL? #2

Open kevinsickles opened 8 years ago

kevinsickles commented 8 years ago

a NOOB, when I replace the THERMOSTAT_URL with my thermostat ip address I get

/home/pi/node-alexa-server/app_modules/alexa-radiothermostat/index.js:8 request.post(process.env.192.168.15.75 + '/tstat', {json: {t_cool: parseFloa ^^^^ SyntaxError: Unexpected number

bbrookfield commented 8 years ago

Remove the process.env. before your IP Address. The process.env was to get the ip address from a private var on heroku, you do not need it. replace with http://192.168.15.75

bbrookfield commented 8 years ago

change the line from request.post(process.env.192.168.15.75 + '/tstat', {json: {t_cool: parseFloa to request.post('http://192.168.15.75/tstat', {json: {t_cool: parseFloa

kevinsickles commented 8 years ago

Thank you! Next problem is the endpoint is not responding. I assume I have to set up SSL on the node.js express server?

bbrookfield commented 8 years ago

Yes, Amazon requires ssl (HTTPS) for any skill endpoint. I believe you also cannot use a self signing certificate. This is why I suggest using Heroku cloud service.