Page 4 of 9

Re: dzVents version of the Solar Data Script

Posted: Tuesday 10 October 2017 8:49
by BakSeeDaa
EddyG wrote: Tuesday 10 October 2017 7:17 I get these errors sometimes too.
Perhaps the script could be changed to first save at an other tmp file and if that file is 0 bytes, the old file could be in place.
If the bytes are close to the previous file the file could be copied over the old one.
The error message just indicates that there is no Weather underground data to read. It can happen due to several conditions. Probably the Weather Underground server did not respond in time for some reason.

There is nothing to worry about really unless you get these error messages every 5 minutes (e.g every fetchIntervalMins). In such a case you'd need to investigate what's going on.

The dzVents version of the Solar Data Script informs you about the error condition but a single missing response from the Weather Underground server now and then shouldn't be any reason for worry.

Re: dzVents version of the Solar Data Script

Posted: Thursday 19 October 2017 18:00
by EdwinK
I now get the following error:
2017-10-19 17:56:02.711 Error: dzVents: Error: SOLAR 2.1.1: There is no device with that name or id: 204
2017-10-19 17:56:02.712 Error: dzVents: Error: SOLAR 2.1.1: An error occured when calling event handler Solar Data
2017-10-19 17:56:02.712 Error: dzVents: Error: SOLAR 2.1.1: ...icz/var/scripts/dzVents/generated_scripts/Solar Data.lua:300: attempt to index a nil value
I just checked and there is a device 204. So I wonder where this comes from, and how to fix it

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 6:31
by hairynoggin
anyone had success with this and windows? what are your settings? I keep getting

SOLAR 2.2.0: Could not read wuAPIData from file: C:\Domoticz\tmp\wuData.json

is this the correct format? local tmpFileWU = 'C:\\Domoticz\\tmp\\wuData.json' -- Temporary storage of WU API json result

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 8:08
by BakSeeDaa
EdwinK wrote: Thursday 19 October 2017 18:00 I now get the following error:
2017-10-19 17:56:02.711 Error: dzVents: Error: SOLAR 2.1.1: There is no device with that name or id: 204
2017-10-19 17:56:02.712 Error: dzVents: Error: SOLAR 2.1.1: An error occured when calling event handler Solar Data
2017-10-19 17:56:02.712 Error: dzVents: Error: SOLAR 2.1.1: ...icz/var/scripts/dzVents/generated_scripts/Solar Data.lua:300: attempt to index a nil value
I just checked and there is a device 204. So I wonder where this comes from, and how to fix it
I can't say. It's very little information to go on.

Did you define a cloud cover device? Is it a percentage device?

Make the script output some debug messages. Quote them here together with the configuration part (remove sensitive parts like the wuAPIkey). Also provide info about what dzVents version that you are using. The script requires dzVents version 2.3.0 or higher. Thanks.

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 8:30
by BakSeeDaa
hairynoggin wrote: Thursday 26 October 2017 6:31 anyone had success with this and windows? what are your settings? I keep getting

SOLAR 2.2.0: Could not read wuAPIData from file: C:\Domoticz\tmp\wuData.json

is this the correct format? local tmpFileWU = 'C:\\Domoticz\\tmp\\wuData.json' -- Temporary storage of WU API json result
The script requires curl in order to work. The script makes a few OS calls. For example:

Code: Select all

			os.execute('curl -s "'..url..'" > '..tmpFileWU..'&')
The above won't work on Windows. Feel free to experiment with it though. I add a note about it in the initial post. Thanks.

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 8:32
by hairynoggin
I should add that the temporary files that the script produces are all empty. the script definitely connects but for what ever reason no data is saved. this happens every 5 minutes

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 8:33
by hairynoggin
BakSeeDaa wrote: Thursday 26 October 2017 8:30
hairynoggin wrote: Thursday 26 October 2017 6:31 anyone had success with this and windows? what are your settings? I keep getting

SOLAR 2.2.0: Could not read wuAPIData from file: C:\Domoticz\tmp\wuData.json

is this the correct format? local tmpFileWU = 'C:\\Domoticz\\tmp\\wuData.json' -- Temporary storage of WU API json result
The script requires curl in order to work. The script makes a few OS calls. For example:

Code: Select all

			os.execute('curl -s "'..url..'" > '..tmpFileWU..'&')
The above won't work on Windows. Feel free to experiment with it though. I add a note about it in the initial post. Thanks.

Thanks I will do some more testintg

/

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 10:39
by EdwinK
Still having problems with this script

Code: Select all

2017-10-26 10:36:00.952 Error: dzVents: Error: SOLAR 2.1.1: There is no device with that name or id: 204
2017-10-26 10:36:00.952 Error: dzVents: Error: SOLAR 2.1.1: An error occured when calling event handler Solar Data
2017-10-26 10:36:00.952 Error: dzVents: Error: SOLAR 2.1.1: ...icz/var/scripts/dzVents/generated_scripts/Solar Data.lua:300: attempt to index a nil value
Screen Shot 2017-10-26 at 10.37.49.png
Screen Shot 2017-10-26 at 10.37.49.png (46.33 KiB) Viewed 3738 times

Re: dzVents version of the Solar Data Script

Posted: Thursday 26 October 2017 10:54
by EdwinK
O, didn't see the newest version out

Re: dzVents version of the Solar Data Script

Posted: Sunday 29 October 2017 19:44
by BakSeeDaa
EdwinK wrote: Thursday 26 October 2017 10:54 O, didn't see the newest version out
OK, then after upgrading...

1) Did you define a cloud cover device?
2) Is it a percentage device?
3) Make the script output some debug messages. (

Code: Select all

level = domoticz.LOG_DEBUG
)
4) Quote debug output together with the configuration part (remove sensitive parts like the wuAPIkey).
5) Also provide info about what dzVents version that you are using. The script requires dzVents version 2.3.0 or higher.

Thanks.

Re: dzVents version of the Solar Data Script

Posted: Sunday 29 October 2017 19:55
by EdwinK
Ah... Oaky. Just did a check and it seems that on the Synology version we are still on 2.2.0. Guess I'm out of luck for now, until Jumbotroll releases a new version of domoticz and that will only be after there is a new stable version ;(

Re: dzVents version of the Solar Data Script

Posted: Wednesday 15 November 2017 21:48
by gajotnt
Can you please add the UV index info from Weather Underground to this script? :D

Re: dzVents version of the Solar Data Script

Posted: Thursday 16 November 2017 8:10
by BakSeeDaa
gajotnt wrote: Wednesday 15 November 2017 21:48 Can you please add the UV index info from Weather Underground to this script? :D
I have plans to release a brand new dzVents script for pulling Weather Underground data from a city or a specific PWS. The UV index will most likely be handled by that script. So hang on a while and watch out for any news in the dzVents Lua Framework forum table

Cheers!

Re: dzVents version of the Solar Data Script

Posted: Thursday 16 November 2017 10:25
by EdwinK
Will do so :)

Re: dzVents version of the Solar Data Script

Posted: Thursday 16 November 2017 11:11
by gajotnt
Thanks :D

Re: dzVents version of the Solar Data Script

Posted: Saturday 23 December 2017 13:43
by renerene
just installed dzVents version, local scriptVersion = '2.2.1'

Two issues:
1) I have not created variable warnNoCloudDataHours, was waiting for the error but nothing (also there is NO info in the Wiki)
2) round error below

Suggestions?

Result:

Code: Select all

 2017-12-23 13:40:01.368 dzVents: Info: SOLAR 2.2.1: ------ Start internal script: dzLUX:, trigger: every minute
2017-12-23 13:40:01.540 dzVents: Debug: SOLAR 2.2.1: Wunderground API json data file has been read
2017-12-23 13:40:01.549 Error: dzVents: Error: SOLAR 2.2.1: An error occured when calling event handler dzLUX
2017-12-23 13:40:01.549 Error: dzVents: Error: SOLAR 2.2.1: .../pi/domoticz/scripts/dzVents/generated_scripts/dzLUX.lua:167: attempt to call field 'round' (a nil value)
2017-12-23 13:40:01.550 dzVents: Info: SOLAR 2.2.1: ------ Finished dzLUX 
setting default values for azimuth, longitude, altitude in script gives the same error

Re: dzVents version of the Solar Data Script

Posted: Saturday 23 December 2017 16:30
by BakSeeDaa
renerene wrote: Saturday 23 December 2017 13:43 just installed dzVents version, local scriptVersion = '2.2.1'

Two issues:
1) I have not created variable warnNoCloudDataHours, was waiting for the error but nothing (also there is NO info in the Wiki)
2) round error below

Suggestions?

Result:

Code: Select all

 2017-12-23 13:40:01.368 dzVents: Info: SOLAR 2.2.1: ------ Start internal script: dzLUX:, trigger: every minute
2017-12-23 13:40:01.540 dzVents: Debug: SOLAR 2.2.1: Wunderground API json data file has been read
2017-12-23 13:40:01.549 Error: dzVents: Error: SOLAR 2.2.1: An error occured when calling event handler dzLUX
2017-12-23 13:40:01.549 Error: dzVents: Error: SOLAR 2.2.1: .../pi/domoticz/scripts/dzVents/generated_scripts/dzLUX.lua:167: attempt to call field 'round' (a nil value)
2017-12-23 13:40:01.550 dzVents: Info: SOLAR 2.2.1: ------ Finished dzLUX 
setting default values for azimuth, longitude, altitude in script gives the same error
Initial post wrote:Requires Domoticz v3.8551 or later
- What is your version?

In case you missed the prerequisite part and you'd like to upgrade to a Beta Version of Domoticz you'd need to wait because I created a nasty bug that hasn't been fixed yet.

Re: dzVents version of the Solar Data Script

Posted: Saturday 23 December 2017 16:48
by renerene
Problem solved; it was in the new 'round' method. I was on 'stable' update, with old dzVents version.
I did see your advice just now, after the update.

Since Beta 39794, all timers based on sunrise/sunset do not function...


--> Oh well,if that is the only problem: no worry, will use my LUX variable for that now ;-)

Re: dzVents version of the Solar Data Script

Posted: Saturday 23 December 2017 17:14
by BakSeeDaa
renerene wrote: Saturday 23 December 2017 16:48 Problem solved; it was in the new 'round' method. I was on 'stable' update, with old dzVents version.
I did see your advice just now, after the update.

Since Beta 39794, all timers based on sunrise/sunset do not function...


--> Oh well,if that is the only problem: no worry, will use my LUX variable for that now ;-)
Don't forget to backup first in case you need to revert for some reason. Cheers!

Re: dzVents version of the Solar Data Script

Posted: Saturday 23 December 2017 17:52
by EdwinK
renerene wrote: Saturday 23 December 2017 16:48

Since Beta 39794, all timers based on sunrise/sunset do not function...

Good to know. Need to change some stuff then.