Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please insert a timestamp in the restful API #1199

Open
Frogowitsch opened this issue Aug 2, 2023 · 3 comments
Open

Please insert a timestamp in the restful API #1199

Frogowitsch opened this issue Aug 2, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Frogowitsch
Copy link

Is your feature request related to a problem? Please describe.

Its hard to synchronize with other devices. It would also be nice to have the ability to set a delta time for ntp sync.

Describe the solution you'd like

A unix timestamp in the restful api would be rather easy to implement and help a lot.

Describe alternatives you've considered

No response

Additional context

No response

@Frogowitsch Frogowitsch added the enhancement New feature or request label Aug 2, 2023
@Frogowitsch
Copy link
Author

Frogowitsch commented Aug 2, 2023

I know, that there is a possibility to access the /api/ntp/time , but this is a second access and i use a slow 8266 to read the values, so if I read the /api/ntp/time for time and then read /api/livedata/status for the data, I have a delay due to 2 accesses (my Wifi is rather bad and the 8266 is also slow).
Please include the time into /api/livedata/status and into /api/prometheus/metrics .
Thank you

@stefan123t
Copy link
Contributor

stefan123t commented Aug 5, 2024

@Frogowitsch I understand and second your request for a timestamp in several of the API endpoints.

This would need to be considered in our REST API documentation #378.


I have also seen that the dusk / dawn times have to be queried under Info > NTP whereas the setting for which type of sunset / dawn can be set under Settings > NTP only.
In order to see the effect of the four sunset type settings, one has to save the setting and switch to the other tab. This could be more convenient in the same dialog.

Settings > NTP

NTP Settings
Location Configuration
Sunset type:

  • Standard dawn (90.8°)
  • Nautical dawn (102°)
  • Civil dawn (96°) default
  • Astronomical dawn (108°)

Why is the list not sorted by degrees ° and the IMHO Civil dawn (96°) marked as default ?

Settings > NTP

NTP Information
Current Time
Sunrise Monday, August 05 2024 05:24:00
Sunset Monday, August 05 2024 21:26:00

vaterlangen pushed a commit to vaterlangen/OpenDTU that referenced this issue Sep 16, 2024
Allows to connect to SBS Unipower batteries using a CAN bus.
@stefan123t
Copy link
Contributor

stefan123t commented Oct 18, 2024

@tbnobody I would add to the request that we add a Leaflet Geosearch address entry field to the Settings > NTP Settings.

Look at this Stackoverflow for some example implementations using Leaflet and pure Java Script:

get latitude & longitude as per address given for leaflet
https://stackoverflow.com/questions/15919227/get-latitude-longitude-as-per-address-given-for-leaflet

I have updated the example with the latest Leaflet library and css 1.9.4 references and hashes,
coordinates for Berlin as a start location and Zoom Level 4 instead of 9.
Please rename to leaflet_geocoder.html to have a working example.

leaflet_geocoder.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants