fetzerch / grafana-sunandmoon-datasource

SunAndMoon is a datasource plugin for Grafana that calculates the position of Sun and Moon as well as the Moon illumination. ☀️🌙🧛‍♂️
MIT License
41 stars 8 forks source link

Sunset/Sunrise as text #20

Closed roykrikke closed 1 year ago

roykrikke commented 4 years ago

Is it possible to show sunset and sunrise in text? See the example below: sunriseandsunset

fetzerch commented 4 years ago

That's a valid request, however I haven't found a nice way of supporting this yet.

For the moment, I think the closest you get is by using a table view and set 'Annotations' in 'Data -> Table Transform'

grafik

roykrikke commented 4 years ago

Great and thanks for the fast response.

image

For other interested readers I share the dashboard from the image. Sun and Moon Datasource-1575113429132.txt

danraymond commented 4 years ago

@roykrikke I would like to try the dashboard but new to Grafana. I assume the text is json and a dashboard? What do I do with it please.

roykrikke commented 4 years ago

@roykrikke I would like to try the dashboard but new to Grafana. I assume the text is json and a dashboard? What do I do with it please.

You could import the dashboard example above (Sun and Moon Datasource-1575113429132.txt). The format of the example is in json, do not confuse this with your question if text is in json. If you are new, imported the example with + button on the left side of Grafana and then import.

kaluxx commented 2 years ago

Is this still working on Grafana 8.3+?? Actually I don't get it running. Grafana asks me to update to the new table panel where I can not find a transformation option for Annotations. grafik

fetzerch commented 2 years ago

Indeed, this is no longer supported starting since Grafana 7. See (https://community.grafana.com/t/how-to-show-annotations-in-a-table-panel-in-grafana-7/33315).

You could give this external panel plugin a try: https://grafana.com/grafana/plugins/ryantxu-annolist-panel/

NoPlayBack commented 1 year ago

This discussion is long time ago... i am also trying to get sunset / sunrise and possibly same data for the moon into a dashboard as number. Trying a lot of things but up to now did not find a solution

Isn't there a way to use the data from "Sun and Moon" to fetch correct data via sql? Does anybody know what the syntax would be to access the db?

In the end, the only data i am looking for is the daily sunrise and sunset, moonrise and moonset, and maybe moonphase in %. Would be happy for any proposal...

fetzerch commented 1 year ago

https://github.com/fetzerch/grafana-sunandmoon-datasource/pull/52 Adds support for this.

NoPlayBack commented 1 year ago

I'm lost in github, sorry.... should i be able to get that working now or is the new version in a state that i cannot access it? I did try to update data source and dashboard but did not experience any change...

fetzerch commented 1 year ago

I'll create a new release in the next days.

fetzerch commented 1 year ago

Version v0.3.0 is now available via grafana.com. I've also uploaded a new revision to https://grafana.com/grafana/dashboards/630-sun-and-moon-datasource/ that should help you to set things up.