mattsaxon / HASS-SpeakercraftMediaPlayer

Speakercraft Platform for Home Assistant
4 stars 1 forks source link

"incorrect checksum" and "throw away early trim" in logs #45

Open demian-sl opened 2 years ago

demian-sl commented 2 years ago

Hello,

Foremost, big thanks to all contributors who made this possible! Module is great!

After a recent update, those two errors appeared in home assistant:

Source: custom_components/speakercraft_media/speakercraft_media.py:429
Integration: Speakercraft Media Player
First occurred: 18 березня (March) 2022., 16:58:23 (11 occurrences)
Last logged: 13:14:26

incorrect checksum, ignoring 550b20020000ff1113550b check 32 calc 251
incorrect checksum, ignoring 550b20050000ff18111355 check 11 calc 235
incorrect checksum, ignoring 550b20000000ff23000011 check 19 calc 77
incorrect checksum, ignoring 550b2005801113550b2000 check 0 calc 87
incorrect checksum, ignoring 550b20040000ff1400e011 check 19 calc 120

Logger: custom_components.speakercraft_media.speakercraft_media
Source: custom_components/speakercraft_media/speakercraft_media.py:441
Integration: Speakercraft Media Player (documentation, issues)
First occurred: 18 березня (March) 2022 р., 16:58:23 (63 occurrences)
Last logged: 11:54:43

throw away early trim 00
throw away early trim ff
throw away early trim 23
throw away early trim 28
throw away early trim 36

As a result of this (or maybe not, idk) all my zones turn themselves off after some minutes or hours.

mattsaxon commented 2 years ago

Can you back out to the last version and verify it doesn't have the same issue? I haven't checked the code, but what you are experiencing doesn't seem like a software issue, so I'd like to verify that first.

Meanwhile I will check to see if my zones turn off ever as you experience.

demian-sl commented 2 years ago

When I turn on my zone, after some time, such message appear in log and zone turns off:

2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.speakercraft_media] status message 550b20040000ff14000036
2022-03-20 12:56:53 INFO (MainThread) [custom_components.speakercraft_media.speakercraft_media] Status Update Zone 5 Power Off Volume 20 VolumeDB 54 Source 256 Bass 0.0 Treble 0.0
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.speakercraft_media] Controller Found 0 zones on
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.media_player] updatecallback Zone 5
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.switch] updatecallback Zone 5
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.number] updatecallback Zone 5
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.number] updatecallback Zone 5
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.number] Treble Value 5 0.0
2022-03-20 12:56:53 DEBUG (MainThread) [custom_components.speakercraft_media.number] Bass Value 5 0.0

I do not have any physical panels, only fake configured in EZ-Tools for integration to work, so no one is turning off the zone physically, also no "automations" configured in EZ-Tools or in home assistant. Did not modify the MZC config since the installation, just regular updates of home assistant and module from HACS

mattsaxon commented 2 years ago

I suggest sending full log, but since you have debug on, you can probably see that the component is not doing anything to turn it off.

I'm guess you have some sort of hardware issue, given the errors in checksum you state above.

If you can send full log, I can verify my guess that the component itself is not turning this off.

mattsaxon commented 2 years ago

I've checked my setup and no unexpected turning off it occurring.

The incorrect checksum issue I have never seen in my logs. Not during normal running or when testing under stress.

This is what makes me think there is an issue with your hardware setup. Could be a problematic cabling with interference, I'd check that first.

When did the problem start occurring? Was it working fine prior or is this your first time using the component?

demian-sl commented 2 years ago

Full log really does not show any software turn-offs, I do also think that the problem is with hardware. The problem started occurring a few weeks ago, no hardware or software changes have been done. The set-up was working fine prior to this. Unfortunately, I have no physical access to that setup, I will try to connect serial remotely to another VM based on Windows and will try to reset the MZC itself, will keep you updated thank you

sjeffrey101 commented 2 years ago

To me it looks like part of the serial message isnt making it into our serial buffer properly, so some of the message is truncated. If you are running as a VM this could possibly be why. You might work better running on the serial to network device that Matt has documented, rather then the emulated virtual serial interface from your hypervisor.

The serial is very chatty so, if for some reason the hardware/hypervisor isnt keeping up this will cause missed messaged.

Not sure why it would turn off - if you turn the zones on, then disconnect the serial, do they still turn off after time? Is it always eactly the same amount of time?

Are you on the latest firmware. You should get a message when the component can first communicate with the device Mine is on 2.2.8

Controller Info Speakercraft MZC 88 Max Zones 8 Version Version 2.2.8

Also, might be worth trying the example project in ESP Tools initially, and see what happens.

Assume you are on the latest version of this componenet. (we havent sorted versioning properly at the moment, so it might be worth downloading again any way).

Stu