teddycloud icon indicating copy to clipboard operation
teddycloud copied to clipboard

Send MQTT event when Tonie gets removed from the Toniebox

Open monsdar opened this issue 1 year ago • 8 comments

It would be very useful for Home Assistant integration if an MQTT event (value?) is send when the Tonie finally gets removed from the box.

From the Forum thread (regarding the behavior of a Creative Tonie):

I noticed that the Content Audio Id first changes from Unknown to the Id of the media I’ve recorded. When I remove the Tonie while this is playing it changes back to Unknown. But when I leave the Tonie on the box, as soon as my recorded audio is finished the Content Audio Id changes to something else. When I now remove the Tonie the Id stays as it is.

Values for Tag Valid are changing in a similar manner: When I remove the Tonie during my recorded audio plays the value changes back to Unknown. But when the recorded audio is finished the Tag Valid won’t change anymore.

I checked the RTNL messages that occur when removing a Tonie and found that (besides a few others) the following messages appear every time:

Creative Tonie:

Raw2 | #1141 Uptime: 503842 Func: 15-8630 Payload: '10A41470E0040350' ASCII: '...p...P'
Raw2 | #1142 Uptime: 503842 Func: 24-6158 Payload: 'CA170000' ASCII: '....'

Benjamin Bluemchen Tonie:

Raw2 | #1521 Uptime: 884906 Func: 15-8630 Payload: '172091E4E0040350' ASCII: '. .....P'
Raw2 | #1523 Uptime: 884909 Func: 24-6139 Payload: 'CB170000CA170000' ASCII: '........'

Paddington Tonie:

Raw2 | #1428 Uptime: 743952 Func: 15-8630 Payload: '15EC056BE0040350' ASCII: '...k...P'
Raw2 | #1430 Uptime: 743955 Func: 24-6139 Payload: 'CB170000CA170000' ASCII: '........'

Perhaps this is a message we can use for this feature?

monsdar avatar Feb 11 '24 19:02 monsdar