This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Denon Home 150 and Yamaha Musicast 20 Speakers
#4
For Yamaha run this script once and if it works correctly you should be a table with various status info in Logs tab. Change ip variable to Yamaha speakers IP address.
Code:
ip = '192.168.1.2'

json = require('json')
http = require('socket.http')
ltn12 = require('ltn12')

respbody = {}
res, code, hdrs = http.request({
  url = 'http://' .. ip .. '/YamahaExtendedControl/v1/main/getStatus',
  headers = {
    ['X-AppName'] = 'MusicCast/1.0',
    ['X-AppPort'] = '41100',    
  },
  sink = ltn12.sink.table(respbody)
})

if res then
  data = json.pdecode(table.concat(respbody))
  log(data)
else
  log('request failed', res, code)
end
Reply


Messages In This Thread
RE: Denon Home 150 and Yamaha Musicast 20 Speakers - by admin - 29.03.2021, 06:49

Forum Jump: