homebridge-onkyo
homebridge-onkyo copied to clipboard
Warning from the characteristic 'Volume' - error message
- 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:
- Model information TX-NR609
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.
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.
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.
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.
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.
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.
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.