dzVents version of the Solar Data Script  [SOLVED]

Moderator: leecollings

Locked
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post 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
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
hairynoggin
Posts: 7
Joined: Thursday 26 October 2017 6:26
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents version of the Solar Data Script

Post 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
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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.
hairynoggin
Posts: 7
Joined: Thursday 26 October 2017 6:26
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents version of the Solar Data Script

Post 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
hairynoggin
Posts: 7
Joined: Thursday 26 October 2017 6:26
Target OS: Windows
Domoticz version:
Contact:

Re: dzVents version of the Solar Data Script

Post 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

/
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post 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 3739 times
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post by EdwinK »

O, didn't see the newest version out
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post 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 ;(
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
gajotnt
Posts: 70
Joined: Monday 06 February 2017 12:48
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.9700
Location: Azores
Contact:

Re: dzVents version of the Solar Data Script

Post by gajotnt »

Can you please add the UV index info from Weather Underground to this script? :D
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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!
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post by EdwinK »

Will do so :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
gajotnt
Posts: 70
Joined: Monday 06 February 2017 12:48
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.9700
Location: Azores
Contact:

Re: dzVents version of the Solar Data Script

Post by gajotnt »

Thanks :D
renerene
Posts: 316
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: dzVents version of the Solar Data Script

Post 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
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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.
renerene
Posts: 316
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: dzVents version of the Solar Data Script

Post 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 ;-)
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: dzVents version of the Solar Data Script

Post 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!
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: dzVents version of the Solar Data Script

Post 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.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Locked

Who is online

Users browsing this forum: No registered users and 0 guests