need some devices run for at least 3 h a day. So I planed to use the 3 least expensive hours a day. But using the values provide by the awattar plugin this does not seems to be possible.
Having an index (rank) that indicates a ranking of hours would be nice. If rank is 0 it will indicate the cheapest hour of the day, 1 the second cheapest hour, and so on until 23 the most expensive hour of the day.
That way a magic or script might use: if rank <3 do something. And the action will be triggered within the 3 cheapest hours of the day.
Is this feature planed right now? Would be a great feature.
That’s a good suggestion indeed. I’ve added this to the plugin: Awattar: Add a ranking state for simple use in rules by mzanetti · Pull Request #730 · nymea/nymea-plugins · GitHub
Should be available in the next experimental build.
What’s the Intervall of the api download from actual prices?
Is it possible to change the intervall manually?
The prices are from full hour to full hour. So the prices should be synced to or before full hours.
If I’m reading the code correctly, it’s synced once per hour, but not necessarily exactly on the full hour.
Actually it get’s the prices in the mid of the hour x:30 Minutes on my system. To get the cheapest prices it would be better the prices would be checked in the beginning of the new hour.
If i try a magic scene with the new feature current rank it doesn’t switch on/off my device (Shelly Pro 1PM) to the cheapest hours. Is there anything i have to look for with this feature?
Hmm… That’s a valid point… I suppose it could be fixed to check it at the full hour… Right now it depends on when you started nymea (or when you set up the thing).
Is this still about the full hour, or is it not working at all?
It’s about the full hour. The power is on from 01:15 until 02:15 or from 12:15 to 13:15 o’clock. It’s not only starting late it’s working in hours who aren’t cheap as well because it starts the configured 1h on the time it has checked the price and is on for 1h from this time - not until the next full hour where the price changes.