Using the Observatory panel with a rolloff roof
(the attachments are reversed)
The third screen shot is at initial Ekos startup and the state of the roof is unclear to me. The Observatory shows it to already be open. From the rolloff simulator view it is does not provide a visual indication but it is actually closed.
The second screenshot is after pressing the Observatory park button. The Observatory now indicates both open and closed (bcause it fails to complete) and the rolloff error indicates it considered it to have already been closed.
You can not get them in sync and working by using either's Park/Unpark buttons. But if you use the Rolloff Open/Close to sync them up, the Observatories Park/Unpark buttons then work.
Running the scheduler from initial conditions using simulators appears to reflect the issue. There is a Dome already unparked message logged by the simulator and the rolloff's indi panel indicates no attempt to open the roof from its closed position.
There might be other issues with scheduling simulators, focusing failed and it looped on shutdown issuing mount unparked messages.
when your roof fails to open, in which INDI state does it end? DOME_UNPARKING?
Could you provide the logs?
If you have an idea with the animation - a link to a good looking image would be sufficient - just let me know.
Is there any real rolloff roof implementation out there? I took a first look into the rolloff roof simulator roll_off.cpp. The rolloff roof simulator is a simple dome that can park and accepts aborts.
I think the interface as well can be updated to be more friendly with rolloff drivers. The -1.0 angle for example should be replaced with NA maybe image of simple roof open/close. We can have similar animation for dome as well, simple but it provides quick idea on its status visually.
My problem: there seems to be no obvious way how to make a distinction between domes and roofs. Is a missing azimuth position of the dome the indicator for being a rolloff roof? That's the reason why it shows "-1" as position, which indeed isn't very nice...
For the animation, we need to have Dome & Rolloff roof SVGs which can be manipulated. Maybe it's easier to start with a simple roof "open" and roof "closed" SVGs
The rolloff is at present passive with the Dome park status, it seems that it needs to intervene. I think for my purpose after initialization I will check the Dome status and get it to sync up with the roof switches. Prior to the Observatory I had just been using the open/close buttons to control the roof.
It appears the error is with the rolloff as can be seen in the inconsistency with the park buttons in the screenshot.
I don't seem to see the indi state externally and would need to setup for debug to look at it.
tg@chai ~]$ indi_getprop|sort|grep -i ino.dome
After the rolloff calls Dome::InitPark: examined the Dome's parked status and the Dome's state.
From the rolloff's indi window (reversed)
019-07-29T21:20:21: [INFO] Dome indicates it is parked
2019-07-29T21:20:21: [INFO] Dome state: DOME_IDLE
2019-07-29T21:20:21: [INFO] Dome parking data obtained
2019-07-29T21:20:21: [INFO] RollOff ino is online.
Observatory indicates Dome is unparked and can not be used to park the roof.
Made a change to my rolloff
In the rolloff's equivalent to SetupParms after the call to Dome:InitPark.
Get the Dome state and Dome park status. If isParked returns true and that agrees with the roof switches
but the Dome state is not a matching DOME_PARKED, change the Dome state to DOME_PARKED.
The Park button state is now compatible with the park status.
Observatory now indicates the Dome is parked and can be used to open the roof.
I am working on this topic, but it's not completed yet. I struggled a while with a bug in the INDI driver and just submitted a PR. The point is, that the INDI does not sync the park status and as a result, the parking mode displayed is wrong.
When I was looking for a kick starter I saw there was the rolloff roof simulator code as an example and took that as a framework. If using a Raspberry Pi in the observatory there is a WiringPi interface that could be used directly. I am not using a pi and chose to interface via a Arduino controller. A simple text based protocol was used between the INDI driver code and the Arduino using the Arduino's default USB connection.
The question you asked about connections, The Arduino uses a relay to control the Aleko's push button on/off connection. There is a mechanical switch at both the opened and closed positions of the roof that the Arduino can pickup along with a switch that gets closed when the roof's tie downs are closed to stop me from forgetting. How to force a close, you would just use the normal Ekos interfaces, using the Observatory panel or the INDI properties interface, the Weather monitoring drivers will also work as for other Dome rolloff drivers. For the Aleko motor the remote also still works.
I have only a few images of the build if interested and of course you are welcome to the software if you can use it to get going. For Ekos software I think there are various approaches including script control examples. You might get more visibility starting a new thread requesting examples of what people have done.
I just submitted a new diff that adds the necessary functionality for rolloff roofs. It would be great if you could test it. Hopefully, all points you mentioned are implemented.
Please be aware that the INDI driver had some small defects. They should be fixed with INDI 1.8.1. If you check out the latest version, it contains my fixes.