node-cec icon indicating copy to clipboard operation
node-cec copied to clipboard

Get mi address

Open chumager opened this issue 8 years ago • 2 comments

Hi, how can I know my own address?

if I set the -m flag, when I send a poll I only get the POLLING event from my packet and no response.

the only thing I can figure out is to take off the -m flag and count the repeated polling messages, the one who repeats twice is my address...

any ideas?

Best regards.

chumager avatar Feb 09 '17 22:02 chumager

I had the same problem, I've managed to read out the own logical address with:

cec.on('REPORT_PHYSICAL_ADDRESS', function (packet, status) {
  cec_src_and_dest = parseInt(packet.source + '0',16);
});

the cec-client in the background broadcasts it's physical address when initializing, so i use this to read out my own LA out of the source field. Be aware that i also add a 0 in hex because all of my commands then are directed to the TV.

krellsebastian avatar May 17 '18 10:05 krellsebastian

good one @krellsebastian thks...

chumager avatar May 28 '18 19:05 chumager