Closed xen2 closed 1 year ago
@xen2 If you manipulate two lights quickly, does the state of the device match the content of the response? If it matches, there is a high possibility that it is a limitation of the device specifications.
Incorporating a retry function will cause a drop in response in the event of a true error, so careful consideration is required.
After carefully reading the ECHONET Lite specifications, it states that when making consecutive requests to a device, wait for a response before making the next request. It seems that the controller design should conform to that.
@xen2 I'm working on a fix for a problem with making back-to-back requests. Could you try the modified code for #58?
Add support SingleFunctionLighting (as used by Advance Link Plus Wireless adapter WTY2001).
Note: in practice, when changing two lights very quickly (sending two message for change before first message came back), it seems
setMessage
returns false. https://github.com/scottyphillips/pychonet/blob/master/pychonet/EchonetInstance.py#L66I could think of several options to fix it:
setMessage
in pychonetsetMessage
(I am not sure about the exact scope for such a lock, is it a limitation per host/system in which case the lock should be per host/system? is it only for this specific hardware device WTY2001 or a general ECHONET lite restriction?)For now I did the fix 1, and it works fine. I think I saw you did a similar fix for getting property map already?