From 3c7d87a724e4c1c35a101a7f40f0a9d3a0ea587f Mon Sep 17 00:00:00 2001 From: "shgood.jun" Date: Mon, 12 Jul 2021 15:32:57 +0900 Subject: [PATCH] fix : smartthings mydevice api call, node-red http-node-root --- 101-SmartThings.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/101-SmartThings.html b/101-SmartThings.html index 19fa5ed0..3b2bd875 100644 --- a/101-SmartThings.html +++ b/101-SmartThings.html @@ -762,12 +762,14 @@

Properties

this.loadRuntimeCapabilities= function(){ return new Promise((resolve,reject)=>{ - $.getJSON('_smartthings/capabilities').then(resolve,reject); + const root = RED.settings.httpNodeRoot||'/'; + $.getJSON(root+'_smartthings/capabilities').then(resolve,reject); }) } this.loadMydeviceInfo=()=>{ return new Promise((resolve,reject)=>{ - $.getJSON('_smartthings/mydevices').then(resolve,reject); + const root = RED.settings.httpNodeRoot||'/'; + $.getJSON(root+'_smartthings/mydevices').then(resolve,reject); }) }