Switches Turn Off Unexpectedly

I noticed this in the last log I sent:

[07/01/24 12:32:56.374][DEBUG][Unknown][NONE] ASCOM Switch ASCOM.DigitalLoggers.Switch-4: Set switch state to True
[07/01/24 12:32:56.374][DEBUG][Unknown][NONE] ASCOM Switch ASCOM.DigitalLoggers.Switch-4: switch state reports 1

So it looks like an immediate good status return for that switch.

Switch 7 is not so lucky:

[07/01/24 12:32:56.620][DEBUG][Unknown][NONE] ASCOM Switch ASCOM.DigitalLoggers.Switch-7: Set switch state to True
[07/01/24 12:32:56.620][DEBUG][Unknown][NONE] ASCOM Switch ASCOM.DigitalLoggers.Switch-7: switch state reports 0

And then:

[07/01/24 12:32:56.620][ERROR][Unknown][NONE] Exception while attempting to set switch state => “ASCOM.DigitalLoggers.Switch-7” to “1.00” : Could not set switch “ASCOM.DigitalLoggers.Switch-7” to “1.00”! Switch does not reflect the desired state within 30 seconds. Attempted to set switch state 1 times…
at j0.ci(String A_0, Dictionary`2 A_1, Boolean A_2)

But no time has elapsed.

To answer your last questions, setting the switch manually works fine; no errors. Only errors on sequence run and those have always been immediate. I realize now I hadn’t communicated that fact to you. Sorry!

Wak! I spoke too quickly. SGP is still leaving devices connected.

Another pathway to the startup problem is Tools/Connect All Equipment. I get connection errors and the switches do not turn on at all. There is no way to turn them on using the tool. I put the log on Dropbox if you want to look at it:

https://www.dropbox.com/scl/fi/749pn2upkbuhvz1e2t2cj/sg_logfile_20240704213842.log?rlkey=kh4f79bpk917gb31ffsa815vz&dl=0

Do you have the logs for this? I am at a point right now where I seem to be chasing problems I cannot identify here locally.

Can you clarify what you mean here?

Here is the log for SGP leaving devices connected:

https://www.dropbox.com/scl/fi/ofgu7rjmt1e033w917ols/sg_logfile_20240705104049.log?rlkey=a8503ty3ui2fvchsb2jqapmlz&dl=0

Clarification, as requested:
When I use the tool, I get an immediate “ASCOM—Connected set end2”. This is the attempt to connect to the camera with no power. Clicking ok in that box, I get “Error connecting to QHYCCD-Cameras-Capture”.
Clicking ok to that box, I get more error boxes for the filter wheel and Robofocus server. Clicking ok to each boxe clears the window. At the end, with all the boxes cleared, the switches associated with those devices remain off.

OK, thanks. This is completely my fault (beta-life). A completely unrelated change seems to have diabled the option to disconnect. From your sequence, you can see the option is no longer enabled:

The changes that caused this are unrelated to what we have been chasing and involve moving these settings to a new area. I am looking at why the migration has seemingly failed, but, in the meantime, for any sequences you opened with the last beta, you’ll need to verify these setting. The “damage” should be isolated to only things found in the Sequence Settings window.

Once the options are set again, there appears to be no problem with them “sticking”

Apologies…

I hate to admit it but I didn’t even know those settings were there. Finally found the icon, set it, and made a run. About 5 seconds after devices disconnected, power was turned off to them. I also realize now that the settings box came up right below the selection icon - clever. I suspect that works for other icons as well. Ken, you’re too clever for me.

So now I think I can finally say that the switches will be quite useful to me in SGP.

It would still be nice to know why the switch activation errors that are supposed to take 30 seconds happen with no time elapsed; I hate unknowns.

I found by trial and error, using the countdown window and the DL web UI locally, that the lag seems somewhat inconsistent between getting errors and not. It appears to be as little as 3 seconds and as much as 7 seconds. I can also force errors by hitting “yes” within a second of when the switch appears to get turned on in the DL UI. So the camera takes on the order of a second or two after the power is turned on before it is power-ready.

Thanks,
Kent

One minor issue: if switches are turned on external to SGP and a sequence is run with all switches set to “unchanged” on start then SGP will display the message “Connecting to required switch devices” and not continue. Although already “on”, setting at least one switch change to “on” makes it work. Log at:

https://www.dropbox.com/scl/fi/23swssb38757na6tcm662/sg_logfile_20240707065401.log?rlkey=aafq74mnbzse1tpqonpdrvhyl&dl=0

Are you certain all the switch states are set to unchanged? When I open the sequence from the logs you attached, I see this:

image

Relatively sure, but that must be the wrong log. Sorry! I just made another run:

https://www.dropbox.com/scl/fi/wawfchpa000xfjv7dw4oc/sg_logfile_20240709110203.log?rlkey=1wcfhon7c9j1hnpe78jfad8gn&dl=0

Yes, thanks for this. I have been able to find and locate this issue for when you have switches available but are not using them. It will be in the next beta.

Thanks. Would it be possible to make “Tools/Connect All Equipment” work using the same logic as “Run Sequence” where it errors out then comes up with a time-out window after which it succeeds? Right now, I have to turn each switch on manually before using the tool or it fails on all devices does not turn them on.

Kent

Sorry, I’m still not clear on what you mean by “tool” here in this context.

I am, for obvious reasons, unable to reproduce this like you see it. What is the behavior that you see (as exactly as possible)? Are you saying it just fails immediately or something? But the switches are indeed in the state they should be in?

The context is that of SGP: Tools/Connect All Equipment.

Yes. It fails immediately (always has). If I try to use “Tools/Connect All Equipment” with no power yet, I get all the error messages for each device and at the end, nothing is turned on or connected. Here’s a log:

https://www.dropbox.com/scl/fi/gzvve4cim4ggrfpudet5x/sg_logfile_20240715093034.log?rlkey=pxbzzbmoh9e36oezoy9adxwbv&dl=0

BTW, I certainly don’t need the tool to power on and connect to devices. I can do that by individually powering them on and connecting them. It’s just a “nice to have” feature. Tools/Disconnect All Equipment works ok. Normally, I would use the sequencer and that works ok, even with errors, after the startup error timeout window goes away automatically.

Switches don’t work in a real sequence. The switches turned everything off before parking the scope and closing the dome. Log:

https://www.dropbox.com/scl/fi/w40u3ctuwqgftpftb0j8s/sg_logfile_20240831192117.log?rlkey=oklr81qypyy0vfmh7c2e2p1eq&dl=0

Seems like you switched back to the non-beta build? The changes we have been tracking here are present in 4.4.1.1398 and, confusing NOT in 4.4.1.1413

If this is a “version-confusion” error it is 100% my fault and I accidentally released a “non-beta” version under “4.4.1” when it should have been “4.4.0”.

In other words, the logs you attached are actually from 4.4.0.1413. The new global switch options are also not present in the version you’re using.

And also… the “accidental” versioning is due to a decision to use different versions for the upcoming beta and it just happened too early…

The release version of SGPro is indeed moving to 4.4.1 and we’ve made a decision to move the current beta, including the switch changes we worked through here, into SGPro 4.5. The next beta will be a version 4.5.X variant.

Indeed, you’re right. I did a lot of switching back and forth during our testing and must have left it in the previous version. Sorry about that, and thanks for setting me straight.

Kent

Hi Ken,

After I went to v1398, I still have an issue in the end sequence actions. The switches power off the devices before the devices are disconnected - they remain connected. This causes the AP V2 mount driver to hang, which causes SGP to hang until I go into Device Manager and kill the AP V2 driver or both. Log at:

https://www.dropbox.com/scl/fi/cned2es8z4dki3m4o31kk/sg_logfile_20240904201918.log?rlkey=hpg4l5vutwyxmd5dykexyp13b&dl=0

Kent