Hi Kari, It is working beautiful. Thanks a lot, now I can charge my car when the price is at the low side if I get everything under control
@luosto: Can you please give an example how to use the information from Kari's driver with RuleMachine?
Hi Kari, It is working beautiful. Thanks a lot, now I can charge my car when the price is at the low side if I get everything under control
@luosto: Can you please give an example how to use the information from Kari's driver with RuleMachine?
Nice work Kari!
In which format should I put those preferences in settings?
Areacode, Timezone, Currencyfactor and VAT%
Hi Sycorax,
You'll need 3+ rules, first two make sure your Hubitat knows the hourly price. Third and so on controlling your devices based on hourly price (CurrentPrice).
-make
Hi Petteri,
Very easy;
Area code for Finland: 10YFI-1--------U
Timezone: GMT+3
CurrencyFactor: 1
VAT%: 24
-make
Currencyfactor should include the margin you pay, right?
I will have 0,3c margin /KW so the Currency Factor should be 1,03?
Hi,
The purpose for currencyfactor was created for users that don't use EUR as their currency (SEK, NOK etc). The hourly price is multiplied by that value. If you want to add a margin you need to create new attribute for the driver.
Kari
Hi luosto,
Thanks for putting me in the right direction. It works
Thanks @karipk ! I have now asked to get Restful API from Ensto-E.
As far as I understood, this works with current hourly price? Because I have not enough expertise on coding, I need ask: Is there a way to look prices from ongoing or upcoming day, so I could make device "ON" If price is four cheapest within a day OR under 10c?
I was wondering like this what have been done: OpenAPI dokumentaatio Spot-hinta rajapinnoille - Swagger UI
As in hours are ranked 1 to 24 for cheapest to most expensive hour and you may quote also for price: https://api.spot-hinta.fi/JustNowRank/{rank}/{price}
Hi,
I have been thinking similar feature (rank) for the driver. Will do it in near future.
Kari
Next year spot price will change every 15 minutes. Need for ranking is getting more and more needed feature.
Hi,
Should be there now (github). Please test couple of days, before making any rules based on that.
Kari
I have just installed the driver and it seems to work except the rank shows -1.
Is that right or do I have to do something else to get I working?
Also, current price dosnt seem to change when using a factor.
Seems to be a bug on the price calculation when using currencyfactor <> 1. I try to find time to fix this during the weekend.
If someone else has time before that, the bug is most likely where the currentprice is calculated (currencyfactor is not included)
Kari
I had also something weird going on last night:
My virtual switch was:
turned ON 00:01
turned OFF 01:01
turned ON 02:01
turned OFF 04:01
Rule was Rank <= 4 (so 4 and under) OR Price <= 15 (as in 15 or under that)
Still prices (GMT+3) looks like this:
202211090100=16.52,
202211090200=16.52,
202211090300=16.52,
202211090400=16.53,
202211090500=16.53,
202211090600=17.88,
202211090700=22.82,
202211090800=20.72,
etc..
From another website (sahko.tk) it shows like this:
|9.11.2022 0:00|13,23|
|9.11.2022 1:00|16,52|
|9.11.2022 2:00|16,52|
|9.11.2022 3:00|16,52|
|9.11.2022 4:00|16,53|
|9.11.2022 5:00|16,53|
|9.11.2022 6:00|17,88|
|9.11.2022 7:00|22,82|
|9.11.2022 8:00|20,72|
This abowe is same as from Fingrid Tuntihinta -app. So do I have wrong GMT format or should it be UTC, EET, EETS?
But anyhow, why did it change OFF at 01:00 when Rank must have been in any case UNDER 4?
That was also something I wondered. I may have to rethink the rank in situations where there are hours with exactly same price.
Kari
Also now it looks weird, because in HE it shows hour 22 at RANK 9 with price 20.55. But if I rank them at excel, it shows wery different:
9.11.2022 0:00 13,23 1
9.11.2022 1:00 16,52 2
9.11.2022 2:00 16,52 3
9.11.2022 3:00 16,52 4
9.11.2022 4:00 16,53 5
9.11.2022 5:00 16,53 6
9.11.2022 23:00 17,21 7
9.11.2022 6:00 17,88 8
9.11.2022 20:00 20 9
9.11.2022 9:00 20,51 10
9.11.2022 22:00 20,55 11
9.11.2022 8:00 20,72 12
9.11.2022 21:00 21,62 13
9.11.2022 7:00 22,82 14
9.11.2022 10:00 23,36 15
9.11.2022 11:00 23,38 16
9.11.2022 12:00 24,79 17
9.11.2022 15:00 24,79 18
9.11.2022 16:00 24,79 19
9.11.2022 19:00 24,79 20
9.11.2022 13:00 24,8 21
9.11.2022 14:00 24,8 22
9.11.2022 18:00 24,8 23
9.11.2022 17:00 24,87 24
It looks like now should be RANK 11 with price 20.55 (RANK 9 at 20:00). Could it be that price is GMT+3 like I have done, but RANK is from different GMT?
@karipk Something seems odd regarding the ranking. Right now I get rank 22 but to me, it should be 20.
The ranking seems to be totally broken.
HashMap<String, String> rank = new HashMap<String, String>() -> string comparison rather than numeric. I'm afraid I cannot fix this today.
Kari
New version in the github. There are some problems when price is negative.