Coder Social home page Coder Social logo

hglab01 / iobroker.followthesun Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 5.0 2.45 MB

This adapter calculates the current altitude and azimuth of the sun based on the geoposition. Additionally compass direction and the movement (sunrise or sunset) of the sun is stored. It is using the geo-position defined in the configuration. Calculation interval can be defined in instance preferences. Solar-noon values for some days like today, tomorrow or beginn of spring/summer/autumn/winter are stored as well.

License: MIT License

JavaScript 100.00%
iobroker sun sunposition azimuth altitude solar

iobroker.followthesun's Introduction

Logo

ioBroker.followthesun

NPM version Number of Installations (stable) Downloads Number of Installations (latest) Dependency Status Known Vulnerabilities FOSSA Status Test and Release

NPM

followthesun adapter for ioBroker

This adapter calculates the current altitude and azimuth of the sun based on the geoposition. Additionally compass direction and the movement (sunrise or sunset) of the sun is stored. It is using the geo-position defined in the configuration. Calculation interval can be defined in instance preferences. Solar-noon values for some days like today, tomorrow or beginn of spring/summer/autumn/winter are stored as well.

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation!

Requires

  • Node.js 18 or higher
  • ioBroker host (js-controller) 5.0 or higher

Changelog

0.5.0 (2023-12-05)

  • (HGlab01) Breaking changes
    • Node.js 18 or higher required
    • ioBroker host (js-controller) 5.0 or higher
  • (HGlab01) Coordinates can be configured on instance level (optional)
  • (HGlab01) Bump iobroker-jsonexplorer to v0.1.14

0.4.2 (2023-08-10)

  • (HGlab01) Improve admin5 UI usage

0.4.1 (2023-02-05)

  • (HGlab01) Improve error log if coordinates are not set

0.4.0 (2022-11-19)

  • (Jey-Cee) Updated object definitions: use of roles, multilanguage names
  • (Jey-Cee) Added missing objects for folders
  • (HGlab01) !Breaking change! NodeJS 14.16 or higher required
  • (HGlab01) !Breaking change! ioBroker js-controller 4.0 or higher required
  • (HGlab01) Update libs

0.3.9 (2022-02-24)

  • (HGlab01) Bump iobroker-jsonexplorer to v0.1.9
  • (HGlab01) js-controller 4.0 readiness
  • (HGlab01) fix sometimes today is not today

License

MIT License

Copyright (c) 2024 HGlab01 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FOSSA Status

iobroker.followthesun's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar fossabot avatar hglab01 avatar jey-cee avatar mcm1957 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iobroker.followthesun's Issues

Latitude or longitude not set in global System Configuration!

hi, where is the config file where i can set the longtitude and lattitude?

thx tom

followthesun.0 2023-11-10 12:22:46.844 warn Terminated (INVALID_CONFIG_OBJECT): Without reason
followthesun.0 2023-11-10 12:22:46.838 error Latitude or longitude not set in global System Configuration!
followthesun.0 2023-11-10 12:22:46.516 info Daily sun parameter calculation scheduled for 00:00:29
followthesun.0 2023-11-10 12:22:46.512 info Sun position calculation will be done every 60 seconds
followthesun.0 2023-11-10 12:22:46.509 info Started with JSON-Explorer version 0.1.12
followthesun.0 2023-11-10 12:22:46.433 info starting. Version 0.4.2 in /opt/iobroker/node_modules/iobroker.followthesun, node: v16.20.0, js-controller: 4.0.24

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Configuration dialog for separate coordinates to follow the sun

Hi guys,

I´am running one iobroker to monitor/manage our house and our holiday home which are connected via vpn.
So I would suggest a configuration dialoge to use the coordinates from the iobroker-installation
or the possibility to enter separate coordinates (of the holiday home).
So I could run two separate follow-the-sun-instances to calculate the times for each house.

Thanks for your work!

Kind regards

Ecki

movement state

**Let me know how I can help you **
A clear description of the wanted functionality

Hallo,

ich habe ein Problem mit dem State "movementof the sun". In der Info habe ich das tägliche ereignis stehen um 0 Uhr das ein "cron ausgeführt" wird. Der State sunrise wird nicht gesetzt morgens! Bleibt imemr auf sunset stehen. Was könnte da für ein Fehler vorliegen. Neuinstallation ist bereits getätigt.

lg Ben

Wrong value in Object solarnoon_altitude (today)

Describe the bug
The value in Object solarnoon_altitude (today) is different to the value calculated at current altitiude at the solarnoon_time (today)

To Reproduce
Steps to reproduce the behavior:

  1. Watch on values at calculated time

Expected behavior
solarnoon_altitude (today) = current altitiude at the solarnoon_time (today)

Screenshots & Logfiles
grafik

sonnenverlauf.de calculates the following values for this time:
grafik

Versions:

  • Adapter version: 0.3.8
  • JS-Controller version: 3.3.22
  • Node version: v14.19.0
  • Operating system: ubuntu 20.04

js-controller 4.0.4 Update

Version of nodejs
14.19.0

Version of ioBroker js-controller
4.0.4

Version of Adapter
0.3.8

followthesun.0 | 2022-02-06 13:36:12.142 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.142 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.142 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.142 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.141 | warn | Object current.altitude is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.141 | warn | Object current.azimuth is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.141 | warn | Object nextYear.start of winter.dusk_altitude is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.142 | warn | Object current.compass_direction is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.142 | warn | Object current.movement is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.142 | warn | Object current.lastupdate is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.140 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.140 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.140 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.140 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.141 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.141 | warn | This object will not be created in future versions. Please report this to the developer.
followthesun.0 | 2022-02-06 13:36:12.140 | warn | Object nextYear.start of winter.dawn_altitude is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.139 | warn | Object nextYear.start of winter.dawn_time is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.139 | warn | Object nextYear.start of winter.sunrise_azimuth is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.139 | warn | Object nextYear.start of winter.sunrise_altitude is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.139 | warn | Object nextYear.start of winter.sunrise_time is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.140 | warn | Object nextYear.start of winter.dawn_azimuth is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.140 | warn | Object nextYear.start of winter.dusk_time is invalid: obj.common.states has an invalid type! Expected "object", received "string"
followthesun.0 | 2022-02-06 13:36:12.140 | warn | Object nextYear.start of winter.dusk_azimuth is invalid: obj.common.states has an invalid type! Expected "object", received "string"

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/HGlab01/ioBroker.followthesun

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Three minutes late

Describe the bug
Sunset is 18:33 but shows 18:36. Location is set correct.

Steps to reproduce the behavior:

  1. Go to 'followthesun.0.short term.today.sunset_time'
  2. Check against official services
  3. See error

Expected behavior
Value should be the correct sunset time

Versions:

  • Adapter version: <0.3.9>
  • JS-Controller version: <4.0.23>
  • Node version: <18.9.1>
  • Operating system: <Debian on Raspberry Pi 4>

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Release script: Action required

Hi, it looks like you are using @alcalzone/release-script to manage your releases.
When updating to the latest version, you need to remove the following line from your .github/workflows/test-and-release.yml if you want the releases to keep working:

  deploy:
    # Trigger this step only when a commit on master is tagged with a version number
    if: |
      contains(github.event.head_commit.message, '[skip ci]') == false &&
      github.event_name == 'push' &&
-     github.event.base_ref == 'refs/heads/master' &&
      startsWith(github.ref, 'refs/tags/v')

It may also look like this one:

  deploy:
    # Trigger this step only when a commit on master is tagged with a version number
    if: |
      contains(github.event.head_commit.message, '[skip ci]') == false &&
      github.event_name == 'push' &&
-     github.event.base_ref == 'refs/heads/main' &&
      startsWith(github.ref, 'refs/tags/v')

SunRise and SunSet Position and Time

Would love to get additional datapoints for position and time for sunrise and sunset.
Recently I switched over from using suncalc to your adapter after I had issues with suncalc. Your adapter seems to be more accurate. I am using your adapter to control my window blinds and show the sun position in vis.
Thanks in advance.

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

ioBroker scheduling

Gibt es einen Hintergrund warum der Adapter dauerhaft laufen muss und nicht das interne scheduling vom ioBroker nutzt?

Einheiten fehlen an einigen Datenpunkten

Describe the bug
An allen Datenpunkten, die nicht im Ordner current sind fehlen die Einheiten.

To Reproduce
Steps to reproduce the behavior:

  1. Adapter installieren und Instanz starten
  2. Einheiten fehlen

Expected behavior
Die Datenpunkte sollten die Einheiten wie im Ordner current haben.

Screenshots & Logfiles
image

Versions:

  • Adapter version: 0.2.4
  • JS-Controller version: 3.1.6
  • Node version: v10.22.1
  • Operating system: Debian GNU/Linux 10

Remove additional menu entry

Describe the bug
Multiple different sample ui dialogs are still implemented

To Reproduce
Steps to reproduce the behavior:

install the adapter and start an instance
an additional main menu entry is available and the adaper pretends like it is an implementation for the history interface
Expected behavior
neither the additional main menu entry nor the history configuration should be available to the end user as they are not supported by the adapter

Screenshots & Logfiles
image
image

Versions:

Adapter version: 0.2.5
JS-Controller version: 3.1.6
Node version: v10.22.1
Operating system: Debian GNU/Linux 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.