How do I put my virtual weather devices in the weather tab? Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

How do I put my virtual weather devices in the weather tab?

Post by Sarcas »

I made my own DzVents script to get weather info and forecasts from OpenWeathermap. It is current weather, temperature and descriptions like ‘cloudy’, and I choose forecast periods of 3, 6 and 9 hours. I can find the temperature devices in the Temperature-tab, but the weather tab would make more sense. The text prediction are under ‘Utility’. How can I move the devices to the correct tab?

Thx
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by waaren »

Sarcas wrote: Tuesday 22 December 2020 9:48 How can I move the devices to the correct tab?
You can't.
The tab where devices are shown is hardcoded based on the devicetypes.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by kiddigital »

Sarcas wrote:I made my own DzVents script to get weather info and forecasts from OpenWeathermap. It is current weather, temperature and descriptions like ‘cloudy’, and I choose forecast periods of 3, 6 and 9 hours...

Thx
Just curious, which version are you running? Did you try the updated OWM module in the Beta? Wondering what your use-case is that might not be covered by the updated module Image
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by Sarcas »

I made the script before the updated OWM module. I did not know it was updated actually. I am running the latest beta. I believe my main reason for making my own script was that I wanted forecasts for several hours.

I'll take a look at the module, thanks for the tip!
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by Sarcas »

The new module look pretty good. Easy to set up :)

My script just used the sensors I needed at that time, but the new module got them all. Nice. I’ll see if I can make a script to clean it up a bit though. I don’t like ‘Hour 1’ or ‘Day 1’ and in my script I change the device names to like “Precipitation at 16:00h” or “Feel temp tomorrow (Thursday)”.
dash.png
dash.png (201.89 KiB) Viewed 955 times
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by kiddigital »

Glad it works for you.

About the device names, as the predictions ‘move’ over time, hour 1 is a different hour every hour. It points the the 1 hour after the current hour.

Do you constantly update the devicenames in your script? So they keep changing?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Re: How do I put my virtual weather devices in the weather tab?

Post by Sarcas »

Sorry, I somehow missed the question... So with a bit of a delay: yes, the script changes the names of the virtual devices every hour.

Something like this:

Code: Select all

		forecast_temp_6h_deviceName 	= 'Temperatuur om ' .. os.date("%H", OWMMain.hourly[6].dt) .. ':' .. os.date("%M", OWMMain.hourly[6].dt) .. ' uur:'
		newName 			= domoticz.utils.urlEncode(forecast_temp_6h_deviceName)
		url				= domoticz.settings.url .. "/json.htm?type=command&param=renamedevice&idx=" .. idx_forecast_temp_6h .. "&name="  .. newName
		domoticz.openURL(url)
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
Post Reply

Who is online

Users browsing this forum: Daro1003 and 1 guest