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.

Yamaha Extended Control

I can send HTTP a request to the Yamaha controller.


After the request, I receive an answer. For example when "power": "ON", the controller is on, and when "power": "standby" the controller is off.


Tell me how I can convert the received data to the KNX?
Use this as a starting point. response variable should contain your HTTP request result.

status = require('json').pdecode(response)

if type(status) == 'table' then
  poweron = status.power ~= 'standby'
  grp.checkupdate('1/1/1', poweron) -- power status (1 bit)

  grp.checkupdate('1/1/2', status.input_text) -- input (text)

  volume = status.volume / status.max_volume * 100
  grp.checkupdate('1/1/3', volume) -- current volume (1 byte scale)
Volume status problem!

volume = status.volume / status.max_volume * 100
  grp.checkupdate('1/1/3', volume) -- current volume (1 byte scale)

The volume volume status is 100 but received volume value is 61
Therefore, the script is constantly updating the value.
Try using the volume value directly. Also you should use different objects for status and control.
grp.checkupdate('1/1/3', status.volume)

Forum Jump: