DwarfTelescopeUsers / dwarfii-stellarium-goto

App to connect Dwarf II with Stellarium
15 stars 9 forks source link

Update compatible with Api v2 #5

Open stevejcl opened 6 months ago

stevejcl commented 6 months ago

New version compatible with API V2 to add to a new branch (apiV2) on the original project

acocalypso commented 6 months ago

Hey currently testing this PR and I have the following issue while connecting to the Dwarf:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (114:8) @ checkConnection

  112 | const webSocketHandler = connectionCtx.socketIPDwarf
  113 |   ? connectionCtx.socketIPDwarf
> 114 |   : new WebSocketHandler(IPDwarf);
      |    ^
  115 | 
  116 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  117 | 
Call Stack
HTMLUnknownElement.callCallback
node_modules\react-dom\cjs\react-dom.development.js (4164:0)
Object.invokeGuardedCallbackDev
node_modules\react-dom\cjs\react-dom.development.js (4213:0)
invokeGuardedCallback
node_modules\react-dom\cjs\react-dom.development.js (4277:0)
invokeGuardedCallbackAndCatchFirstError
node_modules\react-dom\cjs\react-dom.development.js (4291:0)
executeDispatch
node_modules\react-dom\cjs\react-dom.development.js (9041:0)
processDispatchQueueItemsInOrder
node_modules\react-dom\cjs\react-dom.development.js (9073:0)
processDispatchQueue
node_modules\react-dom\cjs\react-dom.development.js (9086:0)
dispatchEventsForPlugins
node_modules\react-dom\cjs\react-dom.development.js (9097:0)
eval
node_modules\react-dom\cjs\react-dom.development.js (9288:0)
batchedUpdates$1
node_modules\react-dom\cjs\react-dom.development.js (26140:0)
batchedUpdates
node_modules\react-dom\cjs\react-dom.development.js (3991:0)
dispatchEventForPluginEventSystem
node_modules\react-dom\cjs\react-dom.development.js (9287:0)
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay
node_modules\react-dom\cjs\react-dom.development.js (6465:0)
dispatchEvent
node_modules\react-dom\cjs\react-dom.development.js (6457:0)
dispatchDiscreteEvent
node_modules\react-dom\cjs\react-dom.development.js (6430:0)
Silky-Thrower commented 6 months ago

problem connecting

Silky-Thrower commented 6 months ago

The prebuild version with on localhost:8000 works normal But only in slave mode... why do i have to be connected with my phone ? problem connecting-prebuild

acocalypso commented 6 months ago

You need the dwarf to join your local network with sta mode.

Silky-Thrower commented 6 months ago

You need the dwarf to join your local network with sta mode.

i know and it is in sta mode, but i can't connect to it without connecting the phone first

stevejcl commented 6 months ago

yes the first connection need Bluetooth, so it needs the mobile app even in STA Mode, I add this response from Dwarflab, They will send me the Bluetooth API connection (I hope soon), so then we can directly connect to the dwarf.

acocalypso commented 5 months ago

I tested it today an saw that exposures up to 30 sec can be set.

I tried it with 20s exposures and 30 frames but session started with 999 1s exposures.

stevejcl commented 5 months ago

yes I have made a test, as the configuration is a JSON file on the dwarf, I try to change it and test if it accept bigger value, (in fact the darf receives an Index value not the direct value), but it's not working, you receive a bad parameter response, so I revert back in the last version.

acocalypso commented 5 months ago

I got an ok response and the session started but instead of the configured subs amount and exposure time, the dwarf started with 999 1s exposures.

stevejcl commented 5 months ago

Ok, got the Bluetooth API, now I can start the STA mode without the APP,, for the moment for the moment I just made a test with an hard coded packet, but it's working

acocalypso commented 5 months ago

I checkout the new changes and I'm not able to start it now:

./src/components/ConnectCamera.tsx:3:0
Module not found: Can't resolve '@/lib/dwarfii_api'
  1 | import { useContext, useState } from "react";
  2 | 
> 3 | import {
  4 |   wsURL,
  5 |   statusTelephotoCmd,
  6 |   statusWideangleCmd,

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/pages/setup-scope.tsx
acocalypso commented 5 months ago

I checkout the new changes and I'm not able to start it now:

./src/components/ConnectCamera.tsx:3:0
Module not found: Can't resolve '@/lib/dwarfii_api'
  1 | import { useContext, useState } from "react";
  2 | 
> 3 | import {
  4 |   wsURL,
  5 |   statusTelephotoCmd,
  6 |   statusWideangleCmd,

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/pages/setup-scope.tsx

ignore that I cloned your working repository and its working there, It seems there was an issue with checking out the PR

stevejcl commented 5 months ago

I checkout the new changes and I'm not able to start it now:

./src/components/ConnectCamera.tsx:3:0
Module not found: Can't resolve '@/lib/dwarfii_api'
  1 | import { useContext, useState } from "react";
  2 | 
> 3 | import {
  4 |   wsURL,
  5 |   statusTelephotoCmd,
  6 |   statusWideangleCmd,

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/pages/setup-scope.tsx

ignore that I cloned your working repository and its working there, It seems there was an issue with checking out the PR

Yes I left the link to this repo in my github to be able to integrate it here with pull request, this could cause problems

acocalypso commented 5 months ago

Alright, I just pulled the latest commits and I'm not able to connect to the DWARF now. I don't have a compatible bluetooth usb dongle yet but I followed the standart procedure.

I typed in my ip from the Dwarf and hit connect:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (48:8) @ checkConnection

  46 | const webSocketHandler = connectionCtx.socketIPDwarf
  47 |   ? connectionCtx.socketIPDwarf
> 48 |   : new WebSocketHandler(IPDwarf);
     |    ^
  49 | 
  50 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  51 | 

Do you have any discord server or similiar to discuss issues etc or should we stick to github? I'm glad to help

i can see the same issue that was reported 3 weeks ago.

acocalypso commented 5 months ago

I opend up VS Code to double check:

Module '"dwarfii_api"' has no exported member 'Dwarfii_Api'

Where is the module defined?

Silky-Thrower commented 5 months ago

Alright, I just pulled the latest commits and I'm not able to connect to the DWARF now. I don't have a compatible bluetooth usb dongle yet but I followed the standart procedure.

I typed in my ip from the Dwarf and hit connect:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (48:8) @ checkConnection

  46 | const webSocketHandler = connectionCtx.socketIPDwarf
  47 |   ? connectionCtx.socketIPDwarf
> 48 |   : new WebSocketHandler(IPDwarf);
     |    ^
  49 | 
  50 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  51 | 

Do you have any discord server or similiar to discuss issues etc or should we stick to github? I'm glad to help

i can see the same issue that was reported 3 weeks ago.

indeed, i have the same problem. Unhandled Runtime Error

TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

also on visual code this is always marked red .... import { Dwarfii_Api, messageCameraTeleGetSystemWorkingState, messageCameraTeleOpenCamera, messageCameraWideOpenCamera, WebSocketHandler, } from "dwarfii_api";

Silky-Thrower commented 5 months ago

bluetooth

acocalypso commented 5 months ago

your released test build is working fine https://github.com/stevejcl/dwarfii-stellarium-goto/releases/tag/v2.0.3a

@stevejcl what is the quality settings about? There is no explanation available in the camera information popup

stevejcl commented 5 months ago

Alright, I just pulled the latest commits and I'm not able to connect to the DWARF now. I don't have a compatible bluetooth usb dongle yet but I followed the standart procedure. I typed in my ip from the Dwarf and hit connect:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (48:8) @ checkConnection

  46 | const webSocketHandler = connectionCtx.socketIPDwarf
  47 |   ? connectionCtx.socketIPDwarf
> 48 |   : new WebSocketHandler(IPDwarf);
     |    ^
  49 | 
  50 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  51 | 

Do you have any discord server or similiar to discuss issues etc or should we stick to github? I'm glad to help i can see the same issue that was reported 3 weeks ago.

indeed, i have the same problem. Unhandled Runtime Error

TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

also on visual code this is always marked red .... import { Dwarfii_Api, messageCameraTeleGetSystemWorkingState, messageCameraTeleOpenCamera, messageCameraWideOpenCamera, WebSocketHandler, } from "dwarfii_api";

You need my version of dwarfii_api on my git hub (https://github.com/stevejcl/dwarfii_api) and copy the files to the ./node_modules/dwarfii_api rerpertory

acocalypso commented 5 months ago

Alright, I just pulled the latest commits and I'm not able to connect to the DWARF now. I don't have a compatible bluetooth usb dongle yet but I followed the standart procedure. I typed in my ip from the Dwarf and hit connect:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (48:8) @ checkConnection

  46 | const webSocketHandler = connectionCtx.socketIPDwarf
  47 |   ? connectionCtx.socketIPDwarf
> 48 |   : new WebSocketHandler(IPDwarf);
     |    ^
  49 | 
  50 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  51 | 

Do you have any discord server or similiar to discuss issues etc or should we stick to github? I'm glad to help i can see the same issue that was reported 3 weeks ago.

indeed, i have the same problem. Unhandled Runtime Error

TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

also on visual code this is always marked red .... import { Dwarfii_Api, messageCameraTeleGetSystemWorkingState, messageCameraTeleOpenCamera, messageCameraWideOpenCamera, WebSocketHandler, } from "dwarfii_api";

You need my version of dwarfii_api on my git hub (https://github.com/stevejcl/dwarfii_api) and copy the files to the ./node_modules/dwarfii_api rerpertory

Thanks that explains a lot :D maybe you want to link it as a submodule?

stevejcl commented 5 months ago

Alright, I just pulled the latest commits and I'm not able to connect to the DWARF now. I don't have a compatible bluetooth usb dongle yet but I followed the standart procedure. I typed in my ip from the Dwarf and hit connect:

Unhandled Runtime Error
TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

Source
src\components\setup\ConnectDwarf.tsx (48:8) @ checkConnection

  46 | const webSocketHandler = connectionCtx.socketIPDwarf
  47 |   ? connectionCtx.socketIPDwarf
> 48 |   : new WebSocketHandler(IPDwarf);
     |    ^
  49 | 
  50 | connectionCtx.setSocketIPDwarf(webSocketHandler);
  51 | 

Do you have any discord server or similiar to discuss issues etc or should we stick to github? I'm glad to help i can see the same issue that was reported 3 weeks ago.

indeed, i have the same problem. Unhandled Runtime Error

TypeError: dwarfii_api__WEBPACK_IMPORTED_MODULE_2__.WebSocketHandler is not a constructor

also on visual code this is always marked red .... import { Dwarfii_Api, messageCameraTeleGetSystemWorkingState, messageCameraTeleOpenCamera, messageCameraWideOpenCamera, WebSocketHandler, } from "dwarfii_api";

You need my version of dwarfii_api on my git hub (https://github.com/stevejcl/dwarfii_api) and copy the files to the ./node_modules/dwarfii_api rerpertory

Thanks that explains a lot :D maybe you want to link it as a submodule?

Yes, I keep the old link to do the pull request to this repository, I am in this discord : https://discord.com/channels/1172554961704468572/1173899166850760724 and I have a developpement channel but I am feeling alone ... https://discord.com/channels/1172554961704468572/1188219781271269529

acocalypso commented 5 months ago

If you sent me a Discord Invite I can join =)

acocalypso commented 5 months ago

for anyone else who would like to test it: Installation of dwarfii_api module:

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

stevejcl commented 5 months ago

If you sent me a Discord Invite I can join =)

I am not the owner, send a PM to Alan Burgess https://www.facebook.com/groups/659927045624980/user/100058518950867 on messenger

stevejcl commented 5 months ago

your released test build is working fine https://github.com/stevejcl/dwarfii-stellarium-goto/releases/tag/v2.0.3a

@stevejcl what is the quality settings about? There is no explanation available in the camera information popup

I thing it the quality of the image preview on the mobile APP or the image get with http, not sure!

stevejcl commented 5 months ago

your released test build is working fine https://github.com/stevejcl/dwarfii-stellarium-goto/releases/tag/v2.0.3a

@stevejcl what is the quality settings about? There is no explanation available in the camera information popup

As I have 'not clear sky, what kind of test have you done ?

acocalypso commented 5 months ago

your released test build is working fine https://github.com/stevejcl/dwarfii-stellarium-goto/releases/tag/v2.0.3a @stevejcl what is the quality settings about? There is no explanation available in the camera information popup

As I have 'not clear sky, what kind of test have you done ?

I just did some basic tests, like functionality, loading coords from Stellarium, testing all options. I might be able to further test a full session tonight. in ~10h

Silky-Thrower commented 5 months ago

for anyone else who would like to test it: Installation of dwarfii_api module:

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

not working .... i copied the whole api repo from stevejcl and i still have the same marked errors in vs 2019

acocalypso commented 5 months ago

@Silky-Thrower all you have to do after running npm intall is installing the addional module from github with the command.

it should look like this:

npm install
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead

added 751 packages, and audited 752 packages in 24s

143 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (1 low, 2 moderate)

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

up to date, audited 752 packages in 8s

143 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (1 low, 2 moderate)

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.
Silky-Thrower commented 5 months ago

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

E:\Dwarf II\Dwarf II Stellarium - API2.0>npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\silky\AppData\Local\npm-cache_logs\2024-03-14T09_43_51_068Z-debug-0.log

E:\Dwarf II\Dwarf II Stellarium - API2.0>

stevejcl commented 5 months ago

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

try npm install username/repo#branchName --save

npm install stevejcl/dwarfii_api#apiV2 --save

I test it it's working

Silky-Thrower commented 5 months ago

npm install "https://github.com/stevejcl/dwarfii_api#apiV2" --save

try npm install username/repo#branchName --save

npm install stevejcl/dwarfii_api#apiV2 --save

I test it it's working

what can i say... it's not working? every command gives me the same error i even downgraded my node version from 20.11.1 to 20.9.0 and 18.17.1 ... . nothing works :/

acocalypso commented 5 months ago

the error indicates an issue with your git binary.

can you run the following command from cmd (in case your are using windows)?

git --version

git version 2.44.0.windows.1

Silky-Thrower commented 5 months ago

the error indicates an issue with your git binary.

can you run the following command from cmd (in case your are using windows)?

git --version

git version 2.44.0.windows.1

That was the problem, now all the red markings are gone This should be in the install notes :)

Silky-Thrower commented 5 months ago

Thx a million times :)

finally

stevejcl commented 5 months ago

Thx a million times :)

finally

What do you have changed to get this wall paper ?

Silky-Thrower commented 5 months ago

Thx a million times :) finally

What do you have changed to get this wall paper ?

I build a whole site around it, with info about stars, planets, constellations... Now i'm trying to include wheater and a clear outside data.

pic1 pic2 pic3 pic4

acocalypso commented 5 months ago

I love to work with desktop applications instead of webapps. Therefore I'm working on a desktop application for that.

image

Silky-Thrower commented 5 months ago

All combined would be an awesome application. 🤔

acocalypso commented 5 months ago

All combined would be an awesome application. 🤔

if @stevejcl would agree to this. I would support this absolutly. I could also offer to provide a github action to build and publish the packages for windows, linux and mac?

stevejcl commented 5 months ago

I add this : image

to show only the visible objects depends on the category selected too

Silky-Thrower commented 5 months ago

Is it possible for you @stevejcl to create a new repo? B ecause i think the merge will never happen. Also is there a way to communicate to you without spamming github?

acocalypso commented 5 months ago

A new development branch would be good.

stevejcl commented 5 months ago

on my github

acocalypso commented 5 months ago

https://discord.com/invite/WZ5XxUJX

Feel free to join and discuss