I am considering purchasing a Pegasus Astro Pocket Powerbox Advance Gen2. It looks like the SharpCap Switch Device interface will permit read/control access to the Powerbox functions through the Pegasus Astro Server, which I guess is part of the their Pegasus Unity platform.
In the Sharpcap docs, it looks like I have access via the SC sequencer to a lot of switch device functions, and I presume that these switch device functions are available via SharpCap Python as well? Also, I note that the Sharpcap manual shows a nice graphic using the Pegasus Astro as an example of a switch device. I see most of the Powerbox functionality in the graphic, but I don't see the ambient temperature and humidity data measured by the Powerbox. Is this accessible in the latest version of SharpCap, either via the SharpCap UI or at least via Python?
My focuser does not have a temperature sensor, so I currently use Python code to calculate the ambient temperature from my camera cooler power (usually to less than a degree error) and set the focus accordingly (well, there are some other calculations needed to do this in addition to calculating the temperature, but thats beyond the scope of this question). I was hoping to streamline my Python code and also get more accurate results by using Powerbox temperature data.
Pegasus Astro Powerbox temperature and humidity
Forum rules
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
-
lowenthalm
- Posts: 224
- Joined: Mon May 07, 2018 12:27 am
- admin
- Site Admin
- Posts: 17454
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Pegasus Astro Powerbox temperature and humidity
Hi,
I just checked as I have a Pegasus power box, and oddly you cannot see the humidity or temperature readouts via the ASCOM driver, and since SharpCap just mirrors what the ASCOM driver makes available then you don't get access to them in SharpCap either.
It's a bit odd, since I can't see any reason why the Pegasus driver couldn't make the temperature/humidity available as read only values (like the current readouts, etc). It might be worth asking them if they can do that...
Another option would be to investigate whether there are any cheap USB thermometers that you could use and read via Python.
cheers,
Robin
I just checked as I have a Pegasus power box, and oddly you cannot see the humidity or temperature readouts via the ASCOM driver, and since SharpCap just mirrors what the ASCOM driver makes available then you don't get access to them in SharpCap either.
It's a bit odd, since I can't see any reason why the Pegasus driver couldn't make the temperature/humidity available as read only values (like the current readouts, etc). It might be worth asking them if they can do that...
Another option would be to investigate whether there are any cheap USB thermometers that you could use and read via Python.
cheers,
Robin
-
lowenthalm
- Posts: 224
- Joined: Mon May 07, 2018 12:27 am
Re: Pegasus Astro Powerbox temperature and humidity
I had been intending to get a USB thermometer with logging functionality, but since the PowerBox came with one, I figured I would kill two birds with one stone. However, it seems nothing is ever simple!
I queried Pegasus and they got back to me immediately, which was encouraging to see. They suggested going to the following page:
https://pegasusastro.com/products/pocke ... ance-gen2/
and them scrolling down to "Documentation & Software" and looking at the "Misc" tab which gets you to this bit of documentation:
Serial Command Table for PPB Advance (Oct/23)
I guess the only way is to talk to the PowerBox directly via the serial port its bound to and using their serial commands. The pertinent command is "PA" (Print Power and Sensor Readings), with the following example and response explainer:
Transmit: PA
Receive: PPBA:12.2:0.5.22.2:45:17.2:1:1:120:130:1:0:1
Meaning:
PPBA:voltage:current_of_12V_outputs_:temp:humidity:dewpoint:quadport_status:adj_output_status:dewA_power:dewB_power:autodew_bool:pwr_warn:pwradj
I pinged them back late Friday asking if talking to the box directly via the serial port will work nicely with their ASCOM driver and Unity platform all wanting to control the thing via the serial port too. Hopefully, they are willing to share the COM port with my Python script... or maybe there is a way of sending a raw command through the ASCOM driver so it all routes gracefully through the same communications channel. They haven't responded on that one yet - hopefully I will hear from them early next week.
I queried Pegasus and they got back to me immediately, which was encouraging to see. They suggested going to the following page:
https://pegasusastro.com/products/pocke ... ance-gen2/
and them scrolling down to "Documentation & Software" and looking at the "Misc" tab which gets you to this bit of documentation:
Serial Command Table for PPB Advance (Oct/23)
I guess the only way is to talk to the PowerBox directly via the serial port its bound to and using their serial commands. The pertinent command is "PA" (Print Power and Sensor Readings), with the following example and response explainer:
Transmit: PA
Receive: PPBA:12.2:0.5.22.2:45:17.2:1:1:120:130:1:0:1
Meaning:
PPBA:voltage:current_of_12V_outputs_:temp:humidity:dewpoint:quadport_status:adj_output_status:dewA_power:dewB_power:autodew_bool:pwr_warn:pwradj
I pinged them back late Friday asking if talking to the box directly via the serial port will work nicely with their ASCOM driver and Unity platform all wanting to control the thing via the serial port too. Hopefully, they are willing to share the COM port with my Python script... or maybe there is a way of sending a raw command through the ASCOM driver so it all routes gracefully through the same communications channel. They haven't responded on that one yet - hopefully I will hear from them early next week.
-
lowenthalm
- Posts: 224
- Joined: Mon May 07, 2018 12:27 am
Re: Pegasus Astro Powerbox temperature and humidity
A short time after writing my previous post on the response I got from Pegasus, I noticed a later e-mail answering my follow-up question. They say:
They are really quickly responsive to queries! Nice.
So its just not in the main PowerBox ASCOM driver. They hid it elsewhere. Unity platform = multiple ASCOM drivers. He he.Sensor data are accessible from ASCOM observing conditions driver.
They are really quickly responsive to queries! Nice.
- admin
- Site Admin
- Posts: 17454
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Pegasus Astro Powerbox temperature and humidity
Ah, yes, that would make sense!
Unfortunately SharpCap doesn't have support for observing conditions drivers, but I just checked in NINA and can see the temperature/humidity by using that driver.
I think you should be able to get to this using Python in SharpCap - something like
Hope this helps,
Robin
Unfortunately SharpCap doesn't have support for observing conditions drivers, but I just checked in NINA and can see the temperature/humidity by using that driver.
I think you should be able to get to this using Python in SharpCap - something like
Code: Select all
clr.AddReference("ASCOM.Com")
from ASCOM.Com.DriverAccess import ObservingConditions
oc = ObservingConditions("ASCOM.ObservingConditions 1") # This is the ID for the Pegasus driver - odd that it doesn't have 'pegasus' in the string
oc.SetupDialog() # once only - to setup to use the power box as the source of data
oc.Connected = True
print (oc.Temperature)
print (oc.Humidity)
Robin