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

No Audodiscovery and no Play/Stop #2

Open
ValiEne opened this issue Apr 26, 2024 · 6 comments
Open

No Audodiscovery and no Play/Stop #2

ValiEne opened this issue Apr 26, 2024 · 6 comments

Comments

@ValiEne
Copy link

ValiEne commented Apr 26, 2024

Hi,
First I want to thank you for sharing your work with us.
I've tried to add my cats' Petoneer Dot but unfortunately I didn't succeed.
I'm running HAOS on an Intel NUC machine which has a buildin BT adapter that works fine.
When adding the Integration I'm unable to auto-discover the Dot so I'm adding it by manually entering MAC address, which works, or at least it looks like it's working.
When clicking the Play button I can see in the logs something like this:
2024-04-26 15:48:49.254 DEBUG (MainThread) [custom_components.petoneer_smartdot.button] Current game mode: medium 2024-04-26 15:48:49.254 DEBUG (MainThread) [custom_components.petoneer_smartdot.button] Connecting 2024-04-26 15:48:49.870 DEBUG (MainThread) [custom_components.petoneer_smartdot.button] Sending command 2024-04-26 15:48:49.871 ERROR (MainThread) [custom_components.petoneer_smartdot.button] Connection: BleakError: Characteristic {char_specifier} was not found! 2024-04-26 15:48:49.964 DEBUG (MainThread) [custom_components.petoneer_smartdot.button] Disconnected

I'm doing something wrong or what else should I try?

Thanks

@verdel
Copy link
Owner

verdel commented Apr 26, 2024

Hello. The fact that your Petoneer SmartDot is not discovered through discover and the subsequent error in sending the command most likely indicates that there are several different firmware modifications for the SmartDot at Petoneer.

I was basing this on data from Marco Colombo from the hass-addon-petoneer-smartdot.

I actually just had my toy break and I've ordered a new one. I'll pick it up today and check if its firmware is different. If so, I will make changes to the code and at the same time ask you to provide additional data for debugging. I will show you how to scan Bluetooth devices so that you can see the SmartDot identifier and the service it provides.

@ValiEne
Copy link
Author

ValiEne commented Apr 26, 2024

Thanks Vadim, no hurry :)
Let me know if you need any info from my side

@verdel
Copy link
Owner

verdel commented Apr 26, 2024

I received the new Petoneer Smart Dot and unfortunately, the manufacturer has significantly changed the protocol in the new firmware. The previous Petoneer SmartDot was model PTY010, the new one is TY011.

The previous model had firmware version 1.09, while the new one has 1.2.

Old

v1.09

New

v1.2

The controller board has also visually changed:

Old

old
old

New

new
new

I attempted to debug the new protocol, but unlike the previous version, the packets that the phone app sends to initiate various types of games are no longer static. Each time, the app sends new data when accessing the Smart Dot. When I tried to send a packet with the same content through a Python script, nothing happened.

I wrote to Petoneer support, but I'm afraid they won't provide me with the protocol documentation.

In my case, I simply swapped the controller board from the old model to the new one. Everything worked, except that the eye's centering was slightly off. It looks a bit to the side from the center in its default position, but I'm willing to live with that.

I'll leave the issue open, perhaps Petoneer will respond. For now, I'll add a note in the README about the supported firmware type.

I'm very sorry that the manufacturer changed the firmware of the device, thereby complicating the integration of the Smart Dot into Home Assistant. However, they did not add any functionality to their app.

@ValiEne
Copy link
Author

ValiEne commented Apr 27, 2024

Thanks a lot Vadim for your time.
My board looks similar with the new one you got - I've opened the case few months ago to swap the BT module with an ESP one running Tasmota but unfortunately it didn't worked and I had to roll back to default module.
Later edit: this is what I've tried and failed: https://templates.blakadder.com/petoneer_TY011.html

@ValiEne
Copy link
Author

ValiEne commented Apr 27, 2024

4D64BD8D-3BA3-434C-B33C-6ED730C6EFA3_1_105_c
D7A48F2E-98B4-439E-98D5-BA5CDADBCE81_1_105_c
2BD62168-37D3-42D5-9C9C-FD8ED22CDB71_1_105_c

@verdel
Copy link
Owner

verdel commented Apr 27, 2024

Looking at the components on the board, it resembles my board from the new version of the Smart Dot, but it still differs. Your board has a marking with version v0.20. It seems that Petoneer has changed the controller board more than once.

I also looked into replacing the Bluetooth chip with an ESP32 and the project at blakadder, but I was lucky with my board. Now that I have a new controller in hand, I might try to replace the chip. If I manage to do it, I will write additional information about it.

I will also post in this issue if Petoneer support responds.

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

2 participants