[userModule] Astronomy (Updated 2016/10/26)

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
maros
Posts: 103
Joined: 05 Apr 2014 11:21

[userModule] Astronomy (Updated 2016/10/26)

Post by maros »

This plugin creates a virtual multilevelSensor device that shows the altitude of the sun above the horizon at given location. The module provides various additional metrics (eg. azimuth, timestamps for various events) and emits events when the sun reaches certain positions. Optionally an azimuth device can also be created

For example, the solar altitude may be used in conjunction with the Smart Motion Trigger module to trigger lights only if it is dark outside, or by the Condition Switch module to enable outside lighting based on solar altitude. The module is also required by the Blind Control module which manages blinds for optimal shading. Events emitted by this module (eg. astronomy.sunrise) can be caught and processed by the Event Watcher module to trigger custom actions.

Tested with Z-Way version v2.1.1, v2.2.2
Bug/Issue tracker at https://github.com/maros/Zway-Astronomy/issues
Documentation at https://github.com/maros/Zway-Astronomy ... /README.md
Download at https://github.com/maros/Zway-Astronomy/releases

Installation can be done directly via git or via the the Zway App-Store.
Last edited by maros on 04 Feb 2017 15:23, edited 6 times in total.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
bino29
Posts: 14
Joined: 15 Dec 2015 21:42

Re: [userModule] Astronomy (Updated 2015/12/19)

Post by bino29 »

I have a question. I added the Astronomy module, but I can't see any information. Trying to install the Base-Module on Local Apps I get an error: Not found!

Can you help me?
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Astronomy (Updated 2015/12/19)

Post by maros »

Did you follow the installation instructions? (Zway- prefix?) Any error messages in the log files?
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
masque
Posts: 30
Joined: 23 Dec 2015 01:06

Re: [userModule] Astronomy (Updated 2015/12/19)

Post by masque »

Sounds like you're trying to install the modules on v2.2.0.
This does abviously not work. You need to downgrade to v2.1.1 to get the Base Module and the Astronomy Module installed correctly.
bino29
Posts: 14
Joined: 15 Dec 2015 21:42

Re: [userModule] Astronomy (Updated 2015/12/19)

Post by bino29 »

Oh, okay. I didn't know v.2.2.0 isn't supported by the Modules. Is an Module update planned?
maros
Posts: 103
Joined: 05 Apr 2014 11:21

Re: [userModule] Astronomy (Updated 2015/12/19)

Post by maros »

Astronomy Module does not require BaseModule. However, masque and other users reported issues with my modules on 2.2.0. Since I do not have a Zway 2.2.0 installation at hand (and since I do not want to upgrade my production network yet) I need someone else to check/fix the issues on the latest firmware version.

On the other hand if someone could spare a Zway razberry board (or buy me one from my Amazon Wishlist ;-) ) allowing me to setup a second network I'd be happy to investigate this issue myself.
Z-Way 2.2.4 on Raspi B | My Zway GitHub repos | Amazon Wishlist to support module development
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Astronomy (Updated 2016/04/20)

Post by kandalf »

Thank you for this app. It's great. The only problem actually i have with z-way 2.2.1 is the missing app icon.
In the online store i see the icon, when i install your app and configure it there is no icon. Only text "img"
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Astronomy (Updated 2016/04/20)

Post by Mike Yeager »

I am on v2.2.2 and I don't have that issue. Maros, Astronomy doesn't require the BaseModule, as you point out, but all of its updates still seem to be processed by the module. I have noticed lately that the response to changes to my system (turning devices on and off, etc) seem to take a second or two to register. I'm wondering if BaseModule processing things it doesn't need to might be part of this. I'm sure part of it is the fact that I'm still on a RPi model B and I'm pushing it pretty good. Excellent work and I hope to be able to work with you on a few of the ideas I have as you seem to be going in the same direction...
kandalf
Posts: 54
Joined: 13 May 2016 11:10

Re: [userModule] Astronomy (Updated 2016/04/20)

Post by kandalf »

Ok, i'am actually not on 2.2.2 because there are lot of problems.

Maros: Is it possible that we configure the event time for the bith values? I think it is not really necessary, that the events for altitude and azimuth reports so often. It would be great, if it is possible to add this configuration parameter to your app.
Raspberry PI with Z-Wave.me Board
2 x Fibaro Double Relay-Switch FGS 222
2 x Fibaro Shutter FGR 222
Fibaro Multi Sensor
Z-Wave.me RemoteControl
Mike Yeager
Posts: 160
Joined: 03 May 2014 07:02

Re: [userModule] Astronomy (Updated 2016/04/20)

Post by Mike Yeager »

It's easy enough to change how often Astronomy calculates but I see no reason to have it configurable. if you insist on changing it, open the index.js file in the Astronomy directory and change the '60' to another value in this line of code:

self.interval = setInterval(function() {
self.updateCalculation(self);
}, 60*1000);

As it is, it runs once every 60 seconds. I think you can figure out what the unit of time is here...
Post Reply