nrkno / sofie-emberplus-connection

Ember+ Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
20 stars 15 forks source link

Timeouts when using getElementByPath in v0.2.2 #41

Open phillipivan opened 2 days ago

phillipivan commented 2 days ago

When using version 0.2.2 I get timeouts when using the getElementByPath method, reverting to 0.2.1 the same code works ok.

This has been replicated connecting to two different Stagetec Ember Plus providers.

mint-dewit commented 2 days ago

Do you have more info about your usage of getElementByPath? Like what type of element are you using it on?

0.2.2 has made a change because the ember+ document is a bit ambiguous so it's possible your provider has interpreted in a slightly different way and is not responding to our request now.

phillipivan commented 2 days ago

Hi @mint-dewit, this is from the companion module which you have also worked on. I can test again tomorrow and take some more detailed notes, but I was trying both String and Integer elements.

phillipivan commented 1 day ago

Here is an extract from the logs when using companion module version 2.4.3 which uses emberplus-connection 0.2.2

Module-host accepted registration debug: Connecting 172.20.146.247:9000 info: Connected to 172.20.146.247:9000 debug: Start parameter registration debug: Attempt to subscribe to 1.2 debug: Registered for path "1.2" error: Failed to subscribe to path "1.2.0.7": Error: Request timed out error: Failed to subscribe to path "1.2.0.7": Error: Request timed out error: Failed to subscribe to path "1.2.6.1": Error: Request timed out error: Failed to subscribe to path "System.Firmware.Version": Error: Request timed out error: Failed to subscribe to path "Audio.Processing.InputProcessing#15.Gain": Error: Request timed out

I don't observe any problems with these elements using 0.2.1

I have also attached the Ember Tree for the device exported from Ember Plus Viewer.

nexus-compact.zip

mint-dewit commented 1 day ago

I was trying both String and Integer elements.

So you are working with parameters. Maybe your device does not support getDir commands on Parameters which would be off-spec but not entirely unexpected. Can you try to do a getDir manually on one of your Parameters? Preferably you would also just have this library cloned and be able to add some console.log statements in the getElementByPath status.

Here is an extract from the logs

These logs are just output from companion, they are unfortunately not actually helpful in the development of this library :)

phillipivan commented 1 day ago

I was trying both String and Integer elements.

So you are working with parameters. Maybe your device does not support getDir commands on Parameters which would be off-spec but not entirely unexpected. Can you try to do a getDir manually on one of your Parameters? Preferably you would also just have this library cloned and be able to add some console.log statements in the getElementByPath status.

I can look at trying this, but wont be for a couple of weeks as I will be away.

Here is an extract from the logs

These logs are just output from companion, they are unfortunately not actually helpful in the development of this library :)

Of course.