×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

INDI support for PrimaluceLab ESATTO 2" MotorFocuser

  • Posts: 2
  • Thank you received: 0
Hi - Has there been any progress on this? Been lurking and following this since Dec. It's now the only blocker for me totally ditching ASCOM (and Windows). I raised the question of native INDI support the to PrimaLuca CEO, but I got a lukewarm response... Be happy to try hitting them up again, but it would probably better better if we could find one of the engineers?
3 years 10 months ago #53781

Please Log in or Create an account to join the conversation.

It's already supported in INDI, check the nightly release.
3 years 10 months ago #53807

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 5
Awesome,

but how can I add it to Astroberry server (well, Raspbian/buster actually) ?
3 years 10 months ago #53875

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
Thanks! That's awesome, but I think I must be missing something... I looked through the source on GitHub and I don't see any mention of the Esatto. The only focuser from Prima Luce I see is is the SestoSenso2. (There wasnt in the 3rd party repo either.) Are we saying that the Sesto driver works for the Esatto? I wasnt able to test it myself since I'd have to rebuild everything from my current Win/ASCOM setup. I want to do that, but Id like to know this is going to work first.
3 years 10 months ago #54107

Please Log in or Create an account to join the conversation.

oh I'm sorry.. right it's SestoSenso2 that supported. ESTATO uses different commands? If yes, then no driver for that yet.
3 years 10 months ago #54141

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 5
Hello.

I dont know actually what commands uses existing driver and just start my journey with Linux so it is abit complicated for me to read all the drivers source, but I run serail port monitor and get next results for ESATTO 2.

ESATTO 2 (and i bielieve 3) uses Silicon labs CP210 USB to UART bridge.
After connection on comport (which is was 10 on both my computers) there is continiusly data transfer which looks like
{"req":{"get": ""}}} - and I bieleve it is request form original software

the answer is JSON (or similar)
<code>
{"res":
{"get":
{"SN":"ESATTO20101","MACADDR":"70:B3:D5:32:91:28","MODNAME":"ESATTO2","WIFI":
{"CFG":0,"SSID":"ESATTO20101","PWD":"primalucelab"},
"SWVERS":
{"SWAPP":"1.2","SWWEB":"1.2"},
"EXT_T":"-127.00","VIN_12V":"14.04","VIN_USB":"5.30",
"PRESET_1":{"NAME":"","M1POS":0},
"PRESET_2":{"NAME":"","M1POS":0},
"PRESET_3":{"NAME":"","M1POS":0},
"PRESET_4":{"NAME":"","M1POS":0},
"PRESET_5":{"NAME":"","M1POS":0},
"PRESET_6":{"NAME":"","M1POS":0},
"PRESET_7":{"NAME":"","M1POS":0},
"PRESET_8":{"NAME":"","M1POS":0},
"PRESET_9":{"NAME":"","M1POS":0},
"PRESET_10":{"NAME":"","M1POS":0},
"DIMLED_1":200,"DIMLED_2":200,"DIMLED_3":200,
"MOT1":
{"ABS_POS":191263,"SPEED":0,
"STATUS":{"HIZ":1,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":0,"DIR":0,"MST":"stop"},
"CAL_MAXPOS":439000,"CAL_MINPOS":0,"CAL_STATUS":"stop","HSENDET":0,"NTC_T":"16.92","LOCKMOV":1},
"DIMLEDS":"on"}
}
}
</code>

each transmission from hardware ends with
<LF>

I tried to undestand what each part of JSON means:
Where SN - should be SN
MACAADR is address of wifi onboard
MODNAME obiviosly sis model name
"WIFI":{"CFG":0,"SSID":"ESATTO20101","PWD":"primalucelab"} - wifi network config
SWVER - software version
EXT T - used for external T .Probe which is not installed on my setup.
"VIN_12V":"14.04","VIN_USB":"5.30" voltage on 12v input and USB
Presets it is presets which can be stored for future use (my is empty)
DIMLEDS it is should be a parameters for onboard leads (there is three of them)

And most inetresting thing is MOT1 section
ABS_POS":191263,"SPEED":0 absolute position. May confirm that is position which indicates in software. Speed - will test it but should be or focuser speed at the moment or settings for speed
I have no clue what STATUS section means...
But "CAL_MAXPOS":439000,"CAL_MINPOS":0 that is a calibration settings for min and max.
NTC_T":"16.92 is internal T.probe data

Moving of focuser is achieved by sending command {"req":{"cmd":{"MOT1":{"GOTO":204222}}}}
After move complete there is respond transmiting from software {"res":{"cmd":{"MOT1":{"GOTO":"done"}}}}

When the motor moves standart comms continues I droped all messages and just show you MOT1
Right after command
"MOT1":{"ABS_POS":204091,"SPEED":9024,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":1,"DIR":0,"MST":"acc"}
"MOT1":{"ABS_POS":204091,"SPEED":27335,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":1,"DIR":0,"MST":"acc"}
"MOT1":{"ABS_POS":195834,"SPEED":66560,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":1,"DIR":0,"MST":"CstSpeed"}

after sending MOT_STOP. Please beaware respond <code>{"res":{"cmd":{"MOT1":{"MOT_STOP":"done"}}}}</code> was recivied before that status
"MOT1":{"ABS_POS":179489,"SPEED":55843,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":1,"DIR":0,"MST":"dec"}
"MOT1":{"ABS_POS":172091,"SPEED":40624,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":1,"DIR":0,"MST":"dec"}
"MOT1":{"ABS_POS":168608,"SPEED":0,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":0,"DIR":0,"MST":"stop"}


DIM LEDS OFF
{"req":{"cmd":{"DIMLEDS":"off"}}}
respond
{"res":{"cmd":{"cmd":"done"}}}

MOTOR STOP COOMMAND
{"req":{"cmd":{"MOT1":{"MOT_STOP":""}}}}
respond
{"res":{"cmd":{"MOT1":{"MOT_STOP":"done"}}}}

To run a CALIBRATION
{"req":{"set":{"MOT1":{"CAL_STATUS":"exec"}}}}
respond
{"res":{"set":{"MOT1":{"CAL_STATUS":"done","STATUS":{"HIZ":1,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":0,"DIR":0,"MST":"stop"},"HSENDET":0}}}}

after that calibration process starting . status messagesMOT1 section looks like
"MOT1":{"ABS_POS":1999870,"SPEED":40263,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":0,"DIR":0,"MST":"CstSpeed"},"CAL_MAXPOS":439000,"CAL_MINPOS":0,"CAL_STATUS":"exec","HSENDET":0,"NTC_T":"16.06","LOCKMOV":1}
we can see motor speed and status of calibration EXEC
after CALIBRATION Is done
"MOT1":{"ABS_POS":0,"SPEED":0,"STATUS":{"HIZ":0,"UVLO":0,"TH_SD":0,"TH_WRN":0,"OCD":0,"WCMD":0,"NOPCMD":0,"BUSY":0,"DIR":0,"MST":"stop"},"CAL_MAXPOS":439000,"CAL_MINPOS":0,"CAL_STATUS":"stop","HSENDET":1,"NTC_T":"16.06","LOCKMOV":1}



That information should be enought to create first version of simple driver. I can test it . I will try to create my own driver but need to read all the tutorials and it takes some time) For skilled and familiar with INDI engenner is should be much faster
if someone will work on driver i can provide any additional info
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 3 years 10 months ago by Kirill. Reason: mistypo
3 years 10 months ago #54332

Please Log in or Create an account to join the conversation.

Great investigation! You can check the source code for the existing focusers and start from there, it's not really very difficult once you get the hang of it. You just need to process the JSON and the rest is the same like the other drivers. Let me know if you run into any difficulties.
The following user(s) said Thank You: Kirill
3 years 10 months ago #54333

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 5
Thanks!

Well, looks like no clear sky for me all the week. Why not to try to make my first driver ?)
The following user(s) said Thank You: Jasem Mutlaq, Jim
3 years 10 months ago #54339

Please Log in or Create an account to join the conversation.

Awesome idea!! I found that openweathermap driver uses JSON and it's using them via gason.h/cpp files in drivers/weather.. so you can copy these two files to drivers/focuser to get started and then later I'll make both your driver and weather use them from a single location. But any rate, at at this, just simply copy them over to drivers/focuser so you can work on it from there.
3 years 10 months ago #54342

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 5
I just made quick check on SESTO SESNO 2 driver and looks like it use similar commands and principes. So it should be much easier then I think.
I will try to adopt it this weekend.

All the parsing procedures and communication protocols already there I just need to dig deeper and make some changes.

So I think there no need to implement openweathermap JSON parsing features. And probably it is not a JSON it just looks like it. I am not an engeneer at all so can make such mistakes.
Last edit: 3 years 10 months ago by Kirill.
3 years 10 months ago #54348

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 1
Hello,

I suppose the commands are the same or similar for SestoSenso2 and Esatto 2. Look at the sestosenso2 driver source (sestosenso2.cpp, sestosenso2.h), I implemented commands in seperate class 'CommandSet' with Esatto driver in mind. You can use it and 'SestoSenso2' class as well.
If you test communication in terminal, first you have to setup some flags, disable ECHO and enable ICANON by stty command in linux (as I remember) to get the correct single line response.
The following user(s) said Thank You: Kirill
3 years 10 months ago #54519

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 5
Well, I get it worked.

Focuser move in and out , can reach desired position, abort etc...
Yes, commands are similar to sestosenso2 and few of it I keep unchanged and my driver just a modification of Sesto Senso 2 driver

I need to investigate some non critical bugs , fix it and it can be used.
Also I run in troubles with setting up QT Creators how it described in iutorial... QT cant find stddef.h so I drop it made all changes in text editor, build and install from terminal, then just run test with Kstars

I think the first version of driver will be ready in few days, with basic functions and then I'll add rest of them (like LEDs, Presets, Voltage etc).
Also still waiting for Tprobes so can test how it works.
3 years 10 months ago #54535

Please Log in or Create an account to join the conversation.

Time to create page: 1.257 seconds