Re: UV index readings realtime
Posted: Sunday 31 May 2020 10:04
@ Waaren,
Thanks for your quick reply, the script now works as desired.
Jan
Thanks for your quick reply, the script now works as desired.
Jan
Code: Select all
2020-06-01 16:19:20.052 Error: dzVents: Error: (3.0.8) module 'D.M.: UV - Ozon DZ 2' not found:
2020-06-01 16:19:20.052 no field package.preload['D.M.: UV - Ozon DZ 2']
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/dzVents/runtime/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/dzVents/runtime/device-adapters/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/dzVents/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/scripts/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/../lua/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/scripts/modules/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/generated_scripts/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/data/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/modules/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/usr/local/share/lua/5.3/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/usr/local/share/lua/5.3/D/M/: UV - Ozon DZ 2/init.lua'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/D/M/: UV - Ozon DZ 2/init.lua'
2020-06-01 16:19:20.052 no file '/usr/share/lua/5.3/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/usr/share/lua/5.3/D/M/: UV - Ozon DZ 2/init.lua'
2020-06-01 16:19:20.052 no file './D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file './D/M/: UV - Ozon DZ 2/init.lua'
2020-06-01 16:19:20.052 no file '/home/pi/domoticz/scripts/dzVents/D/M/: UV - Ozon DZ 2.lua'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/D/M/: UV - Ozon DZ 2.so'
2020-06-01 16:19:20.052 no file '/usr/lib/aarch64-linux-gnu/lua/5.3/D/M/: UV - Ozon DZ 2.so'
2020-06-01 16:19:20.052 no file '/usr/lib/lua/5.3/D/M/: UV - Ozon DZ 2.so'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/loadall.so'
2020-06-01 16:19:20.052 no file './D/M/: UV - Ozon DZ 2.so'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/D.so'
2020-06-01 16:19:20.052 no file '/usr/lib/aarch64-linux-gnu/lua/5.3/D.so'
2020-06-01 16:19:20.052 no file '/usr/lib/lua/5.3/D.so'
2020-06-01 16:19:20.052 no file '/usr/local/lib/lua/5.3/loadall.so'
2020-06-01 16:19:20.052 no file './D.so'Try to use names without . and /
Code: Select all
data = { openUV_Longitude = {initial = "6.823890" }, -- I store my longitude, latitude, APIkey, filename in data
openUV_Latitude = {initial = "81.879560" }, -- You can get them from domoticz settings
openUV_Filename = {initial = "/home/pi/domoticz/scripts/dzVents/data/OpenUV.json" }, -- path relative to domoticz directory
openUV_APIKey = {initial = "5f1327281a5c967a6e333ee91652" }, -- get your free API key from https://www.openuv.io/
openUV_currentUV_device = {initial = 13573 }, -- Oosterhout: UV
openUV_maxUV_device = {initial = 13575 }, --Oosterhout: UV Max
openUV_UV_Alert_device = {initial = 13574 }, -- Oosterhout: UV Alarm
openUV_ozone_Alert_device = {initial = 13577 }, -- Oosterhout: UV Max Tijd
},
You scriptName does contain these characters.
Code: Select all
openUV_Filename = {initial = "/home/pi/domoticz/scripts/dzVents/data/OpenUV.json" }, -- path relative to domoticz directoryNo that's ok.Derik wrote: Monday 01 June 2020 17:51 Sorry will change that.
I use the intern editor..
Is that a problem?
Code: Select all
2020-06-01 18:20:04.583 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.
2020-06-01 18:20:04.584 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV Max" (deviceType=General, deviceSubType=Alert). If you believe this is not correct, please report.
2020-06-01 18:20:04.654 Error: dzVents: Error: (3.0.8) openUV: Method updateAlertSensor is not available for device "Oosterhout: UV Max Tijd" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.
2020-06-01 18:30:08.937 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.
2020-06-01 18:30:08.938 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV Max" (deviceType=General, deviceSubType=Alert). If you believe this is not correct, please report.
2020-06-01 18:30:09.020 Error: dzVents: Error: (3.0.8) openUV: Method updateAlertSensor is not available for device "Oosterhout: UV Max Tijd" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.
2020-06-01 18:40:05.209 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.
2020-06-01 18:40:05.210 Error: dzVents: Error: (3.0.8) openUV: Method updateUV is not available for device "Oosterhout: UV Max" (deviceType=General, deviceSubType=Alert). If you believe this is not correct, please report.
2020-06-01 18:40:05.280 Error: dzVents: Error: (3.0.8) openUV: Method updateAlertSensor is not available for device "Oosterhout: UV Max Tijd" (deviceType=General, deviceSubType=Custom Sensor). If you believe this is not correct, please report.If you look at the script I Posted, you will see thatDerik wrote: Monday 01 June 2020 18:42 Look there is something a live...
Edit:
See the errors in the log:
You used other device types and therefore the commands do not work.-- You have to create a couple of virtual devices
-- (first two as UV sensors and other two as Alert)
Code: Select all
2020-06-02 07:19:01.037 Error: Error opening url: https://api.openuv.io/api/v1/uv?lat=51.879560&lng=5.823890
2020-06-02 07:19:04.186 Status: dzVents: Info: Handling httpResponse-events for: "openUV_Response"
2020-06-02 07:19:04.186 Error: dzVents: Error: (3.0.8) openUV: HTTP/1.1 response: 403 ==>> Forbidden
2020-06-02 07:19:04.187 Error: dzVents: Error: (3.0.8) openUV: An error occurred when calling event handler Weer UV Ozon DZ 2
2020-06-02 07:19:04.187 Error: dzVents: Error: (3.0.8) openUV: .../scripts/dzVents/generated_scripts/Weer UV Ozon DZ 2.lua:61: attempt to index a nil value (field 'result')
2020-06-02 07:19:05.109 (D.M.: RFXcomE) Temp (D.M.: Garage)Code: Select all
MacBook-van-Edwin:~ edwin$ ping www.openuv.io
PING www.openuv.io.herokudns.com (52.21.175.83): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
^C
--- www.openuv.io.herokudns.com ping statistics ---
11 packets transmitted, 0 packets received, 100.0% packet lossCode: Select all
ping openuv.io
PING openuv.io (192.64.119.115): 56 data bytes
64 bytes from 192.64.119.115: icmp_seq=0 ttl=49 time=152.101 ms
64 bytes from 192.64.119.115: icmp_seq=1 ttl=49 time=150.968 ms
64 bytes from 192.64.119.115: icmp_seq=2 ttl=49 time=150.800 ms
64 bytes from 192.64.119.115: icmp_seq=3 ttl=49 time=149.631 ms
64 bytes from 192.64.119.115: icmp_seq=4 ttl=49 time=151.367 ms
64 bytes from 192.64.119.115: icmp_seq=5 ttl=49 time=154.374 ms
^C
--- openuv.io ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 149.631/151.540/154.374/1.466 ms
Code: Select all
1 192.168.0.1 (192.168.0.1) 4.285 ms 0.989 ms 1.591 ms
2 002-112-158-163.dynamic.caiway.nl (163.158.112.2) 3.857 ms 4.676 ms 4.010 ms
3 cn-asd-kl-cr15-be2003-2010.caiw.net (62.45.30.229) 4.033 ms 3.614 ms 5.515 ms
4 et-0-0-47.cr3-ams2.ip4.gtt.net (92.60.243.125) 3.205 ms 3.144 ms 3.306 ms
5 ae3.cr4-ams1.ip4.gtt.net (89.149.181.54) 14.783 ms
ae7.cr4-ams1.ip4.gtt.net (213.200.117.170) 21.421 ms 30.869 ms
6 ip4.gtt.net (46.33.83.250) 6.365 ms 4.635 ms 4.913 ms
7 ae-18.r25.amstnl02.nl.bb.gin.ntt.net (129.250.2.108) 4.692 ms 4.693 ms 11.416 ms
8 ae-5.r23.asbnva02.us.bb.gin.ntt.net (129.250.6.162) 84.028 ms 90.513 ms 89.984 ms
9 ae-0.r22.asbnva02.us.bb.gin.ntt.net (129.250.3.84) 84.176 ms 90.008 ms 88.885 ms
10 ae-5.r23.lsanca07.us.bb.gin.ntt.net (129.250.3.189) 148.441 ms 181.022 ms 155.696 ms
11 ae-2.r01.lsanca07.us.bb.gin.ntt.net (129.250.4.107) 145.726 ms 150.245 ms 149.278 ms
12 192.80.17.102 (192.80.17.102) 155.166 ms 153.422 ms 148.759 ms
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
31 * * *
32 * * *
33 * * *
34 * * *
35 * * *
36 * * *
37 * * *
38 * * *
39 * * *
40 * * *
41 * * *
42 * * *
43 * * *
44 * * *
45 * * *
46 * * *
and so on If you send the script as you have it now via PM I will have a lookDerik wrote: Tuesday 02 June 2020 7:23 Changed the dummy's
Now i get a login error?
I use the token on the site. [ copy paste ]Code: Select all
2020-06-02 07:19:01.037 Error: Error opening url: https://api.openuv.io/api/v1/uv?lat=51.879560&lng=5.823890 2020-06-02 07:19:04.186 Status: dzVents: Info: Handling httpResponse-events for: "openUV_Response" 2020-06-02 07:19:04.186 Error: dzVents: Error: (3.0.8) openUV: HTTP/1.1 response: 403 ==>> Forbidden 2020-06-02 07:19:04.187 Error: dzVents: Error: (3.0.8) openUV: An error occurred when calling event handler Weer UV Ozon DZ 2 2020-06-02 07:19:04.187 Error: dzVents: Error: (3.0.8) openUV: .../scripts/dzVents/generated_scripts/Weer UV Ozon DZ 2.lua:61: attempt to index a nil value (field 'result') 2020-06-02 07:19:05.109 (D.M.: RFXcomE) Temp (D.M.: Garage)
only a nill?
Code: Select all
2020-06-08 18:07:10.383 Error: OpenUV2 hardware (15) thread seems to have ended unexpectedlyDid you also remove the plugin from the hardware tab?Toulon7559 wrote: Monday 08 June 2020 18:15How to get rid of that error report ( otherCode: Select all
2020-06-08 18:07:10.383 Error: OpenUV2 hardware (15) thread seems to have ended unexpectedlythan by installation of the plugin)?
Bernard,Benneton wrote: Wednesday 05 August 2020 20:27
@Jan Jansen
I see in your post that you have the "Zonnekracht in watt/m2, is there a conversion done or is this value available from the OpenUV.io?
I would like to have this one too, with it I can calculate what my solar panels should do (approx.)
Bernard