Real-time solar data : azimuth, Altitude, Lux sensor...

manu663
Posts: 3
Joined: Thursday 03 November 2016 22:03
Target OS: Raspberry Pi
Domoticz version:
Location: South of France
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by manu663 » Saturday 05 November 2016 13:21

Thank you Xces and Merci Toulon7559 to come to my rescue !

In order to clarify my previous message which was clear as mud,
Here's my "Hardware tab":

Image

my "device tab":

Image

and the device "Lux Calculated" in the Utility tab:

Image

I've tried to create a new "custom" one but by looking at the one provided by Xces in the posts above, it's a "type: lux" so I did the same. (Monkey see, monkey do ! :roll: )

Do you think that my mistake should be having 2 items "virtual sensor" IDX 8 and "Je dors" IDX 4 in the Hardware tab ?
Maybe I should create the virtual sensor needed for the solar data under "Je Dors! " ?

Toulon7559- Remark2: the lines displayed were coming from the "user variables" tab (setup/more option).

xces
Posts: 56
Joined: Thursday 05 February 2015 10:02
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by xces » Saturday 05 November 2016 14:58

Did you also follow the procedures to setup your local domoticz url and allow local updates without password (via options screen?)

manu663
Posts: 3
Joined: Thursday 03 November 2016 22:03
Target OS: Raspberry Pi
Domoticz version:
Location: South of France
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by manu663 » Saturday 05 November 2016 15:44

OMG, shame on me ! :oops:

I made a noob's mistake ! (which I am indeed)
During the local domoticz url setting, I only focused on the URL in the user variables but I missed the option screen info.

I 've been too fast on that step and I left a blank URL...

Fixed ! At least this mistake led me to dig into the entire script to try to understand.
( I won't swear I've understood everything :? but I'm on the right path !)

Thank a lot to both of you to have spent your time to help me and congrats for this nice script !

darmokusumo
Posts: 4
Joined: Wednesday 09 November 2016 3:07
Target OS: Windows
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by darmokusumo » Wednesday 09 November 2016 3:11

Can also send me a pm in Dutch. Perhaps I can help you, although the wiki is very clear. Only problem I encountered was to put JSON.lua in scriptfolder on my Pi3. After that all went right.

darmokusumo
Posts: 4
Joined: Wednesday 09 November 2016 3:07
Target OS: Windows
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by darmokusumo » Wednesday 09 November 2016 3:18

i just setup weatherunderdround...I gonna find out,
in the mean time does it run with 1012 as relativePressure instead of the sensor...??

DrMacabre
Posts: 20
Joined: Monday 26 December 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by DrMacabre » Monday 26 December 2016 17:34

hello,

i'm trying to make this work on freenas but i get this error when the script runs :

2016-12-26 16:25:00.513 Error: EventSystem: in /usr/home/domoticz/domoticz/scripts/lua/script_time_SolarSensor.lua: ...omoticz/domoticz/scripts/lua/script_time_SolarSensor.lua:65: 'popen' not supported

what did i miss ?

thanks

trixwood
Posts: 510
Joined: Friday 18 March 2016 8:20
Target OS: -
Domoticz version: Offline
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by trixwood » Monday 26 December 2016 18:02

I think a good lua version!

viewtopic.php?t=9904

DrMacabre
Posts: 20
Joined: Monday 26 December 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by DrMacabre » Monday 26 December 2016 18:08

I've read this topic but since its related to mac osx, i'm not sure i fully understand how to translate this to my freenas install.

I tried running Lua in the shell but it is not a valid command on my system. Any idea how to set it up ?

EDIT : installed package for lua52 but i still got the error

trixwood
Posts: 510
Joined: Friday 18 March 2016 8:20
Target OS: -
Domoticz version: Offline
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by trixwood » Monday 26 December 2016 18:56

I think lua is included in the domoticz package, at least I can see it in the Domoticz source and it's not an external package.
You could try to compile the lastes version of Domoticz.Or maybe somebody else has a better idea ;-)

DrMacabre
Posts: 20
Joined: Monday 26 December 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by DrMacabre » Monday 26 December 2016 19:04

The install is a couple of days old, haven't seen any error during compiling.

I guess i'll wait for my rasperry to arrive to check this out.

Thanks.

Nautilus
Posts: 780
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Nautilus » Saturday 31 December 2016 1:39

Ogimet is not available where I live however, I can get the cloudiness as percentage. For now I just calculate "Octa = Cloudiness(0-100) / 12.5". But would there be a more accurate way to calculate Kc from cloudiness percentage?

Quax1507
Posts: 124
Joined: Tuesday 07 April 2015 21:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Quax1507 » Thursday 05 January 2017 19:23

Hi,

I am getting following error in log file sometimes:
2017-01-05 18:10:00.990 LUA: Station SYNOP = 10729
2017-01-05 18:10:00.990 LUA: 4 Octa
2017-01-05 18:10:00.990 LUA: Kc = 0.92895078594483
2017-01-05 18:10:00.990 LUA: Direct Radiation = 0 W/m²
2017-01-05 18:10:00.990 LUA: Scattered Radiation = 0 W/m²
2017-01-05 18:10:00.991 LUA: Total radiation = 0 W/m²
2017-01-05 18:10:00.991 LUA: Total Radiation in lux = 0 Lux
2017-01-05 18:10:00.991 LUA: and at last, Total weighted lux = 0 Lux
2017-01-05 18:10:10.152 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_time_SolarSensor.lua has been running for more than 10 seconds
Any idea where to search?

Quax1507

User avatar
phoenixblue
Posts: 82
Joined: Friday 25 November 2016 12:20
Target OS: Raspberry Pi
Domoticz version: 3.7392
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by phoenixblue » Monday 09 January 2017 1:04

Is it possible to calculate based on the solar radiation of the day before and the weather forecast for the next day to calculate how much w/m2 total can be suspected for the next day?
scripts on github: Link

trixwood
Posts: 510
Joined: Friday 18 March 2016 8:20
Target OS: -
Domoticz version: Offline
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by trixwood » Thursday 19 January 2017 4:06

Just found out. if you loose your internet connection, then you get no domoticz frontpage when this script is active... :-(

Toulon7559
Posts: 476
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Toulon7559 » Sunday 22 January 2017 20:27

@phoenixblue

Don't know an algorithm to answer you question, but some meteo-site may give the forecast information you need; e.g. http://api.buienradar.nl/image/1.0/sunpowereu?forc=32
One level higher the website-entry is by http://www.buienradar.nl/nederland/zon- ... nkracht-uv
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

ikariya
Posts: 3
Joined: Wednesday 01 February 2017 8:52
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by ikariya » Wednesday 01 February 2017 9:08

Hi guys,

quite new at domoticz, however i have some question about this script for solar radiation. I'm interested in it as i'd like to drive motorized sunshaders on windows according to sun position.

First, i'd like to thank the authors for the script. After various test i managed to run it properly (first steps on domoticz for me !).

however, how could theoritical sunposition calculation drive to so broken curves ? It must looks like an ellipsoid, continuous curve (as far as yo dont deal with radiation limitation such as clouds or walls/trees on the path). If there's some broken parts in the curves there must be an error on the WUnderground infos, or in the model you use for Lux calculation.

second part is : why bothering to compute Lux values involving approximate calculation and Wunderground API interrogations ? Sun tables exists, they are established for millenaries, and available to anyone. Moreover, accurate models of sun position prediction are available for free (see Pysolar that gives altitude, azimuth and radiance, model established by NREL)

simply run a script every 1,5 or 10 minute, asking pysolar get_altitude, get_azimuth, get_radiance using, then update virtualdevice with the values

hope it helps

Toulon7559
Posts: 476
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Toulon7559 » Wednesday 01 February 2017 11:54

@ijariya

Short response to your remarks.

First to your 'second part'.
You are right that the calculations exist since ages for nominal conditions.
But jmleglise included in the approximation the effects of actual local weather, and that makes the difference!

That is also the reason for the broken curves you mention in your 'first part'.
The reading for barometric pressure may be frequent (depending on the information source you apply), but the read-out from Ogimet-station does not change very frequent and dynamic. Sometimes the octa-value is provided only once per hour, and then with sometimes significant steps in the octa-value, as a consequence causing major jumps in the curves.
;-) But those curves are then representing the actual conditions, and not the nominal conditions!
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

ikariya
Posts: 3
Joined: Wednesday 01 February 2017 8:52
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by ikariya » Wednesday 01 February 2017 12:56

ok, understood, didnt saw the correction for barometric level.

However, i already used METAR datas for external conditions and they are very approximative to specific condition as they are usually set on airports. using this data at home for me injects lots of discrepancies, as airport is 50 km away.

i'll try to implement PySolar in my own script to get only azimuth and angle witch is my personnal interest to drive the sunshades during summer. give you feedback if i success.

thanks for the help

Toulon7559
Posts: 476
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Toulon7559 » Wednesday 01 February 2017 14:39

Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Toulon7559
Posts: 476
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Post by Toulon7559 » Wednesday 01 February 2017 16:54

Small lightsensor might be very useful as addon for your desired functionality. Simplest: look in this form for ldr attached to domoticz. Better: bh1750 by i2c to esp8266, or similar .....
But always discussion on optimal position for measurement.
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238-1ZN
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 3*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests