Implement ASCOM Alpaca ObservingConditions support#42
Merged
Conversation
Adds ObservingConditions as a second Alpaca device served from the same port and polling loop as the existing SafetyMonitor. Supported properties from the SQMeter ESP32: - temperature, humidity, dewpoint, pressure (BME280) - skyquality, skybrightness (TSL2591) - skytemperature, cloudcover (MLX90614 / IR delta) - averageperiod (always 0; averaging not supported) Unsupported properties (rainrate, starfwhm, wind*) return ErrNotImplemented so clients know not to retry. sensordescription and timesincemeasurement are fully implemented. refresh triggers the shared poller. /management/v1/configureddevices now lists both devices. A second UUID file (device-oc-uuid.txt) persists the ObservingConditions device UUID independently of the SafetyMonitor.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
- GetDriverInfo, GetDriverVersion, PutConnected true/false branches - sensorErrMsg status 1, 3, and default (unknown) cases via sensor error tests for CloudCover, DewPoint, Humidity, Pressure, SkyBrightness, and SkyTemperature - DefaultOCUUIDPath non-Windows path test (mirrors existing UUID/config path tests; Windows branch remains skip-guarded)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ObservingConditionsas a second ASCOM Alpaca device on the existing port and polling loop — no duplicate SQMeter polling, no second serviceErrNotImplementedfor the 5 unsupported properties (rainrate, starfwhm, wind*) so clients know not to retrysensordescriptionandtimesincemeasurementare fully implemented;averageperiodreturns 0 (no averaging)PUT /api/v1/observingconditions/0/refreshtriggers the shared poll immediately/management/v1/configureddevicesnow lists bothSafetyMonitorandObservingConditionsdevice-oc-uuid.txt) persists the OC device UUID independentlyFiles changed
internal/alpaca/observingconditions.goOCHandlerwith all OC endpointsinternal/alpaca/observingconditions_test.gointernal/alpaca/handlers.goAddConfiguredDevice+ updatedGetConfiguredDevicesinternal/config/paths.goDefaultOCUUIDPathhelpercmd/sqmeter-alpaca-safetymonitor/main.goOCHandlerREADME.mdTest plan
go test ./...— all packages passgo vet ./...— cleangofmt— no formatting changes