Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
SunTracker - with moving ghost
Re: SunTracker - with moving ghost
hello krambriw
thank you verry much
I know absolutely nothing of python
so i have just coppy past your code in eventghost
but it do'n work the way i want
the macro keep running
i think if the value is ('........') then the macro must pass
if the value does not match then the macro must stop
so i think there is a mistake in the code
thank you verry much
I know absolutely nothing of python
so i have just coppy past your code in eventghost
but it do'n work the way i want
the macro keep running
i think if the value is ('........') then the macro must pass
if the value does not match then the macro must stop
so i think there is a mistake in the code
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Yes, this is very possible,,,i think there is a mistake in the code
First question: do you see the OSD information 'Stopped macro' on the screen if the weather condition does not match?
Second: I do not really understand what you mean. You say that ('........') shall pass, means the macro shall run. Then you say that a mismatch shall stop the macro. Is ('........') what you mean is empty??? I see this as a mismatch...but do you mean that if you cannot get correct weather condition, the shutters shall go up?
Do you mean you see empty weather conditions?
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
i have got is to work
weather_conditions_that_will_trigger = [
"Fair",
"Clear",
"Sunny",
"Mostly Sunny",
"Partly Sunny"
]
currCondition = str(eg.event.payload)
if currCondition in weather_conditions_that_will_trigger:
pass
else:
eg.StopMacro()
thank you for the help
weather_conditions_that_will_trigger = [
"Fair",
"Clear",
"Sunny",
"Mostly Sunny",
"Partly Sunny"
]
currCondition = str(eg.event.payload)
if currCondition in weather_conditions_that_will_trigger:
pass
else:
eg.StopMacro()
thank you for the help
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Very good, in this way EG is very powerful as you see. And you have already improved your know-how in python...
Best regards
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Dear Walter !
I can never find these settings.
Maybe I do not have the correct version of the plugin?
Pako
I wanted to try something, but I'm very confused.krambriw wrote:3) Now configure the SunTracker plugin:
- enter your location id: A five digit US zip code or location ID. To find your location ID, browse or search for your city from the Yahoo! Weather home page(http://weather.yahoo.com/) The weather ID is in the URL for the forecast page for that city. You can also get the location ID by entering your zip code on the home page. For example, if you search for Berlin in Germany on the Yahoo! Weather home page, the forecast page for that city is http://weather.yahoo.com/germany/berlin/berlin-638242/. The location ID is 638242.
- select your units: type of units. 'metric' for metric or 'non-metric' (currently planned for future functions)
- select how often you want weather data updates (default is every 5 minutes)
When finished, click ok, then enable the plugin so that it starts.
I can never find these settings.
Maybe I do not have the correct version of the plugin?
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Dear Pako,
I think this feature has been included for a while. If you use the latest version (available in the first post in this thread) it is for sure there.
When you open up the configuration of the plugin you should find the settings like below in the picture (this is just example). If I try for Yahoo Weather for Prague, the location is 796597
https://weather.yahoo.com/czech-republi ... ue-796597/
The Coordinates of Prague in decimal degrees
Latitude: 50.0880400
Longitude: 14.4207600
(You can use this link http://www.satsig.net/maps/lat-long-finder.htm or your smart phone to get a more precise position of your home)
I hope this was what you are looking for,
My best regards, Walter
I think this feature has been included for a while. If you use the latest version (available in the first post in this thread) it is for sure there.
When you open up the configuration of the plugin you should find the settings like below in the picture (this is just example). If I try for Yahoo Weather for Prague, the location is 796597
https://weather.yahoo.com/czech-republi ... ue-796597/
The Coordinates of Prague in decimal degrees
Latitude: 50.0880400
Longitude: 14.4207600
(You can use this link http://www.satsig.net/maps/lat-long-finder.htm or your smart phone to get a more precise position of your home)
I hope this was what you are looking for,
My best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Dear Walter !
You're right, my mistake.
I forgot that I have this plugin (old version) located in C:\ProgramData\EventGhost\plugins\.
Now I put the new version into a normal directory, where I have installed EventGhost.
But it is ignored, it still uses the old one !
Only when I delete old, then uses the new ...
Thanks for help !
Pako
You're right, my mistake.
I forgot that I have this plugin (old version) located in C:\ProgramData\EventGhost\plugins\.
Now I put the new version into a normal directory, where I have installed EventGhost.
But it is ignored, it still uses the old one !
Only when I delete old, then uses the new ...
Thanks for help !
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Excellent, happy to hear
Best regards, Walter
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
I noticed one thing.
I can choose how often data about current weather conditions are refreshed (I think default is 5 minutes).
However, the event is repeated every minute. Is not that redundant?
And BTW: I was surprised, that the Weather event has a prefix "Main".
Why is this so?
Pako
I can choose how often data about current weather conditions are refreshed (I think default is 5 minutes).
However, the event is repeated every minute. Is not that redundant?
And BTW: I was surprised, that the Weather event has a prefix "Main".
Why is this so?
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Hello Pako,
In general the SunTracker plugin has such a long history and was the first plugin where I started to *learn* so it is not the best from coding perspective...but very stable. Maybe should need a modernization.
My best regards, Walter
In general the SunTracker plugin has such a long history and was the first plugin where I started to *learn* so it is not the best from coding perspective...but very stable. Maybe should need a modernization.
This is true, yes, the weather data is refreshed at a certain interval that you can configure but the last known is sent every minute. Should maybe be synchronized...I can choose how often data about current weather conditions are refreshed (I think default is 5 minutes).
However, the event is repeated every minute. Is not that redundant?
Just because...was done long time ago, "Main" is added by default. I only use this code to generate the event:And BTW: I was surprised, that the Weather event has a prefix "Main".
Why is this so?
Code: Select all
# Generate an event with current weather condition
if self.weatherStatus:
eg.TriggerEvent(
"Weather Condition:",
payload = str(self.currCondition)
)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Dear Walter !
Thank you for the explanation.
So I have a feature request.
Please enable that event prefix was configurable by the user.
This means that the current user does not have to make any changes to his configuration when you use the "Main" as the default value.
Backward compatibility would thus be ensured.
Best regards,
Pako
Thank you for the explanation.
Do you have it on your ToDo list?krambriw wrote:... but the last known is sent every minute. Should maybe be synchronized...
I understand. But I have a bad feeling.krambriw wrote:Just because...was done long time ago, "Main" is added by default.
So I have a feature request.
Please enable that event prefix was configurable by the user.
This means that the current user does not have to make any changes to his configuration when you use the "Main" as the default value.
Backward compatibility would thus be ensured.
Best regards,
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Dear Pako, thanks for your suggestions
My best regards, Walter
Now it isDo you have it on your ToDo list?
Yes, this is now also on ToDo listSo I have a feature request. Please enable that event prefix was configurable by the user.
My best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Dear Walter,
I thank you very much for your understanding.
My best regards, Pako
I thank you very much for your understanding.
My best regards, Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Dear Pako,
Here is an updated version with the new features:
- Added plugin setting for customizing the event prefix (default or left blank is 'Main')
- Weather condition event now synchronized with the update rate
Before I update the first post with this new version, would be great if you could verify (it works fine when I test it)
To upgrade, it is very important to follow the steps below in the specified order.
1) When EG is running current version, disable the SunTracker plugin and all SunTracker actions so that they all stops
2) Replace with the new version (see first post)
3) Now configure the SunTracker plugin:
- accept or change the event prefix
When finished, click ok, then enable the plugin so that it starts.
4) Now for each action, configure each of them by opening them and clicking ok
5) Enable each of the actions
6) Open the settings for the plugin again and check that they are all running
7) You are done!
Kind regards, Walter
Here is an updated version with the new features:
- Added plugin setting for customizing the event prefix (default or left blank is 'Main')
- Weather condition event now synchronized with the update rate
Before I update the first post with this new version, would be great if you could verify (it works fine when I test it)
To upgrade, it is very important to follow the steps below in the specified order.
1) When EG is running current version, disable the SunTracker plugin and all SunTracker actions so that they all stops
2) Replace with the new version (see first post)
3) Now configure the SunTracker plugin:
- accept or change the event prefix
When finished, click ok, then enable the plugin so that it starts.
4) Now for each action, configure each of them by opening them and clicking ok
5) Enable each of the actions
6) Open the settings for the plugin again and check that they are all running
7) You are done!
Kind regards, Walter
Last edited by krambriw on Thu Apr 17, 2014 8:08 am, edited 1 time in total.
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: SunTracker - with moving ghost
Dear Walter,
Thank you very much!
Now everything is working much closer to my concept.
However - until now I've got another idea:
Repetitive (though now much less often), but the same, the event can also be seen as unnecessary.
I personally would rather prefer an event as SunTracker.WeatherConditionChanged:
I think you understand, but feel free to ignore them!
My best regards, Pako
Thank you very much!
Now everything is working much closer to my concept.
However - until now I've got another idea:
Repetitive (though now much less often), but the same, the event can also be seen as unnecessary.
I personally would rather prefer an event as SunTracker.WeatherConditionChanged:
I think you understand, but feel free to ignore them!
My best regards, Pako