methode = 'PUT'
Posted: Sunday 29 March 2020 19:40
Hello,
I noticed that since about a month the openURL also should support the PUT method. Also according the wiki.
My hue bulbs are controlled by os.execute,curl (long story
)
Today I tried to rewrite to openURL using the PUT method but sofar unsuccesfull.
This is the test script:
In the log:
postData returns nil and no response, am I missing something?
I noticed that since about a month the openURL also should support the PUT method. Also according the wiki.
My hue bulbs are controlled by os.execute,curl (long story

Today I tried to rewrite to openURL using the PUT method but sofar unsuccesfull.
This is the test script:
Code: Select all
return {
on = {
timer = {'every minute'},
},
logging = { level = domoticz.LOG_DEBUG,
marker = "put" },
execute = function(domoticz, triggeredItem)
local device = 29
local bridge = '192.xxx.x.xxx'
local tempUrl = 'http://'..bridge..'/api/xigTvboK2LNKIXpUViF/'.. device .. '/state'
domoticz.openURL({
url = tempUrl,
method = 'PUT',
postData = {on = false}
})
end
}
Code: Select all
2020-03-29 19:36:00.738 Status: dzVents: Info: put: ------ Start internal script: Script #1:, trigger: "every minute"
2020-03-29 19:36:00.739 Status: dzVents: Debug: put: OpenURL: url = http://xxx.xxx.x.xxx/api/xigTvboK2fVo6ld4DLNKIXpUViF/29/state
2020-03-29 19:36:00.739 Status: dzVents: Debug: put: OpenURL: method = PUT
2020-03-29 19:36:00.739 Status: dzVents: Debug: put: OpenURL: post data = nil
2020-03-29 19:36:00.740 Status: dzVents: Debug: put: OpenURL: headers = nil
2020-03-29 19:36:00.740 Status: dzVents: Debug: put: OpenURL: callback = nil
2020-03-29 19:36:00.742 Status: dzVents: Info: put: ------ Finished Script #1