Closed jimboca closed 1 year ago
It looks like this is happening because it's trying to send UNSUB_MSG but there is no sid since a subscription hasn't been started previously?
Have you had it working any time recently? Could be related to the last change here: https://github.com/automicus/PyISY/commit/da839933585274ea866c205e6842263114c01e85 if you haven't used it since Jan-2022
Also, is this your nodeserver on PG3 or PG3 itself that's still running V2? I'd like to take a look at what it would take to move it to V4 (https://github.com/shbatm/pyisyox V1). Once I get this next version finished, I'm not intending to keep maintaining this repo since V4 has an entirely new structure.
I still have my node server which sets auto update: https://github.com/UniversalDevicesInc-PG3/udi-poly-hue-emu/blob/master/ISYHueEmu.py#L75 Which still works.
Now another nodeserver needs to use pyisy so I wanted to use the PG3 builtin method so users don't need to enter the ISY host/port/user/password: https://github.com/UniversalDevicesInc/udi_python_interface/blob/master/udi_interface/isy.py
My code calls init_isy to setup the isy/pyisy connection: https://github.com/UniversalDevicesInc-PG3/udi-poly-ELK/blob/master/nodes/Controller.py#L261 https://github.com/UniversalDevicesInc-PG3/udi-poly-ELK/blob/master/nodes/Controller.py#L508 and sets auto update which fails: https://github.com/UniversalDevicesInc-PG3/udi-poly-ELK/blob/master/nodes/Controller.py#L534
I'm sure Bob would appreciate you helping convert PG3 pyisy to your new pyisyox in the udi_interface.
I added this to both nodeservers:
pyisy_version = pkg_resources.get_distribution("pyisy").version
and confirmed they both user 2.1.6
BTW, my intention is to use pyisy contained in PG3, then I'd move my other nodeserver to use the same. Then we could look at converting both to use pyisy 3, now 4. I'd like to get on a supported version as well and understand you don't want to support 2.x, it's just painful to use an async library in a non-async program, but I've done it with a couple others so this was next...
I pushed a minor change to the V2 branch -- it looks like there's a larger issue buried in there: it looks like the stream is either not connecting on your ELF NS, or it's immediately disconnecting after sending the subscribe message (which is why there's no stream id)--which is why one NS is working and one is not throwing the same errors.
I'll take a closer look when I get a chance and see if there's an issue with how the PG3 library is connecting, if that's the main difference.
As for the async in a non-async module--one of my goals for pyisyox is to allow that asyncio loop to be self contained if necessary (similar to paho-mqtt). The biggest issue will be getting feedback for service calls to the ISY; it'll need a synchronizing function that blocks waiting for a response.
Thanks! I'll pull that version and test.
The only difference I can see is that PG3 uses https and my other nodeserver doesn't.
That would be great to have a self contained asyncio loop!
Sorry, think I found it... Indentation error, auto_update=True was inside a loop. So it is could still be a "bug", but hopefully I don't care. again sorry for wasting your time.
Polyglot 3 uses pyisy (yes still using 2.x) and when setting auto_update=True I get this error.