Giter VIP home page Giter VIP logo

Comments (9)

ACDR avatar ACDR commented on September 25, 2024

Looks like these are originating from yamaha-nodejs.

Will see if we can get these packages updated over there, or may just remove the yamaha-nodejs dependency and interact with the device directly.

from homebridge-yamaha-avr.

ACDR avatar ACDR commented on September 25, 2024

or may just remove the yamaha-nodejs dependency and interact with the device directly.

In fact, I'll start experimenting with this tonight.

from homebridge-yamaha-avr.

iSteve-O avatar iSteve-O commented on September 25, 2024

or may just remove the yamaha-nodejs dependency and interact with the device directly.

In fact, I'll start experimenting with this tonight.

This sounds exciting! Good luck!

from homebridge-yamaha-avr.

ACDR avatar ACDR commented on September 25, 2024

Have published a beta release for v3, 3.0.0-beta.3 - if you could give this a whirl & report back how it goes that would be much appreciated!

yamaha-nodejs dependency has been removed and the plug-in now interfaces with the YamahaExtendedControl API directly.

https://github.com/ACDR/homebridge-yamaha-avr/releases/tag/v3.0.0-beta.3

from homebridge-yamaha-avr.

iSteve-O avatar iSteve-O commented on September 25, 2024

Hey so the warnings are all fixed. Install was super quick. It seems to have cached all of my inputs properly but when I rebooted the AVR using the music cast app I got some errors in the log. I have to turn on debug to get you more info but I'm working at the moment. Will try to get back to you with it ASAP.

[Yamaha] Current input: hdmi1
[01/09/2022, 22:09:23] [Yamaha] Current input: hdmi1
[01/09/2022, 22:09:24] [Yamaha] Current input: hdmi1
[01/09/2022, 22:09:45] [Yamaha] Current input: hdmi1
[01/09/2022, 22:11:51] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[01/09/2022, 22:11:51] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[01/09/2022, 22:11:53] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[01/09/2022, 22:11:56] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[01/09/2022, 22:12:20] [Yamaha] Current input: hdmi1`

OK in debug when I rebooted it I got this:

`[homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:20] [homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.`

and then this:

`[01/09/2022, 22:19:20] [homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:20] [homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:30] [Yamaha] AVR PING { power: undefined, input: undefined }

[01/09/2022, 22:19:30] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:30] [homebridge-yamaha-avr] Error: 
    at ActiveIdentifier.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at ActiveIdentifier.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2045:14)
    at ActiveIdentifier.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20)
    at Television.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:481:35)
    at YamahaAVRAccessory.<anonymous> (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/src/accessory.ts:412:20)
    at Generator.next (<anonymous>)
    at fulfilled (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/dist/accessory.js:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

[01/09/2022, 22:19:30] [Yamaha] AVR PING { power: undefined, input: undefined }

[01/09/2022, 22:19:30] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:30] [homebridge-yamaha-avr] Error: 
    at ActiveIdentifier.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at ActiveIdentifier.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2045:14)
    at ActiveIdentifier.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20)
    at Television.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:481:35)
    at YamahaAVRAccessory.<anonymous> (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/src/accessory.ts:412:20)
    at Generator.next (<anonymous>)
    at fulfilled (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/dist/accessory.js:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

[01/09/2022, 22:19:32] [Yamaha] AVR PING { power: undefined, input: undefined }

[01/09/2022, 22:19:32] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.

[01/09/2022, 22:19:32] [homebridge-yamaha-avr] Error: 
    at ActiveIdentifier.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at ActiveIdentifier.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2045:14)
    at ActiveIdentifier.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20)
    at Television.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:481:35)
    at YamahaAVRAccessory.<anonymous> (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/src/accessory.ts:412:20)
    at Generator.next (<anonymous>)
    at fulfilled (file:///usr/local/lib/node_modules/homebridge-yamaha-avr/dist/accessory.js:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

[01/09/2022, 22:19:35] [Yamaha] AVR PING { power: 'on', input: 'hdmi2' }

[01/09/2022, 22:19:35] [Yamaha] AVR PING { power: 'on', input: 'hdmi2' }

and then it seems normal again

EDIT: maybe there's no "off" characteristic?

from homebridge-yamaha-avr.

ACDR avatar ACDR commented on September 25, 2024

Looks like the /main/getStatus endpoint was failing to get a response. Added handling for failing API responses when checking for the AVR status in 3.0.0-beta.4. Strange that it was failing to get a response though.

Do you get anything back from the AVR when you browse to the http://{AVR_IP}/YamahaExtendedControl/v1/getStatus endpoint whilst the log is returning

{ power: undefined, input: undefined }

Just to clarify - was it working fine, then this happened when you turned the device off in the Music Cast App?

from homebridge-yamaha-avr.

iSteve-O avatar iSteve-O commented on September 25, 2024

Looks like the /main/getStatus endpoint was failing to get a response. Added handling for failing API responses when checking for the AVR status in 3.0.0-beta.4. Strange that it was failing to get a response though.

Do you get anything back from the AVR when you browse to the http://{AVR_IP}/YamahaExtendedControl/v1/getStatus endpoint whilst the log is returning

{ power: undefined, input: undefined }

Just to clarify - was it working fine, then this happened when you turned the device off in the Music Cast App?

Yes, that's exactly what's happening. It. works fine before and after I reboot the receiver but during reboot homebridge just doesn't know what's going on and throws errors.

I did what you said and tried to enter that URL for my receiver (http://192.168.1.91/YamahaExtendedControl/v1/getStatus) and before reboot I got "{"response_code":3}" and after reboot I got "{"response_code":1}" but during reboot the browser just held up like it was trying to reach something unreachable. it didn't return anything.

I will now update to the latest beta and try again.

EDIT:
After installing beta.4 it seems to handle it better but I still got a different error. I think maybe just a few more seconds of waiting will do it. Mine is wired so I'm sure it reconnects as fast as possible so you may want to keep that in mind because it may take longer for wifi connected devices to re-establish connection. Really nice work though!

EDIT 2:
I forgot the log LOL

[02/09/2022, 18:30:12] [Yamaha] 
        Cannot communicate with Yamaha AVR at 192.168.1.91.
        Connection will be restored automatically when the AVR begins responding.
      
[02/09/2022, 18:30:19] [Yamaha] AVR PING { power: 'on', input: 'hdmi2' }
[02/09/2022, 18:30:19] [Yamaha] Communication with Yamaha AVR at 192.168.1.91 restored
[02/09/2022, 18:30:20] [Yamaha] AVR PING { power: 'on', input: 'hdmi2' }

EDIT 3:
What I've gathered from this is that the "reboot" function in the AVR's settings in the Music Cast app is akin to unplugging it and plugging it back in, unlike "power cycling" it with HomeKit (or even the front button on the AVR), which toggles it between active working mode & standby (passive) mode that still passes video through.

I think this is why it stays connected during normal power cycling events but not through that, lets call it , "Music Cast reboot."

It's probably the only time where it should not be reachable for a few seconds & will need this error handling, with the exception of network & (obviously) power outages.

from homebridge-yamaha-avr.

ACDR avatar ACDR commented on September 25, 2024

Great - yeah looks like it's doing a hard shutdown/startup of the receiver - which is making the API inaccessible for a while.

The error is now handled in the state check ping, when connection is lost it will post an "info" log as below a single time

Cannot communicate with Yamaha AVR at 192.168.1.91.
Connection will be restored automatically when the AVR begins responding.

It will then silently continue to ping the receiver until the connection is restored, then logging

Communication with Yamaha AVR at 192.168.1.91 restored

So, no more errors - just some info logs letting you know that connection was lost & restored. 😄

from homebridge-yamaha-avr.

iSteve-O avatar iSteve-O commented on September 25, 2024

Great - yeah looks like it's doing a hard shutdown/startup of the receiver - which is making the API inaccessible for a while.

The error is now handled in the state check ping, when connection is lost it will post an "info" log as below a single time

Cannot communicate with Yamaha AVR at 192.168.1.91.
Connection will be restored automatically when the AVR begins responding.

It will then silently continue to ping the receiver until the connection is restored, then logging

Communication with Yamaha AVR at 192.168.1.91 restored

So, no more errors - just some info logs letting you know that connection was lost & restored. 😄

That's awesome! Yeah, it seems to work very well. I'm glad you were able to dispatch with those install errors, even if benign they bother me LOL I really appreciate all of your work on the plugin lately. It works much better than the zone plugin I had been using, probably because of the constant polling this one does. The zone one takes much longer to update its status so is more difficult to use in scenes and automation. I'm trying to fix my LG tv integration now to see if the plugin can do a better job than native HomeKit. Even though this is doubtful, it should allow me to at least do more things with the TV in HomeKit. Next I have to figure out why every so often my TV screen will go black for a second sometimes once, sometimes over and over, and it seems to be related to the TV and AVR trying to set modes automatically or something. I may have to bypass this receiver's HDMI because of it which is really annoying. I don't know why I'm off on this, just mentioning it LOL (to be clear I'm certain this issue is nothing to do with plugins)

Great work!

from homebridge-yamaha-avr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.