Closed glockpete closed 2 years ago
Do you already have the device in question?
What is the echonet device category? If it is it depends on how it functions in practice and what the most appropriate home assistant entity would be to model it.
ammgws is right, we can’t really do anything about it until someone has a compatible device in their possession to test against.
I have the KI-HS70 and the KI-HS50 and would be happy to test. Although if it took up too much of your time just the power consumption would be enough.
Are you comfortable with using Python from the command line? if you clone the 'pychonet' repo, update 'example_async.py' with your IP address details and run it with python3 'example_async.py'
Also, you should be able to simply add your device now from the integrations menu, and then at the very least sensors will be created, then we can work out how we best model it.
Thanks as always will give it a try and let you know
Okay here is the data returned. And both Air Purifiers can be added to Home Assistant.
ECHONET Instance 0x1-0x35-0x1 identification number discovered! [{'eojcc': '0x35', 'eojci': '0x1', 'eojgc': '0x1', 'getmap': ['0x80', '0xa0', '0xc0', '0xf0', '0x81', '0xf1', '0x82', '0xf2', '0xf3', '0x84', '0x85', '0x86', '0x88', '0x89', '0x8a', '0x8b', '0x8c', '0xfc', '0x9d', '0xfd', '0x9e', '0x9f'], 'host': '192.168.1.75', 'manufacturer': 'Sharp', 'setmap': ['0x80', '0x81', '0xa0', '0xf3'], 'uid': None}]
Is it showing the sensor data correctly?
Get Outlook for iOShttps://aka.ms/o0ukef
From: glockpete @.> Sent: Sunday, September 26, 2021 6:01:12 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
Okay here is the data returned. And both Air Purifiers can be added to Home Assistant.
ECHONET Instance 0x1-0x35-0x1 identification number discovered! [{'eojcc': '0x35', 'eojci': '0x1', 'eojgc': '0x1', 'getmap': ['0x80', '0xa0', '0xc0', '0xf0', '0x81', '0xf1', '0x82', '0xf2', '0xf3', '0x84', '0x85', '0x86', '0x88', '0x89', '0x8a', '0x8b', '0x8c', '0xfc', '0x9d', '0xfd', '0x9e', '0x9f'], 'host': '192.168.1.75', 'manufacturer': 'Sharp', 'setmap': ['0x80', '0x81', '0xa0', '0xf3'], 'uid': None}]
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-927254075, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDCR6ZXM5772RLBXKATUD3HMRANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Nothing is created within HA but your integration accepts it.
So nothing gets configured at all under the integration menu? It should have at the very least created a bunch of sensor objects…
Is there any logs or error messages in the Home Assistant log?
Get Outlook for iOShttps://aka.ms/o0ukef
From: glockpete @.> Sent: Sunday, September 26, 2021 6:04:59 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
Nothing is created within HA but your integration accepts it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-927254758, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDCXJBGX7SDFL6PAZ4LUD3H2XANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Here are the relevant logs 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID in ECHONET connector.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] {'d00fa19d35e825ac53e5a1c59896d1ff': [], 'api': <pychonet.echonetapiclient.ECHONETAPIClient object at 0x7f00cdcf7670>} has already been setup.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID in ECHONET connector.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] {'d00fa19d35e825ac53e5a1c59896d1ff': [], 'api': <pychonet.echonetapiclient.ECHONETAPIClient object at 0x7f00cdcf7670>, 'be45ea06d3abbc63f127e713c91571ba': []} has already been setup.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID.. 2021-09-26 16:42:34 DEBUG (MainThread) [custom_components.echonetlite] None is the UID in ECHONET connector..
Apologies...
192.168.1.75 192.168.1.175 these are both the Air Purifiers
This may be more relevant, i added the other device. 2021-09-26 17:10:52 DEBUG (MainThread) [custom_components.echonetlite.config_flow] IP address is 192.168.1.175 2021-09-26 17:10:52 DEBUG (MainThread) [custom_components.echonetlite.config_flow] {'d00fa19d35e825ac53e5a1c59896d1ff': [{'instance': {'host': '192.168.1.41', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a2f10>}], 'api': <pychonet.echonetapiclient.ECHONETAPIClient object at 0x7f00cdcf7670>, 'be45ea06d3abbc63f127e713c91571ba': [{'instance': {'host': '192.168.1.220', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a91c0>}], 'f37040838003db388670acc95626b1c5': [{'instance': {'host': '192.168.1.88', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a9460>}], 'a06dfa4bb30062744387fbb9b7b3dbe9': [{'instance': {'host': '192.168.1.75', 'eojgc': 1, 'eojcc': 53, 'eojci': 1, 'getmap': [128, 160, 192, 240, 129, 241, 130, 242, 243, 132, 133, 134, 136, 137, 138, 139, 140, 252, 157, 253, 158, 159], 'setmap': [128, 129, 160, 243], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00bd37b070>}]} has already been setup.. 2021-09-26 17:10:52 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery 2021-09-26 17:10:56 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Node detected 2021-09-26 17:10:56 DEBUG (MainThread) [custom_components.echonetlite] {'d00fa19d35e825ac53e5a1c59896d1ff': [{'instance': {'host': '192.168.1.41', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a2f10>}], 'api': <pychonet.echonetapiclient.ECHONETAPIClient object at 0x7f00cdcf7670>, 'be45ea06d3abbc63f127e713c91571ba': [{'instance': {'host': '192.168.1.220', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a91c0>}], 'f37040838003db388670acc95626b1c5': [{'instance': {'host': '192.168.1.88', 'eojgc': 1, 'eojcc': 48, 'eojci': 1, 'getmap': [128, 160, 176, 240, 129, 161, 241, 130, 242, 147, 179, 243, 132, 244, 133, 245, 134, 198, 246, 136, 137, 249, 138, 186, 250, 139, 187, 140, 157, 253, 158, 190, 143, 159, 207], 'setmap': [128, 129, 143, 147, 160, 161, 176, 179, 207, 249, 250], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00cd7a9460>}], 'a06dfa4bb30062744387fbb9b7b3dbe9': [{'instance': {'host': '192.168.1.75', 'eojgc': 1, 'eojcc': 53, 'eojci': 1, 'getmap': [128, 160, 192, 240, 129, 241, 130, 242, 243, 132, 133, 134, 136, 137, 138, 139, 140, 252, 157, 253, 158, 159], 'setmap': [128, 129, 160, 243], 'uid': None, 'manufacturer': 'Sharp'}, 'echonetlite': <custom_components.echonetlite.ECHONETConnector object at 0x7f00bd37b070>}]} has already been setup.. 2021-09-26 17:10:56 DEBUG (MainThread) [custom_components.echonetlite] Plaform entry data - {'instances': []}
Sensors should have been created for that air purifiers. can you update the custom component to the very latest version and let me know the logs again - i have put in some debugging statements to try to identify what is going on. Also after you add the air purifier, can you go back to the integrations page and take a screen shot of what you see in the ECHONET lite section.
Also looks like you are running a little behind in the code the config entry is a bit more robust now especially if the device does not respond to an ECHONET query.
Also can you run the 'example_async' against both air purifiers...
Okay have followed what you said. (I think) LOG.txt
I am now unable to add one device, and as you mentioned i was running an earlier version of your integration but have now updated.
The re-run of 'example_async' returned the following: 192.168.1.75 - ECHONET Instance 0x1-0x35-0x1 identification number discovered! [{'eojcc': '0x35', 'eojci': '0x1', 'eojgc': '0x1', 'getmap': ['0x80', '0xa0', '0xc0', '0xf0', '0x81', '0xf1', '0x82', '0xf2', '0xf3', '0x84', '0x85', '0x86', '0x88', '0x89', '0x8a', '0x8b', '0x8c', '0xfc', '0x9d', '0xfd', '0x9e', '0x9f'], 'host': '192.168.1.75', 'manufacturer': 'Sharp', 'setmap': ['0x80', '0x81', '0xa0', '0xf3'], 'uid': None}]
.175 is not working. Its either not echonetlite compatible or a setting needs to be enabled..
Get Outlook for iOShttps://aka.ms/o0ukef
From: glockpete @.> Sent: Sunday, September 26, 2021 6:42:17 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
Okay have followed what you said. (I think) LOG.txthttps://github.com/scottyphillips/echonetlite_homeassistant/files/7231022/LOG.txt )
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-927261105, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDHBTBU74EHEEDWEFSDUD3MGTANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
So not working with .175?? You may need to edit the 'example_async' file to update the IP address to .175
Also, is .75 creating anything on the integrations page as a Device?
.175 is not working. Its either not echonetlite compatible or a setting needs to be enabled..
Agreed its probably a problem my end as there are no instructions on how to enable echonet lite on them. but they are basically identical.
. Also, is .75 creating anything on the integrations page as a Device?
It appears on the integrations page but there is nothing added when click on the device.
so .75 doesn't show a device or install any entities? strange it should have configured sensors.
Can we forget about .175 for now and focus on .75 thanks, i will try to work out why the sensor creation is failing.
Was there anything in the current logs about "setting up sensor {entity}" or f"update flags for this sensor are.."
Can you delete .75 from your integrations reload home assistant and then re-add it? And then get me the logs again?
Here is the log once removed and added back. And the images are hopefully useful re no entities.
Can you please update the custom_component again with the very latest push, and reload Home Assistant thanks and then collect the logs again. I have had to update the sensor component to try to get a bottle on why this is breaking.. I have a sneaking suspicion as to why but need to confirm with your logs
Thanks I’m going to have to think about why this isn’t working. I don’t have a lot of time to spare either sorry so don’t expect anything overnight.
Get Outlook for iOShttps://aka.ms/o0ukef
From: glockpete @.> Sent: Sunday, September 26, 2021 7:23:50 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
Updated, reloaded, re-added. LOG.txthttps://github.com/scottyphillips/echonetlite_homeassistant/files/7231084/LOG.txt
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-927267975, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDEDSCTQK7F766ORVGTUD3RCNANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
No problem, thanks so much for all your hard work! I really appreciate it.
I actually think that it has created some sensors as it is trying to poll the API against .75 in the logs. They might not be under the integrations menu however so can you peruse through your full list of entries and see if any related to your air purifier are under the entities register.
Get Outlook for iOShttps://aka.ms/o0ukef
From: glockpete @.> Sent: Sunday, September 26, 2021 7:33:27 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
No problem, thanks so much for all your hard work! I really appreciate it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-927269645, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDA253Z3KWAZHGXOHEDUD3SGPANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@glockpete Did you figure this one out?
@glockpete Did you figure this one out?
Sadly not..
@scottyphillips I have had another look, and in regards to the Air Purifier issue, I can see that after adding the device to the Echonet intergration, a entry is made in the "core.config_entries" BUT nothing is created in the "core.device_registry" and "core.entity_registry" as would have been expected. Not sure if that is of any use.
Thanks again
Sorry, i can’t really work this out without having access to a similar device to test frequently with…. I don’t really have the spare time either. 😞
Thanks to leonunix and his awesome contribution; he has coded the air purifier class into the pychonet library which I’ll be merging later today. I am going to assume he is also working on implementing the home assistant component 🥰 so possibly we may see this issue resolve in the near future..
Okay, I've made a tweak to the code to hopefully prevent non-standard ECHONET codes from trying to be created as sensors. Can you pull the latest version and try to add your air purifier again, and fetch me the log?
@leonunix were you interested in testing this as well, since you contributed code to the pychonet library?
@scottyphillips yes. I will do a test with non-standard codes.
@leonunix thanks for your amazing effort. @glockpete can you update to latest and see if working.
Will have a look and let you know. Thanks so much to both of you!! @scottyphillips @leonunix
@scottyphillips Attached are the logs and a screenshot. Appears to be a few issues. The positives are that the AP power and Fan Control work fine.
Have you rebooted home assistant a couple of times to confirm the error is consistent?
I can replicate that error, but it only occurs when the HVAC in question is not able to be reached by Home Assistant. So please verify IP network connectivity for both of your offline systems and let me know. Otherwise I have just validated that the latest code has no dramas with multiple HVAC systems and to be honest I would have expected other people would have complained by now.
From: glockpete @.> Reply-To: scottyphillips/echonetlite_homeassistant @.> Date: Saturday, 15 January 2022 at 1:12 am To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>, Mention @.***> Subject: Re: [scottyphillips/echonetlite_homeassistant] Air Purifier Support (#48)
Attached are the logs. Appears to be a few issues.
Logs.txthttps://github.com/scottyphillips/echonetlite_homeassistant/files/7870832/Logs.txt [Image removed by sender. Screenshot]https://user-images.githubusercontent.com/52880723/149528770-d54e97a3-e698-4d3f-b2fb-d26fd1d6c177.png
— Reply to this email directly, view it on GitHubhttps://github.com/scottyphillips/echonetlite_homeassistant/issues/48#issuecomment-1013150499, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGHQNDCXOQVBY6RRIYMM2OLUWAVK5ANCNFSM5ED7PI7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>
I have updated the code so the devices will be polled even if offline but will report 'unavailable'. The KeyError will no longer appear. As mentioned can you please download latest code, verify network connectivity for your two offline HVAC devices and try again.
Also; I am assuming your devices have a static IP address assigned?
Not sure how easy it is but could I ask if this is a possibility. An example of the type of device Sharp KI-HS70 Thanks as always.