UV index readings realtime Topic is solved

Moderator: leecollings

User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: UV index readings realtime

Post by FireWizard »

@Benneton,

Hello Bernhard,

This thread is discussing the daily produced UV values, Max. UV values, Safe exposure time and the Ozone value.
In fact these are "Health" issues and indications to avoid skin burn or skin cancer.

It has nothing to do with the Solar forecast, so that you can predict what you Solar panels produce.
If you are interested in that, have a look at https://www.domoticz.com/forum/viewtopi ... r+forecast.

Here you will find also a dZVents script, that polls api.forecast.solar
I use this script for a couple of months and it works error free. However the forecast is often too optimistic.

Regards
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: UV index readings realtime

Post by Benneton »

Hi FireWizard,

Will look into that, and see if this bring additional value to my setup.
Solar panels monitoring still works fine :)

Bernard
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: UV index readings realtime

Post by Toulon7559 »

With waaren's Open_UV script as basis looking for a new source of Ozone-information, to replace DarkSky's ozone info.

Equivalent to the devices for UV, added in Domoticz a virtual device, but as Custom Sensor to deal with ozone-level in Dobson-units, with a corresponding line in the 'data'-section of the script (see below)

Code: Select all

openUV_ozone_Dobson_device = {initial = 65                                  },
In the script already an item which seems applicable

Code: Select all

openUVResponse.result.ozone
Using that item, in de 'update'-section added one line equivalent to the readout & compilation of the UV-info, as shown below.

Code: Select all

            -- Update UV devices    
            dz.devices(dz.data.openUV_currentUV_device).updateUV(dz.utils.round(openUVResponse.result.uv,1))
            dz.devices(dz.data.openUV_maxUV_device).updateUV(dz.utils.round(openUVResponse.result.uv_max,1))
            -- Update Ozone device    
            dz.devices(dz.data.openUV_ozone_Dobson_device).updateUV(dz.utils.round(openUVResponse.result.ozone,1))
Unfortunately no update resulting for the new device.
Any hint?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: UV index readings realtime

Post by waaren »

Toulon7559 wrote: Thursday 29 October 2020 16:30

Code: Select all

 dz.devices(dz.data.openUV_ozone_Dobson_device).updateUV(dz.utils.round(openUVResponse.result.ozone,1))
You have defined a custom sensor but try to update it with a method that is only available for UV type devices.
For custom sensors you need to use the method updateCustomSensor. See this wiki chapter on this device type.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: UV index readings realtime

Post by Toulon7559 »

@waaren
Thanks!
;-) Still a lot to learn for use of dzVents ........
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest