It is currently August 9th, 2022, 10:22 pm

How do I automatically turn a skin on or off based on weather information?

Get help with creating, editing & fixing problems with skins
User avatar
tass_co
Posts: 237
Joined: May 4th, 2020, 3:01 pm

Re: How do I automatically turn a skin on or off based on weather information?

Post by tass_co »

Pyuahowaito wrote: August 5th, 2022, 12:18 am
Can you try and let me know the result :thumbup:
JSBarometer_withRain.rmskin
You do not have the required permissions to view the files attached to this post.
I dont know where i going from here but i promise. it wont be boring....
User avatar
balala
Rainmeter Sage
Posts: 14448
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How do I automatically turn a skin on or off based on weather information?

Post by balala »

Pyuahowaito wrote: August 4th, 2022, 10:39 pm I really don't know how to modify the weather skin correctly, this skin is very good I understand the approximate way of working but it is very complicated for me, at the moment I do not know how to correctly make the Rain skin automatically turn on and off according to the humidity provided by the JSBarometer skin1.jpg
Try out tass_co's skin (I didn't try it out so far) to see how is it working. I won't alter his code, but if you want an alternative, here is what I recommend:
  • Choose a weather skin from the Weather section of this forum.
  • Post here the link of the chosen skin.
  • When I have a skin you like, I'll modify it, adding the Rain skin to be activated only when the weather skin is saying there is raining.
I don't really think that activating or deactivating the Rain skin is proper to be done based on the humidity. Better would be in my opinion, to activate it when the weather condition returned by the weather skin says it is raining (as said above).
Please let me know if you are interested.
User avatar
tass_co
Posts: 237
Joined: May 4th, 2020, 3:01 pm

Re: How do I automatically turn a skin on or off based on weather information?

Post by tass_co »

balala wrote: August 5th, 2022, 7:41 am I don't really think that activating or deactivating the Rain skin is proper to be done based on the humidity. Better would be in my opinion, to activate it when the weather condition returned by the weather skin says it is raining (as said above).
Please let me know if you are interested.
Logically you are right balala :bow:
However sometimes there are exceptions.
For example; Although the skin does not show rain in my city, it can rain :confused:
I think this is due to humidity. Whenever the humidity rises above 51 and the weather skin shows normal value, it is raining.
I think the result should be determined by the person who will use it.
We have the code. We just have to choose which state to trigger :thumbup:
I dont know where i going from here but i promise. it wont be boring....
User avatar
balala
Rainmeter Sage
Posts: 14448
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How do I automatically turn a skin on or off based on weather information?

Post by balala »

tass_co wrote: August 5th, 2022, 8:46 am I think the result should be determined by the person who will use it.
Right. That's why I wait for Pyuahowaito's reply...
User avatar
Pyuahowaito
Posts: 32
Joined: January 3rd, 2022, 2:44 pm

Re: How do I automatically turn a skin on or off based on weather information?

Post by Pyuahowaito »

When working with the code of 2 skins in the same ini, my Windows will be significantly slower and the refresh rate of the skin does not know how to adjust separately, I still think it would be better to separate the skins (sorry to waste your time, but learned a lot of methods on your package Thank you tass_co). Secondly, no matter how I adjust the latitude and longitude, he will always automatically trigger the Rain skin to work, only if I go to modify the humidity above 52 will not trigger.
1.jpg
Sorry I just found out now that my theme description is not very clear I rearranged a bit, my idea is to let a weather skin only act as an automation switch, according to the rain information of the city to automatically turn on or stop the Rain skin work.Or some other skin

Balala I don't know if this skin can, it's just that I understand its code more easily. https://www.deviantart.com/catart-1304/art/Aesthetic-weather-0-1-Cat-Art-ft-Creewick-917984819
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 14448
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How do I automatically turn a skin on or off based on weather information?

Post by balala »

Pyuahowaito wrote: August 5th, 2022, 11:00 pm When working with the code of 2 skins in the same ini, my Windows will be significantly slower and the refresh rate of the skin does not know how to adjust separately, I still think it would be better to separate the skins
Usually you can't have two codes of two different skins into one single .ini file. For this you need two different .ini files. If you place them into one single config (folder) you can load only one of them at a time. Placing them in different configs allows you to load both in the same time (only one skin of certain config can be activated in the same time, trying to activate another, deactivates the already activated one).
If you have two different skins, you can adjust their Update value distinctly. But in any case most of the skin (however there might be some exceptions) shouldn't load too much a more or less decent CPU.
Pyuahowaito wrote: August 5th, 2022, 11:00 pm Balala I don't know if this skin can, it's just that I understand its code more easily. https://www.deviantart.com/catart-1304/art/Aesthetic-weather-0-1-Cat-Art-ft-Creewick-917984819
This is a simple weather skin, which can be adapted to activate the Rain when the weather condition match the case. Do you want me to adapt it, adding the Rain skin to be activated when it's raining? The location can be simply set up, by changing the lat and long variables in the [Variables] section of the skin.
And one more: if you are interested, the same author (killall-q) published a while ago another Snowing skin. It also can be added to be activated when it's snowing.
Just please let me know if you are interested and and want me to add these skins.
User avatar
Pyuahowaito
Posts: 32
Joined: January 3rd, 2022, 2:44 pm

Re: How do I automatically turn a skin on or off based on weather information?

Post by Pyuahowaito »

balala wrote: August 6th, 2022, 7:25 am Usually you can't have two codes of two different skins into one single .ini file. For this you need two different .ini files. If you place them into one single config (folder) you can load only one of them at a time. Placing them in different configs allows you to load both in the same time (only one skin of certain config can be activated in the same time, trying to activate another, deactivates the already activated one).
If you have two different skins, you can adjust their Update value distinctly. But in any case most of the skin (however there might be some exceptions) shouldn't load too much a more or less decent CPU.

This is a simple weather skin, which can be adapted to activate the Rain when the weather condition match the case. Do you want me to adapt it, adding the Rain skin to be activated when it's raining? The location can be simply set up, by changing the lat and long variables in the [Variables] section of the skin.
And one more: if you are interested, the same author (killall-q) published a while ago another Snowing skin. It also can be added to be activated when it's snowing.
Just please let me know if you are interested and and want me to add these skins.
Yes, please help me add it, if you finish, another snow skin I will learn your code to try it yourself, thank you Balala.
User avatar
balala
Rainmeter Sage
Posts: 14448
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How do I automatically turn a skin on or off based on weather information?

Post by balala »

Pyuahowaito wrote: August 6th, 2022, 11:23 am Yes, please help me add it, if you finish, another snow skin I will learn your code to try it yourself, thank you Balala.
Ok, I added the Rain and Snowfall skins (both are located into the newly added AestheticWeather\RainSnow config). Also added the needed resources to the @Resources folder. For instance there is a Drop.png file, along with the needed two script files, which are placed to the @Resources\Script\ folder. See that I also added a previously not existing [MeasureStr] measure to the code of the skin. This measure is meant to activate the proper skin from the Rain and Snowfall, or deactivate them when it's the case.
Please install and test the attached package and let me know how does it working. If needed, further adjustments are also possible, maybe I missed something (many times I do).
Additional notes: The original package is a little bit weird, because:
  • The name of the root config (the folder under the Skins folder, which contains the skin) begun with a space. I removed this space.
  • I also removed the not-first space from the name of the config. Initially it was Aesthetic Weather, I renamed it to AestheticWeather. Even if it's not forbidden, nor a good idea is to have spaces in name of configs (nor in name of skins, variables, sections of skin and so on).
  • The author and name of skin is different in the [Metadata] section and in the installer package. In fact the name of skin is definitely mistaken in the [Metadata] section of the skin. There says the name of the skin is Simple Clock. :o Weird if the author when created the package forgot to replace the copied information, because this is what has happened in my opinion.
You do not have the required permissions to view the files attached to this post.
User avatar
Pyuahowaito
Posts: 32
Joined: January 3rd, 2022, 2:44 pm

Re: How do I automatically turn a skin on or off based on weather information?

Post by Pyuahowaito »

balala wrote: August 6th, 2022, 8:16 pm Ok, I added the Rain and Snowfall skins (both are located into the newly added AestheticWeather\RainSnow config). Also added the needed resources to the @Resources folder. For instance there is a Drop.png file, along with the needed two script files, which are placed to the @Resources\Script\ folder. See that I also added a previously not existing [MeasureStr] measure to the code of the skin. This measure is meant to activate the proper skin from the Rain and Snowfall, or deactivate them when it's the case.
Please install and test the attached package and let me know how does it working. If needed, further adjustments are also possible, maybe I missed something (many times I do).
Additional notes: The original package is a little bit weird, because:
  • The name of the root config (the folder under the Skins folder, which contains the skin) begun with a space. I removed this space.
  • I also removed the not-first space from the name of the config. Initially it was Aesthetic Weather, I renamed it to AestheticWeather. Even if it's not forbidden, nor a good idea is to have spaces in name of configs (nor in name of skins, variables, sections of skin and so on).
  • The author and name of skin is different in the [Metadata] section and in the installer package. In fact the name of skin is definitely mistaken in the [Metadata] section of the skin. There says the name of the skin is Simple Clock. :o Weird if the author when created the package forgot to replace the copied information, because this is what has happened in my opinion.
I tested a lot of rainy places based on the weather information provided by the website, and most of it can automatically start rain skin work accurately and stably (although I haven't seen the moment when the Rain skin automatically stops yet).Once again, I would like to thank Balala for her meticulous answers and help, and for letting me know exactly how skin-to-skin interactions and some of the things that need attention, and thank you for Tass_co letting me know another way. :rosegift:
User avatar
balala
Rainmeter Sage
Posts: 14448
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How do I automatically turn a skin on or off based on weather information?

Post by balala »

Pyuahowaito wrote: August 7th, 2022, 4:50 pm I tested a lot of rainy places based on the weather information provided by the website, and most of it can automatically start rain skin work accurately and stably (although I haven't seen the moment when the Rain skin automatically stops yet).Once again, I would like to thank Balala for her meticulous answers and help, and for letting me know exactly how skin-to-skin interactions and some of the things that need attention, and thank you for Tass_co letting me know another way. :rosegift:
You're welcome from my part. Please continue testing and let me know if you encounter any problem.