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

Incorrect MAC address format #182

Open
ZAAJR opened this issue Jun 12, 2022 · 2 comments
Open

Incorrect MAC address format #182

ZAAJR opened this issue Jun 12, 2022 · 2 comments

Comments

@ZAAJR
Copy link

ZAAJR commented Jun 12, 2022

I am getting an "Incorrect MAC address format" error when trying to turn on a Samsung TV. It used to work in previous version, but no longer working in:
Home Assistant Core 2022.6.5
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1

Full error message shown below. I am not sure what format the MAC address should be in in the configuration.yaml file. I have tried separating with colons (:) and with no separation between the pairs.

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/samsungtv/media_player.py", line 460, in async_turn_on
await self.hass.async_add_executor_job(self._wake_on_lan)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/samsungtv/media_player.py", line 450, in _wake_on_lan
send_magic_packet(self._mac, ip_address=self._host)
File "/usr/local/lib/python3.9/site-packages/wakeonlan.py", line 52, in send_magic_packet
packets = [create_magic_packet(mac) for mac in macs]
File "/usr/local/lib/python3.9/site-packages/wakeonlan.py", line 52, in
packets = [create_magic_packet(mac) for mac in macs]
File "/usr/local/lib/python3.9/site-packages/wakeonlan.py", line 31, in create_magic_packet
raise ValueError("Incorrect MAC address format")
ValueError: Incorrect MAC address format

Configuration.yaml

media_player:
  - platform: samsungtv_tizen
    name: lounge_tv
    host: 192.168.0.62
    mac: 54bd7933954e
    api_key: xxxxxxxxxxxxx
    device_id: xxxxxxxxxxxxxxxx

Also tried

 media_player:
  - platform: samsungtv_tizen
    name: lounge_tv
    host: 192.168.0.62
    mac: 54:bd:79:33:95:4e
    api_key: xxxxxxxxxxxxx
    device_id: xxxxxxxxxxxxxxxx

@numbnp
Copy link

numbnp commented Jul 30, 2022

Try

 media_player:
  - platform: samsungtv_tizen
    name: lounge_tv
    host: 192.168.0.62
    mac: "54:bd:79:33:95:4e"
    api_key: xxxxxxxxxxxxx
    device_id: xxxxxxxxxxxxxxxx

@magyartj
Copy link

I use dashes in my MAC address format. This is my configuration below which works just fine.

`media_player:

  • platform: samsungtv_tizen
    host: 192.168.1.12
    mac: 1a-2b-3c-4d-5e-6f
    name: "Living Room Samsung TV"
  • platform: samsungtv_tizen
    host: 192.168.1.14
    mac: 11-2a-3b-4c-5d-6e
    name: "Bedroom Samsung TV"
    `

I also think using the quotes and colons as @numbnp used is also valid, as I may have used that at one time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants