Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning from the characteristic 'Volume' - error message #100

Open
3 tasks
JSVarga opened this issue Mar 2, 2021 · 7 comments
Open
3 tasks

Warning from the characteristic 'Volume' - error message #100

JSVarga opened this issue Mar 2, 2021 · 7 comments
Labels
bug A CONFIRMED bug in the plugin code

Comments

@JSVarga
Copy link

JSVarga commented Mar 2, 2021

  • Homebridge version: 1.3.1
  • Plugin version: 2021.2.2
  • OS, including release name/version: Synology NAS & Docker
  • Homebridge-Onkyo installed via OS/distribution mechanisms
  • You installed using homebridge-config-ui-x
  • You enabled homebridge debug output

Describe the bug
Error message:
[3/2/2021, 3:59:02 PM] [homebridge-onkyo] This plugin generated a warning from the characteristic 'Volume': characteristic was expected valid number and received NaN. See https://git.io/JtMGR for more info.

To Reproduce
Information on your Onkyo receiver:

  1. Model information
    TX-NR609
@JSVarga JSVarga added the bug A CONFIRMED bug in the plugin code label Mar 2, 2021
@solowalker27
Copy link
Collaborator

Volume and Mute are intentionally added as characteristics so they can be used directly on the accessory via third party apps. The way to fix this warning would be to not include those. That would be a breaking change and I believe plenty of people are relying on this functionality as there's still no native way of controlling volume on a Tab accessory.

@jondthompson
Copy link

I'm going to add this error here because it's similar, and I got it today.

[homebridge-onkyo] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://git.io/JtMGR for more info.

@jondthompson
Copy link

Found the smoking gun...

async getAlarmState(callback) {
        debug('getting state for Alarm'+this.name);
        if(await this._getStateFromAlarm(false) && this.alarmSystem.state) 
            callback(null,this.alarmSystem.state);
        else
            callback('get state failed or null',null); 
    }

    async getSwitchState(switchType, callback) {
        /* 0 = stay, 1 = away, 2 = night, 3 = disarmed, 4 = alarm */
        debug('getting state for Switch '+ switchType);
        await this._getStateFromAlarm(false);
        if(switchType == 'panic' && this.alarmSystem.state==4)
            callback(null,true);
        else if ((switchType == 'stay' || switchType == 'home') && this.alarmSystem.state==0)
            callback(null,true);
        else if (switchType == 'away' && this.alarmSystem.state==1)
            callback(null,true);
        else if (switchType == 'night' && this.alarmSystem.state==2)
            callback(null,true);
        else
            callback(null,false);
    }

getSwitchState() is for switches coming from the alarm system, not from homekit.
getAlarmState() on the other hand works fine as long as stay isn't used because of && this.alarmSystem.state despite all of its logic being in the wrong function.

I'm working on a fix right now.

@rsuaver
Copy link

rsuaver commented Jun 1, 2021

Getting this - assuming it's the same bug?

This plugin generated a warning from the characteristic 'Volume': characteristic was supplied illegal value: number 127 exceeded maximum of 100. See https://git.io/JtMGR for more info.

@BenS89
Copy link

BenS89 commented Jul 26, 2021

I can confirm the error.
Plugin version: homebridge-onkyo v2021.28.1
TX NR 696

[homebridge-onkyo] This plugin generated a warning from the characteristic 'Volume': characteristic was supplied illegal value: number 157 exceeded maximum of 100. See https://git.io/JtMGR for more info.

@rsuaver
Copy link

rsuaver commented Dec 8, 2021

It looks like this happens when "Map Max Volume to 100%" is unchecked (or map_volume_100 is not set or not true). Checking this option and reloading no longer shows the message.

@JSVarga
Copy link
Author

JSVarga commented Dec 8, 2021

Tried changing this setting, and stripped down to minimum option, and still crashes by Homebridge or at least stops it running to disable the plug in again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A CONFIRMED bug in the plugin code
Projects
None yet
Development

No branches or pull requests

5 participants