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

Recent Home assistant issue in creating entities JVC DLA-X5000 #27

Closed
crewz opened this issue Feb 2, 2023 · 9 comments
Closed

Recent Home assistant issue in creating entities JVC DLA-X5000 #27

crewz opened this issue Feb 2, 2023 · 9 comments

Comments

@crewz
Copy link

crewz commented Feb 2, 2023

Hi - All was working fine until recent updates and i now get this error in home assistant any ideas?

2023-02-02 16:41:53.827 ERROR (MainThread) [homeassistant.components.remote] Error adding entities for domain remote with platform jvc_projectors
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 814, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 610, in _async_write_ha_state
attr.update(self.extra_state_attributes or {})
File "/config/custom_components/jvc_projectors/remote.py", line 121, in extra_state_attributes
if "NZ" in self._model_family:
TypeError: argument of type 'NoneType' is not iterable

@iloveicedgreentea
Copy link
Owner

Okay I think the issue is your model family is not included. I will have to find that out. If you revert to the previous version what value do you have for model version?

@iloveicedgreentea
Copy link
Owner

iloveicedgreentea commented Feb 2, 2023

I suspect its going to be None. I can't find the model code online so can you enable debug logs and send me debug logs after you add the below yaml, then restart home assistant, and wait about 3 minutes. Somewhere in there should be the model code in raw form and I can add it.

Add this to your configuration.yaml

logger:
  default: critical
  logs:
    custom_components.jvc_projectors: debug

@crewz
Copy link
Author

crewz commented Feb 2, 2023

Not sure i ever had a model number populated! will addable to config

@crewz
Copy link
Author

crewz commented Feb 2, 2023

Is this ok!

2023-02-02 17:24:35.961 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Starting open connection
2023-02-02 17:24:35.961 INFO (SyncWorker_8) [custom_components.jvc_projectors.remote] Connecting to JVC Projector: 192.168.1.217:20554
2023-02-02 17:24:35.965 INFO (SyncWorker_8) [custom_components.jvc_projectors.remote] Connected to JVC Projector
2023-02-02 17:24:35.966 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Handshaking
2023-02-02 17:24:35.966 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] b'PJ_OK'
2023-02-02 17:24:35.970 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Handshake successful
2023-02-02 17:24:35.970 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Command_type: b'?'
2023-02-02 17:24:35.973 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Send command: b'?\x89\x01MD\n'
2023-02-02 17:24:35.974 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Send ack: b'MD'
2023-02-02 17:24:35.974 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] do_command sending command: b'?\x89\x01MD\n'
2023-02-02 17:24:35.984 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] constructed ack_value: b'\x06\x89\x01MD\n'
2023-02-02 17:24:35.988 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] received msg from PJ: b'\x06\x89\x01MD\n'
2023-02-02 17:24:36.087 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] received message from PJ: b'@\x89\x01MDILAFPJ -- XHP1\n'
2023-02-02 17:24:36.087 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] MDILAFPJ -- XHP1
2023-02-02 17:24:36.087 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Model code is None
2023-02-02 17:24:36.087 DEBUG (SyncWorker_8) [custom_components.jvc_projectors.remote] Handshake complete and we are connected

@iloveicedgreentea
Copy link
Owner

Yeah that should be good I will add that line now and update it so it wont crash in the future

@iloveicedgreentea
Copy link
Owner

Okay I fixed it in the library. Using the file editor add on can you manually try this out?

Open /config/custom_components/jvc_projectors/manifest.json

Change "jvc-projector-remote-improved2==3.4.5"

to be exactly "jvc-projector-remote-improved2==3.5.1"

Restart HA and open your logs, it should not have errors. Then try it out again and see if you get the right model.

@crewz
Copy link
Author

crewz commented Feb 2, 2023

Thats great - model code now shows X5000 and entities are recreated

Many thanks for the speedy fix

@crewz crewz closed this as completed Feb 2, 2023
@iloveicedgreentea
Copy link
Owner

3.5.2 released. Remember to turn off debug logs also and restart

@crewz
Copy link
Author

crewz commented Feb 2, 2023 via email

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