Bug plugin Ikea

Page : index.php?v=d&m=ikealight&p=ikealight#commandtab
Jeedom_version : 3.3.33
Uname : Linux jeedom 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux


Message :
I had to do the following changes to prevent the daemon from crashing few seconds after startup:
----------------------------
ikealightd/jeedom/jeedom.js:145
if(response && response.statusCode != 200){

ikealightd/jeedom/jeedom.js:153
if(response && response.statusCode != 200){
----------------------------

If response is undefined, an exception occured when you try to access to statusCode .

Hello,

I am not ok with that, I prefer « if(!response && response.statusCode != 200){ ». If send to Jeedom is not OK there is a big issue so deamon need to stop immediatly.

You’re right
The fix that has been pushed on the stable branch is working for me.

To make it work on my system, I had to add the following line though:
process.env[« NODE_TLS_REJECT_UNAUTHORIZED »] = 0;

I added it after importing the express/request lib, I configured jeedom to use TLS.
I have a custom made CA, but It’s not easy to add the root certificate in the trusted list, so … i disabled the CA check
I suppose this issue would happen with a self-sign certificate too