dzVents version of the Solar Data Script

User avatar
McMelloW
Posts: 195
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: dzVents version of the Solar Data Script

Post by McMelloW » Saturday 23 December 2017 23:43

I try to create the Solar Altitude & Azimuth custom sensors. At this moment the web interface does not work for creating virtual devices. The JSON command does not work either.

Code: Select all

http://192.168.1.xx:xxxx/json.htm?type=createvirtualsensor&idx=5&sensorname=Altitude&sensortype=1004
I guess it it missing the y-axis value. Does anyone know how this works in JSON?
Greetings McMelloW

poudenes
Posts: 624
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: dzVents version of the Solar Data Script

Post by poudenes » Friday 05 January 2018 11:05

Hi All,

Since couple of weeks i see this error. Not always but within minutes or hours.

Code: Select all

2018-01-04 19:06:00.414 Error: dzVents: Error: SOLAR 2.2.0.....................: An error occured when calling event handler Solar Data
2018-01-04 19:06:00.414 Error: dzVents: Error: SOLAR 2.2.0.....................: ...omoticz/scripts/dzVents/generated_scripts/Solar Data.lua:145: attempt to perform arithmetic on a nil value
2018-01-04 19:11:00.451 Error: dzVents: Error: SOLAR 2.2.0.....................: An error occured when calling event handler Solar Data
2018-01-04 19:11:00.451 Error: dzVents: Error: SOLAR 2.2.0.....................: ./scripts/lua/JSON.lua:660: html passed to JSON:decode():
Not Found
The requested URL /api/40c1f27581c80568/conditions/q/NL/Amsterdam.json was not found on this server.
2018-01-04 19:16:00.492 Error: dzVents: Error: SOLAR 2.2.0.....................: An error occured when calling event handler Solar Data
2018-01-04 19:16:00.493 Error: dzVents: Error: SOLAR 2.2.0.....................: ./scripts/lua/JSON.lua:660: html passed to JSON:decode():
Now using v3.8798 Beta, but before this beta got this error as well.
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

gajotnt
Posts: 70
Joined: Monday 06 February 2017 13:48
Target OS: Raspberry Pi
Domoticz version: V4.9700
Location: Azores
Contact:

Re: dzVents version of the Solar Data Script

Post by gajotnt » Thursday 25 January 2018 16:57

After latest beta (V3.8841) getting some warnings, easily fixed, just wanted y'all to know.

Code: Select all

2018-01-25 13:51:00.539 dzVents: Info: SOLAR 2.2.0: ------ Start internal script: Solar:, trigger: every minute 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0:  

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: ============== SUN LOG ================== 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: pws:IAORESAN3, latitude: 38.656319, longitude: -27.224287 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: WU Location WMO = 08511 

 2018-01-25 13:51:00.548 dzVents: Info: SOLAR 2.2.0: Altitude of the sun = 30.65029531842° 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: Azimuth of the sun = 197.12143891202° 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0:  

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: SYNOP Station = 08509 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: Okta = 7 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: Direct Radiation = 262.12 W/m² 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.549 dzVents: Info: SOLAR 2.2.0: Total weighted lux = 25116.93 Lux 

 2018-01-25 13:51:00.568 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.568 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.569 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.570 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.570 dzVents: Info: SOLAR 2.2.0: domoticz.round deprecated. Please use domoticz.utils.round. 

 2018-01-25 13:51:00.575 dzVents: Info: SOLAR 2.2.0: ------ Finished Solar 

User avatar
EddyG
Posts: 333
Joined: Monday 02 November 2015 6:54
Target OS: Raspberry Pi
Domoticz version: 4.10252
Location: Rhenen, Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by EddyG » Thursday 25 January 2018 21:22

@ BakSeeDaa
Will there be a dzVents 2.4 version (where asynchron communication is implemented) of the script?
Regards,
Eddy

BakSeeDaa
Posts: 551
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version:

Re: dzVents version of the Solar Data Script

Post by BakSeeDaa » Friday 26 January 2018 10:05

EddyG wrote:
Thursday 25 January 2018 21:22
@ BakSeeDaa
Will there be a dzVents 2.4 version (where asynchron communication is implemented) of the script?
Yes. I've released a new script version. See initial post. Don't use the script version found in the wiki. For some reason I can not login to the wiki to maintain it.

Cheers!

BakSeeDaa
Posts: 551
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version:

Re: dzVents version of the Solar Data Script

Post by BakSeeDaa » Friday 26 January 2018 10:20

*************** IMPORTANT NOTE ***************
                                                                                             
This script will be retired. I'm migrating away from Domoticz to another automation
solution. It requires some effort to maintain it and I won't have the time to do it in the future.

If you'd like to become the maintainer of this script, please let me know. (Post here)

globalassist
Posts: 36
Joined: Monday 09 December 2013 17:51
Target OS: Windows
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by globalassist » Friday 26 January 2018 11:12

To what automation solution are you migrating if I might ask?

User avatar
supergroover
Posts: 41
Joined: Friday 12 July 2013 19:37
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by supergroover » Friday 26 January 2018 12:20

Unfortunately is the script retired but i'm getting a error with the new version of the script.

Can somebody help me?

Code: Select all

2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: An error occured when calling event handler script_time_dzventsolarV2
2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: .../dzVents/generated_scripts/script_time_dzventsolarV2.lua:280: attempt to perform arithmetic on field 'lux' (a nil value)

BakSeeDaa
Posts: 551
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version:

Re: dzVents version of the Solar Data Script

Post by BakSeeDaa » Friday 26 January 2018 14:35

supergroover wrote:
Friday 26 January 2018 12:20
Unfortunately is the script retired but i'm getting a error with the new version of the script.

Can somebody help me?

Code: Select all

2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: An error occured when calling event handler script_time_dzventsolarV2
2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: .../dzVents/generated_scripts/script_time_dzventsolarV2.lua:280: attempt to perform arithmetic on field 'lux' (a nil value)
Maybe you have uncommented line 33 to use a Lux device with the script (that''s optional) but some way you have set the device idx to a non existent device or a device that is not of type "Lux"?

Code: Select all

local idxLux = 630 -- (Integer) Domoticz virtual Lux device ID
Cheers!

NuNca
Posts: 4
Joined: Wednesday 07 June 2017 23:01
Target OS: NAS (Synology & others)
Domoticz version: beta
Contact:

Re: dzVents version of the Solar Data Script

Post by NuNca » Friday 26 January 2018 14:57

supergroover wrote:
Friday 26 January 2018 12:20
Unfortunately is the script retired but i'm getting a error with the new version of the script.

Can somebody help me?

Code: Select all

2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: An error occured when calling event handler script_time_dzventsolarV2
2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: .../dzVents/generated_scripts/script_time_dzventsolarV2.lua:280: attempt to perform arithmetic on field 'lux' (a nil value)
I had the same problem and found why it was going wrong.
You probably copied the variables at the top of the script from the old to the new version. But the variables have changed a bit.

change this line at the top:

Code: Select all

local fetchIntervalMins = 5						-- (Integer) (Minutes, Range 5-60) How often Wunderground API is called
to:

Code: Select all

local fetchIntervalDayMins = 5 -- Day time scraping interval. Never set this below 4 if you have a free WU API account.
local fetchIntervalNightMins = 30 -- Night time scraping interval. 
this solved the problem for me.

User avatar
supergroover
Posts: 41
Joined: Friday 12 July 2013 19:37
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by supergroover » Friday 26 January 2018 15:50

BakSeeDaa wrote:
Friday 26 January 2018 14:35
supergroover wrote:
Friday 26 January 2018 12:20
Unfortunately is the script retired but i'm getting a error with the new version of the script.

Can somebody help me?

Code: Select all

2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: An error occured when calling event handler script_time_dzventsolarV2
2018-01-26 11:15:11.165 dzVents: Error (2.4.0): solarData 2.4.0: .../dzVents/generated_scripts/script_time_dzventsolarV2.lua:280: attempt to perform arithmetic on field 'lux' (a nil value)
Maybe you have uncommented line 33 to use a Lux device with the script (that''s optional) but some way you have set the device idx to a non existent device or a device that is not of type "Lux"?

Code: Select all

local idxLux = 630 -- (Integer) Domoticz virtual Lux device ID
Cheers!
Thanks, i have made a new dummy lux device what is exactly the same as previous lux device and problem solved... :o

Arie
Posts: 19
Joined: Saturday 27 January 2018 22:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by Arie » Tuesday 30 January 2018 17:35

Anyone have any idea what could be the issue here?
The Cloud Cover device is at 100%, whereas there are almost no clouds at the moment.
The Lux device value seems to be very low, not corresponding with the time of day.
The Azimuth and Altitude values seem OK?

2018-01-30 16_23_06-Domoticz.png
Utilities Tab
2018-01-30 16_23_06-Domoticz.png (55.28 KiB) Viewed 2112 times

The PWS which I use is working fine.
ID numbers are all correct, just double checked.
WMOID taken from the Ogimet website; 06340: Woensdrecht (Netherlands).

2018-01-30 16_27_33-script_time_solarsensor.lua.png
LUA Script
2018-01-30 16_27_33-script_time_solarsensor.lua.png (118.84 KiB) Viewed 2111 times

What is causing this issue with the Cloud Cover and Lux devices?

Arie
Posts: 19
Joined: Saturday 27 January 2018 22:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by Arie » Tuesday 30 January 2018 17:47

Below a screenshot of the log.

2018-01-30 16_41_04-Log.png
Log
2018-01-30 16_41_04-Log.png (40.14 KiB) Viewed 2105 times

User avatar
McMelloW
Posts: 195
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: dzVents version of the Solar Data Script

Post by McMelloW » Tuesday 30 January 2018 18:24

What is the distance of woensdrecht and your weatherstaion pws:xxxx In my situation it is over 16km. It can be 100% cloud cover at the Ogimet and a bright sky at my weatherstation.
Greetings McMelloW

Arie
Posts: 19
Joined: Saturday 27 January 2018 22:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by Arie » Tuesday 30 January 2018 20:19

60 KM... You've got a point.

User avatar
McMelloW
Posts: 195
Joined: Monday 20 November 2017 18:01
Target OS: Raspberry Pi
Domoticz version: V3.beta
Location: Harderwijk, NL
Contact:

Re: dzVents version of the Solar Data Script

Post by McMelloW » Tuesday 30 January 2018 20:51

I discovered the same difference in my situation. Ogimet is taken from Lelystad Airport. pws is at Harderwijk, only 600m from my house. The distance in direct line is only 16km. Still there can be large differences in local weather.
Greetings McMelloW

TacticalLeader
Posts: 13
Joined: Tuesday 19 January 2016 14:19
Target OS: Raspberry Pi
Domoticz version: latest
Location: Szeged, Hungary
Contact:

Re: dzVents version of the Solar Data Script

Post by TacticalLeader » Friday 02 February 2018 11:40

Hi guys,

I have the following issue with this solar data script. I installed the latest beta an hour ago and setup this script. The problem is the solar data script triggers other script, named "kulcs_haromszog_1". The triggered script is a blockly script and the solar data is dzvents.. What can cause this? Please find the log I attached:

Code: Select all

2018-02-02 10:30:00.440 dzVents: Info: solarData 2.4.0: ------ Start internal script: nap_az_egen:, trigger: every 15 minutes at daytime
2018-02-02 10:30:00.443 dzVents: Info: solarData 2.4.0: ------ Finished nap_az_egen
2018-02-02 10:30:00.631 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-02-02 10:30:06.163 dzVents: Info: Handling httpResponse-events for: "solarDataOgimet
2018-02-02 10:30:06.163 dzVents: Info: solarData 2.4.0: ------ Start internal script: nap_az_egen: HTTPResponse: "solarDataOgimet"
2018-02-02 10:30:06.166 dzVents: Info: solarData 2.4.0: ------ Finished nap_az_egen
2018-02-02 10:30:06.178 EventSystem: Event triggered: kulcs_haromszog_1
2018-02-02 10:30:06.178 log: meg lett nyomva a kulcson a háromszög
2018-02-02 10:30:11.291 dzVents: Info: Handling httpResponse-events for: "solarDataWU
2018-02-02 10:30:11.291 dzVents: Info: solarData 2.4.0: ------ Start internal script: nap_az_egen: HTTPResponse: "solarDataWU"
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0:
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0: ============== NAP - NAPLÓ ==================
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0: mycity, lati: XX.329299, lon: XX.204867
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0: WU locat WMO = 12982
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0: Altitude of the sun = 25.04806524171°
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0: Azimuth of the sun = 161.68215874726°
2018-02-02 10:30:11.310 dzVents: Info: solarData 2.4.0:
2018-02-02 10:30:11.311 dzVents: Info: solarData 2.4.0: SYNOP Station = 12HH2
2018-02-02 10:30:11.311 dzVents: Info: solarData 2.4.0: Okta = 7
2018-02-02 10:30:11.311 dzVents: Info: solarData 2.4.0: Direct Radiation = 176.88 W/m²
2018-02-02 10:30:11.311 dzVents: Info: solarData 2.4.0: Total weighted lux = 18926.14 Lux
2018-02-02 10:30:11.355 dzVents: Info: solarData 2.4.0: ------ Finished nap_az_egen
2018-02-02 10:30:11.356 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-02-02 10:30:11.369 EventSystem: Event triggered: kulcs_haromszog_1
2018-02-02 10:30:11.369 log: meg lett nyomva a kulcson a háromszög

nalesnikizdzemem
Posts: 4
Joined: Sunday 07 January 2018 18:22
Target OS: Raspberry Pi
Domoticz version: beta
Location: Poland
Contact:

Re: dzVents version of the Solar Data Script

Post by nalesnikizdzemem » Saturday 10 February 2018 21:39

Hi,
recently I installed the script but I am getting some error:

2018-02-10 20:24:05.886 dzVents: Info: solarData 2.4.0: ------ Start internal script: solarData: HTTPResponse: "solarDataOgimet"
2018-02-10 20:24:05.887 dzVents: Debug: solarData 2.4.0: Ogimet data has been received
2018-02-10 20:24:05.889 dzVents: Debug: solarData 2.4.0: Using the saved Okta value: 0 with UTC timestamp: 198001010000
2018-02-10 20:24:05.889 dzVents: Error (2.4.1): solarData 2.4.0: We've got no cloud data from WMOID: 12550 for more than 334099 hours. Maybe you should look for a more reliable weather station to query. Read the Wiki how to do that.
2018-02-10 20:24:05.890 dzVents: Info: solarData 2.4.0: ------ Finished solarData

Does anyone know what is that and how to fix it?

Arie
Posts: 19
Joined: Saturday 27 January 2018 22:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: dzVents version of the Solar Data Script

Post by Arie » Sunday 11 February 2018 1:34

The weather station which you have selected did not supply cloud data for a very long time. Simply select a different weather station from the Ogimet website and add that to the script instead.

nalesnikizdzemem
Posts: 4
Joined: Sunday 07 January 2018 18:22
Target OS: Raspberry Pi
Domoticz version: beta
Location: Poland
Contact:

Re: dzVents version of the Solar Data Script

Post by nalesnikizdzemem » Sunday 11 February 2018 8:04

Thanks!
I did what you suggested and it works fine.
Unfortunately the previous station was located in my city and the new one is 65km away from me.

Thanks a lot for support.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests