Location sending from app or reading from onstep to astroberry

Simon McNally

I have been playing with astroberry. When I download the location from onstep to astroberry the latitude is correct but the longitude reads zero.

Now I'm using the master branch (5.1?) And Im now unsure if onstep is not reading the location correctly from the app or if its not sending it correctly to astroberry.

I'm inclined to think it may not be reading from the app correctly (or the app is not sending it correctly) as my goto's to align are out by a similar amount no matter which star I slew to, until I sync then the goto's are pretty good. My longitude is -2. 

I'm using the master branch instead of the beta branch as slewing to an alignment star in the beta branch would send it into a completely wrong part of the sky, but the master branch is pretty close to where the star should be.

How can I diagnose this, my hardware is the wemos board and cnc shield.


Khalid Baheyeldin

You seem to have an underlying issue that is yet to be diagnosed.
The clue here is that you see a difference between beta and master in where the mount is pointing.

In order to diagnose this properly, you need to take Astroberry out of the picture temporarily.
Using only OnStep and the Android App, test the beta branch.

From the app, do the following, in exactly the same sequence:

Press on the 3 dot icon on the top right.
Then press "Observing Sites".
Then press "Use Current Location", this will display on screen the location that you are in via the phone's GPS.
Then press "Upload". Only after you do that, the current location is sent to OnStep and you get a confirmation message.

Then from the main page of the app, press "Initialize".
Then press "Set Date/Time"

Once you have done that, go to a planetarium on your PC/laptop, and find a star due east.
Then from the Android app, tell OnStep to slew to it.
See if the mount points roughly where the star should be.
Repeat with a star that is west of the meridian.

If the mount is pointing to the wrong place, then check the direction of motion when pressing East and West, while the mount is still pointing to the star in the east or star in the west (i.e. not when the mount is at the celestial pole).
East should make RA go counterclockwise (when looking from the north), and West should be clockwise.
Similarly, South should make the mount move south, and north to north.
Again, this is all while the mount is still pointing to a star, not the celestial pole.

If the movements are reversed, then you should use the AXISn_DRIVER_REVERSE ON option for that axis.

Report back after you have tested all the above, and we will advise further.

Simon McNally

Khalid, I actually only notice the location discrepancy when I was playing with astroberry. That is not being used at the moment.

With the master branch, with the scope pointing at the celestial pole (Approx as bench testing) i set the location and time as you have said, and which is the way I have been doing it. From there I goto beatulgeus and it move to about where it should be in the sky.

Using the beta branch but as above it moves sort of 90° out in both dec and RA.

There was no hardware changes, but I did use the same config for both beta and master.


Khalid Baheyeldin

There should be no reason at all for beta to have such a glaring discrepancy from master.

Please do the sequence of tests that I detailed (two stars in different sides of the meridian, and testing direction of motion when mount pointing to each star), and report back the results, before we can go further.

Simon McNally

Ok I will try again in the morning its getting late here in the UK.

However the previous tests I did were done exactly as you stated, only I was slewing between beatulgeus, m42, m45 and m31. Master was fine, beta was wrong. 

Do I need to change the software in the WiFi board as well, because off the top of my head I kept this at the revision on the master branch as I tried that first.

The following is just for added information. It was only reading posts here, that it was stated probably better to use the beta branch as the master branch is changing quite rapidly, so I flashed beta with the same generated config file. If I had not, I would not have noticed the discrepancy in position. However,  as the master branch was pointing approx correctly on the bench, i just went back to that version, and have successfully tracked both m42 and m31 with it on the same night, with m31 I belive on the other side of the meridian to m42. All controls from the app seem to work in the correct direction. Also the weather data is reported correctly on the app.

It was only after testing astroberry that I notice that it was reporting my longitude as 0.0.0 where the app had said it had uploaded it successfully to OnStep along with the time.

I am not using astroberry at the moment, I was just trying it out on a spare rpi 3, to see if I liked it before getting a rpi4 to run it. However it did make me wonder if my longitude was correct in OnStep as my goto's seemed enough out in RA for it to be a possibility that onestep did belive it was at 0° longitude and not at my position of around -2.

Khalid Baheyeldin


You probably don't need a different WiFi firmware when you flash master and beta. They are very
close (at least at present), and there would be no big differences in the commands sent to OnStep
from one or the other.

If Astroberry is just another KStars/Ekos/INDI combo, then there are different ways location and
date/time are handled. Under Settings -> Configure KStars -> INDI, there is "Time & Location".
You can make OnStep update KStars, or vice versa. For a Raspberry Pi, you probably want OnStep
to update KStars, so select "Mount Updates KStars" and check both Time and Location.

See if that solves the longitude zero problem that you are having or not.

But that is a separate issue from verifying that OnStep with app only is pointing correctly in
both sides of the meridian, and E/W/N/S work as intended (i.e. motors not reversed).

Simon McNally


Sorry for the late reply in this. I updated my system to have the LV8729 drivers @32 microsteps and 400 step motors. So I had to change the config to account for them. I used the spreadsheet and your online configuration for this, only needed to add in my BME280 manually. I tried both the master branch and the beta branch and now there is no discrepancy between either when I flash them. I'm not really sure what cured it, I think a rogue config file was probably the reason.

I have also updated to a RPi 4 for astroberry and started the setup of KStars and ekos from scratch. This now reads the position from the mount correctly, and operates my modified DSLR, DIY usb serial shutter cable, and a sb Sony 290 cctv camera for guiding.

It looks like it may be clear tonight, I may be able to test the mount and bit by bit add the RPi to automate it.

Attached are a couple of pics of what I will be testing, just need to do some cable clean up.

Thanks for you help, I'm sure there will be other questions soon!!