konradknitter / homebridge-philips-android-tv

Homebridge module for the Philips Android TV
Apache License 2.0
48 stars 6 forks source link

Error: MAC Address is not set or not proper MAC address. #38

Closed XavCamp closed 3 years ago

XavCamp commented 3 years ago

Hi, thanks for the hard work on this great plugin!

Describe The Bug: In the logs there is an error about mac address:

MAC Address is not set or not proper MAC address.

To Reproduce: That's when you provide a mac address in the config.

I think it's because in https://github.com/konradknitter/homebridge-philips-android-tv/blob/master/src/PhilipsTVPlatform.ts#L41 it should be if (!this.mac ...

Expected behavior:

Logs:

04/06/2021, 18:20:55 [PhilipsAndroidTV] Initializing PhilipsAndroidTV platform...
04/06/2021, 18:20:55 [PhilipsAndroidTV] [Living Room TV] MAC Address is not set or not proper MAC address.

Plugin Config:

{
            "platform": "PhilipsAndroidTV",
            "plugin_map": {
                "plugin_name": "homebridge-philips-android-tv"
            },
            "tvs": [
                {
                    "ip": "192.168.86.27",
                    "mac": "[my valid mac address]",
                    "name": "Living Room TV",

Environment:

konradknitter commented 3 years ago

@XavCamp MAC setting is optional, so line is okay. You need to set mac( that condition is met) and it has to fall to meet regex: /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/

Check if your MAC falls here. https://regexr.com/

Or maybe why it doesn't? (AA:BB:DD:CC:EE:FF works)

XavCamp commented 3 years ago

Ok I see, the issue is that my MAC address was using lowercase letters, not uppercase. I don’t think case matters for MAC addresses, but I’ll fix my config. Thanks!

On Fri 4 Jun 2021 at 18:32, Konrad Knitter @.***> wrote:

@XavCamp https://github.com/XavCamp MAC setting is optional, so line is okay. You need to set mac( that condition is met) and it has to fall to meet regex: /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/

Check if your MAC falls here. https://regexr.com/

Or maybe why it doesn't? (AA:BB:DD:CC:EE:FF works)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/konradknitter/homebridge-philips-android-tv/issues/38#issuecomment-854860436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIZUYKOVRZDTNWNRWYR3GTTRD52BANCNFSM46DD6GXQ .