Extracting XML flow from Ocs possible ?


Hi Howard,
I’m building an Allsky just next to OCS, from time to time the camera under the dome will need some heating when humidity and temperature reach a certain level. An idea has crossed my mind that would be the possibility with OCS to give the sensor values to avoid installing new sensors. As OCS is a webserver i thought it would be possible to generate an xml output when a request is sent from a client. I really don’t know the effort  that would be necessary to make this but the idea seems interesting to me. I know how to program a small board (nano, micro) with a simple web client page, collect parameters from a webserver with actions to launch.
It is not a demand but a question as I know you are very busy with Onstep environment we are all enjoying.

Thanks in advance for your answer 

Howard Dutton

The OCS doesn't do XML :)

What it does have is an LX200 like protocol with :xxxx# framed commands and # terminated responses.  You can see the available commands in Command.ino, they include commands to return the temperature and humidity.
The command processor works with the Arduino Serial port but also with Ethernet.  For Ethernet you open the port, send the command, get the response, then close the port.  This allows multiple clients to talk to a single port at the "same" time (9999 and 9998 are active.)

There is only one serial port active in the OCS, just Arduino's "Serial" (where the USB/serial is) but adding others (Serial1 and Serial2 for example) is trivial.


That's exactly what i need, thanks Howard !
I'm going to test these commands  and let you know
In one post you talked about a project of builiging an OCS on an ESP32, is it for a distant future ? :);


All commands to get weather information work fine except temperature...