Thank you for writing this script. Unfortunately I am unable to make it work. When the Mi stick is in on status I get the pairing request after turning on the switch "switch.mibox_socket_switch", however, nothing happens when the device is in off status. Below is my setup
Raspberry Pi 4
Home assistant OS
Onboard Bluetooth device
Mi Stick 4K
Log details
Logger: custom_components.mibox_socket.switch
Source: custom_components/mibox_socket/switch.py:78
integration: mibox_socket (documentation)
First occurred: 1:21:10 pm (5 occurrences)
Last logged: 3:25:16 pm
Error pairing with Bluetooth device: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0xabb8f1e0> command: /usr/bin/bluetoothctl args: ['/usr/bin/bluetoothctl'] buffer (last 100 chars): b'equest confirmation\r\n\x1b[0;94m[MiTV-AYFR0]\x1b[0m# \r\x1b[1;39m[agent] Confirm passkey 371239 (yes/no): \x1b[0m\r' before (last 100 chars): b'equest confirmation\r\n\x1b[0;94m[MiTV-AYFR0]\x1b[0m# \r\x1b[1;39m[agent] Confirm passkey 371239 (yes/no): \x1b[0m\r' after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 145 child_fd: 16 closed: False timeout: 10 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'bluetoothctl>')
Please help. Thank you in advance
Thank you for writing this script. Unfortunately I am unable to make it work. When the Mi stick is in on status I get the pairing request after turning on the switch "switch.mibox_socket_switch", however, nothing happens when the device is in off status. Below is my setup
Raspberry Pi 4
Home assistant OS
Onboard Bluetooth device
Mi Stick 4K
Log details
Logger: custom_components.mibox_socket.switch
Source: custom_components/mibox_socket/switch.py:78
integration: mibox_socket (documentation)
First occurred: 1:21:10 pm (5 occurrences)
Last logged: 3:25:16 pm
Error pairing with Bluetooth device: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0xabb8f1e0> command: /usr/bin/bluetoothctl args: ['/usr/bin/bluetoothctl'] buffer (last 100 chars): b'equest confirmation\r\n\x1b[0;94m[MiTV-AYFR0]\x1b[0m# \r\x1b[1;39m[agent] Confirm passkey 371239 (yes/no): \x1b[0m\r' before (last 100 chars): b'equest confirmation\r\n\x1b[0;94m[MiTV-AYFR0]\x1b[0m# \r\x1b[1;39m[agent] Confirm passkey 371239 (yes/no): \x1b[0m\r' after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 145 child_fd: 16 closed: False timeout: 10 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'bluetoothctl>')
Please help. Thank you in advance