Closed aftertommy closed 2 years ago
Sure we can take a look. Try adding the device via it’s IP address and let me know what the output is.
Thanks! This appears to be the only echonetlite related logging I can find in the home assistant log around the time I tried adding the device:
Logger: homeassistant
Source: custom_components/echonetlite/sensor.py:282
Integration: ECHONETLite ([documentation](https://www.github.com/scottyphillips/echonetlite_homeassistant), [issues](https://github.com/scottyphillips/echonetlite_homeassistant/issues))
First occurred: 10:52:47 AM (1 occurrences)
Last logged: 10:52:47 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pychonet/echonetapiclient.py", line 69, in echonetMessageReceived
await update_func(isPush)
File "/config/custom_components/echonetlite/__init__.py", line 327, in async_update_callback
await update_func(isPush)
File "/config/custom_components/echonetlite/sensor.py", line 282, in async_update_callback
changed = self._state_value != self._instance._update_data[self._op_code]
KeyError: 180
So, it just errored out when you tried to add the device?
Get Outlook for iOShttps://aka.ms/o0ukef
From: aftertommy @.> Sent: Thursday, September 1, 2022 11:54:55 AM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Support for IP/JEM-A Switches (Issue #109)
Thanks! This appears to be the only echonetlite related logging I can find in the home assistant log around the time I tried adding the device:
Logger: homeassistant Source: custom_components/echonetlite/sensor.py:282 Integration: ECHONETLite (documentation, issues) First occurred: 10:52:47 AM (1 occurrences) Last logged: 10:52:47 AM
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pychonet/echonetapiclient.py", line 69, in echonetMessageReceived await update_func(isPush) File "/config/custom_components/echonetlite/init.py", line 327, in async_update_callback await update_func(isPush) File "/config/custom_components/echonetlite/sensor.py", line 282, in async_update_callback changed = self._state_value != self._instance._update_data[self._op_code] KeyError: 180
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fscottyphillips%2Fechonetlite_homeassistant%2Fissues%2F109%23issuecomment-1233640469&data=05%7C01%7C%7C10505013bb92449eeb0a08da8bbcf840%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975941004881323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3NJnxxIwldYYyhD9DBTVMmpEwA6utta55r9hw1C0irY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGHQNDBYB3JNH3WVDUKPX4DV4AEG7ANCNFSM6AAAAAAQB3YFTQ&data=05%7C01%7C%7C10505013bb92449eeb0a08da8bbcf840%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975941004881323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BfsTvOnfN7rgpzJ6YwCRLm9oBQa9asPYDugX7C9SQCA%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
Yes that's correct.
Add some debug logging to your config.yaml reload and try to add it again. Let me know what the output is.
logger: default: warning logs: custom_components.echonetlite: debug
Get Outlook for iOShttps://aka.ms/o0ukef
From: Scott Phillips @.> Sent: Thursday, September 1, 2022 11:58:56 AM To: scottyphillips/echonetlite_homeassistant @.>; scottyphillips/echonetlite_homeassistant @.> Cc: Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Support for IP/JEM-A Switches (Issue #109)
So, it just errored out when you tried to add the device?
Get Outlook for iOShttps://aka.ms/o0ukef
From: aftertommy @.> Sent: Thursday, September 1, 2022 11:54:55 AM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Support for IP/JEM-A Switches (Issue #109)
Thanks! This appears to be the only echonetlite related logging I can find in the home assistant log around the time I tried adding the device:
Logger: homeassistant Source: custom_components/echonetlite/sensor.py:282 Integration: ECHONETLite (documentation, issues) First occurred: 10:52:47 AM (1 occurrences) Last logged: 10:52:47 AM
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pychonet/echonetapiclient.py", line 69, in echonetMessageReceived await update_func(isPush) File "/config/custom_components/echonetlite/init.py", line 327, in async_update_callback await update_func(isPush) File "/config/custom_components/echonetlite/sensor.py", line 282, in async_update_callback changed = self._state_value != self._instance._update_data[self._op_code] KeyError: 180
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fscottyphillips%2Fechonetlite_homeassistant%2Fissues%2F109%23issuecomment-1233640469&data=05%7C01%7C%7C10505013bb92449eeb0a08da8bbcf840%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975941004881323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3NJnxxIwldYYyhD9DBTVMmpEwA6utta55r9hw1C0irY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGHQNDBYB3JNH3WVDUKPX4DV4AEG7ANCNFSM6AAAAAAQB3YFTQ&data=05%7C01%7C%7C10505013bb92449eeb0a08da8bbcf840%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975941004881323%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BfsTvOnfN7rgpzJ6YwCRLm9oBQa9asPYDugX7C9SQCA%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
This appears to be the relevant logging:
2022-09-01 11:35:24 DEBUG (MainThread) [custom_components.echonetlite.config_flow] IP address is 192.168.40.15
2022-09-01 11:35:24 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery
2022-09-01 11:35:47 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONET Node Discovery Failed!
It's strange -- I'm able to ping the devices just fine. I have 3 of these adapters and each results in the above logging.
Using the SSNG iOS tool from the support center appears to work. It's not the most straightforward interface, but it gives me this data:
EOJ: 05FD01
ESV: 61
EPC: 80
EDT: 30, 31
EPC: 81
EDT: 00, 08, 10, 18, 20, 28, 30, 38, 40, 48, 50, 58, 60, 68 70, 78, FF
EPC: F1
EDT: [2 byte hex]
ESV: 62
EPC: 80, 81, 82, 83, 88, 8A, 8C, 9D, 9E, 9F, F0, F1
I hope this information helps.
I need all the log output sorry. There are logs messages missing.
Get Outlook for iOShttps://aka.ms/o0ukef
From: aftertommy @.> Sent: Thursday, September 1, 2022 1:12:33 PM To: scottyphillips/echonetlite_homeassistant @.> Cc: Scott Phillips @.>; Comment @.> Subject: Re: [scottyphillips/echonetlite_homeassistant] Support for IP/JEM-A Switches (Issue #109)
Using the SSNG iOS tool from the support centerhttps://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsh-center.org%2Fsdk%2Fssngios&data=05%7C01%7C%7Ccf0cd76f712546e9f02f08da8bc7d05e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975987571895715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=rBRyE01oT16HA6GD72MqRPfFY3emaGRSDrUaq%2B%2BSkOo%3D&reserved=0 appears to work. It's not the most straightforward interface, but it gives me this data:
EOJ: 05FD01 ESV: 61 EPC: 80 EDT: 30, 31 EPC: 81 EDT: 00, 08, 10, 18, 20, 28, 30, 38, 40, 48, 50, 58, 60, 68 70, 78, FF EPC: F1 EDT: [2 byte hex] ESV: 62 EPC: 80, 81, 82, 83, 88, 8A, 8C, 9D, 9E, 9F, F0, F1
I hope this information helps.
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fscottyphillips%2Fechonetlite_homeassistant%2Fissues%2F109%23issuecomment-1233684455&data=05%7C01%7C%7Ccf0cd76f712546e9f02f08da8bc7d05e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975987571895715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tzARNiFBihPt8E7gOElYj79TwL9AJtr99z%2FrLZHV2do%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGHQNDCQQVSPUTR2U5PXY5DV4ANKDANCNFSM6AAAAAAQB3YFTQ&data=05%7C01%7C%7Ccf0cd76f712546e9f02f08da8bc7d05e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637975987571895715%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VTV%2FPI%2BJNzame1NsZjoVR7Ye9SnOJrrrtjcLQq8a9bM%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
How can I provide you that logging? This appears to be the only logging coming from custom_components.echonetlite
. I just tried again after a restart and it's the same output.
The error message indicates that the response does not contain data that should be included in get properties. This may be a bug in the Panasonic device, making the integration ignore it may fix it.
I'm not very familiar with python, and I'm much less familiar with echonet lite as a protocol, but I'm happy to try steps out in a python repl with pychonet if that would help.
Now try the following on the command line and let us know the result.
python3 -m asyncio
from pychonet.lib.udpserver import UDPServer
from pychonet import ECHONETAPIClient as api
udp = UDPServer()
loop = asyncio.get_event_loop()
udp.run("0.0.0.0", 3610, loop)
server = api(udp)
server._debug_flag = True
await server.discover('192.168.40.15')
Both pychonet
and the home assistant plugin appear to discover the device now after a few more restarts. Here's what I get from the JEM-A adapter at 192.168.40.14
:
>>> await server.discover('192.168.40.14')
ECHONETLite Message Received - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 1, 'SEOJGC': 14, 'SEOJCC': 240, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 114, 'OPC': [{'EPC': 138, 'PDC': 3, 'EDT': b'\x00\x00\x0b'}, {'EPC': 131, 'PDC': 17, 'EDT': b'\xfe\x00\x00\x0b\x00\x00\x0e\xf0\x01L6N\xff\xfe\xce\xd6\xa0'}, {'EPC': 214, 'PDC': 4, 'EDT': b'\x01\x05\xfd\x01'}]}
True
While the device appears to be added, it's a bit finicky:
OFF
position, and the shutter is open (i.e.: it is not covering the window)ON
, and the shutter begins to close (i.e.: it covers the window)OFF
This is what I see when doing the above:
Close:
2022-09-01 19:45:32 DEBUG (MainThread) [custom_components.echonetlite] ECHONETLite Message Received - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 354, 'SEOJGC': 5, 'SEOJCC': 253, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 113, 'OPC': [{'EPC': 128, 'PDC': 0, 'EDT': b''}]}
Press Once from OFF to ON
2022-09-01 19:46:16 DEBUG (MainThread) [custom_components.echonetlite] ECHONETLite Message Received - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 355, 'SEOJGC': 5, 'SEOJCC': 253, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 113, 'OPC': [{'EPC': 128, 'PDC': 0, 'EDT': b''}]}
Press Once from ON to OFF (opens)
2022-09-01 19:46:17 DEBUG (MainThread) [custom_components.echonetlite] ECHONETLite Message Received - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 356, 'SEOJGC': 5, 'SEOJCC': 253, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 113, 'OPC': [{'EPC': 128, 'PDC': 0, 'EDT': b''}]}
It seems to be the same issue as #110. There is a bug in the pychonet library and I will fix this.
Ok! I'm happy to verify and close both issues after!
pychonet 2.3.3 was released. so please try "pychonet==2.3.3"
.
to
"requirements": [
"pychonet==2.3.3"
],
Great! Thank you! Is it just literally updating the local manifest file and restarting home assistant?
2022/09/03 10:28、Naoki Sawada @.***>のメール:
pychonet 2.3.3 was released. so please try "pychonet==2.3.3".
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
Yes, that's right. Be sure to restart HA.
It's working! Thank you! I tested this for the water heater as well and it appears to work. Shall I close these?
Ah. Hm. I just tried again and the switch appears to go back to OFF...
And just like that I can't get it to reproduce again. Might just be a fluke and it's working now. Here were my steps:
pychonet==2.3.3
要するに: I believe this is resolved, and along with 110. Shall I close these? I can open a new issue if I encounter any strangeness.
(and thank you!!!)
Thank you for your validation. I am glad that this issue has been resolved.
Since wireless LAN is used, it may become unstable depending on the radio wave conditions. On unstable devices, forcing polling in the configuration may give good results.
I will close this as the next version 3.6.1 will be released with this issue fixed. Thanks! 👍
@aftertommy Version 3.6.2 has been released. It contains a modification that provides a more stable response.
giving it a shot!
This looks to be working!
Now that there's support for water heater switches and the like, it would be fantastic if there was support for IP/JEM-A switches. I have a number of shutters in the home that are connected to these -- I believe they are compatible with Echonetlite:
https://echonet.jp/introduce/gz-000761/
This whole project is fantastic. Thank you so much for making it.