aWATTar binding: Beta and discussion

latest version works now perfectly for me. Sorry that I was not more specific in mentioning that the issue was with the bestprice thing only. At that that time I did not check if the prices worked after midnight. Thanks for the quick fix.

1 Like

I would like to use the binding to find out which hours are the best of the day. During summer this may be during daytime. If the price is low my battery at home or car should be charged. This will be tricky as the time depends on battery size (kw). As example: does it take 4 hours or five? (Like go-echarger supports this)
I could also imagine switch on some power plugs if the price is below 0€ to mine cryptocurrency with outdated equipment :laughing:

Hoi @tailor09, this means you at least don’t need net and gross prices computed by the binding, correct?

Any other opinions?

Should the binding compute net and gross prices
  • Yes
  • No

0 voters

Hi Wolfgang,

Would you be so kind to explain to me how to install the .jar file in OpenHab 3? I’m completely new to Openhab (i come from Pimatic).

Edit: Never mind, i found it under Things :wink:

Hi @fregger65 , sorry for not answering earlier.

Did I get right that you solved the problem already? If not: Place the jar file in the “addons” directory of openHAB. For most installations, this should be

/usr/share/openhab/addons

Regarding prices: Please note that even if the net price drops below zero, it is very unlikely that the gross price ever will. In Germany the base price we have to pay for every kWh is around 20ct, so the net price would really have to drop heavily to make you earn money for consuming electric power. Partly this is caused by the Renewable Energy Contribution of around 6ct per kWh, so the situation in other countries might indeed be different.

One word regarding the planned extensions: Unfortunately I did not yet find the time to work on them and I doubt that this will change in the next days. So I have to ask you to stay patient (or start working on it yourselves :slight_smile: )

Hi,
I found the link to your Binding on the german openhabforum. I will test it the text days. At the moment I do a similar thing with a python programm. But in openHAB it would be more comfortable.

It would be fine also to have the most expensive hours. I use my python to regulate my heatpump, an I have 4 options for this:
0 Heatpump locked (on the most expensive hour)
1 Heatpump reduced temp ( on the most 10 percent price range)
2 normal
3 Heatpump raised temp ( on the most 10 prcent cheapest price range)

If you can implement a thing “worstprice” in the same way like the pestprice we are able to lock the equipment in this hours.

Thanks and Bye

Hi @Quautiputzli,

I thought of this also in the beginning, but didn’t do it because I came to the conclusion that worstprice is basically nothing else than “NOT bestprice”. Hence I could work with a rule such as

when bestpriceitem receives command OFF

(pseudocode :slight_smile: )

Let me check whether I got it right:

  • Most expensive hour:
    logical NOT of a 23 hours non-consecutive bestprice range.
  • Reduced temp:
    same, for 21 bestprice hours (how do you get to “10%” in your setup?)
  • normal:
    none of the others
  • raised temp:
    bestprice range

Ok, the advantage would be that no rules would be necessary to deal with worstprice hours. Is that what you mean?

Yes, your absolutely right. That’s the way to go. It’s so easy. As I see, I can use more bestprice things.

For the 10% I calculated the difference of the cheapest and the most expensive price. Then 10% of this difference minus the most expensive. This is the threshold. But your way with the number of hours I like better.

I will try.
Bye

Hi,
For what ist the new thing “Best next prices” exatly.

The idea is to have a thing that delivers the best prices from current time until a certain end time, such as “I need my car to be loaded/my dishwasher to be finished/the room heated/… until today evening 6pm, what is the best 2/3/4 hours timespan from now until then”. This works out best when you can define the endtime and duration dynamically over the GUI and then activate it which fixes the computed hours. Development on this is not yet started.

1 Like

Hi,
I am testing the Binding for a whille. I created several best price things, and with one of them I have problems. I tryed to find the 2 most expensive hours, so I defined the thing like this:

UID: awattar:bestprice:aWattar_Bridge:WP_Off
label: Wärmepumpe Abschalten
thingTypeUID: awattar:bestprice
configuration:
  length: 22
  rangeDuration: 24
  rangeStart: 0
  consecutive: false
bridgeUID: awattar:awattar-bridge:aWattar_Bridge

The result is like this:

This is the screenshot from yesterday. The 1 most expensive hour was be found, but the second one is not the next expensive hour. This looks strange for me.

All other things i created (most 8 expensive, 8 cheapest, 2 cheapest) looks good.

Dear @Quautiputzli , thanks for testing! Looks like you found a bug :slight_smile: !

I will try to dig into this at the next weekend.

Dear @Quautiputzli, I created the same thing now on my test instance and added one item for the hours and one for the switch. For today it seems to work correctly, choosing all hours except 20 and 22. Do you see the problem today also? Do you have an item for the hours channel? Does it show the same problem or are the hours correct there?

You may check also the event log of 11th of may, it should show all status changes.

I will keep an eye on it and come back to you as soon as I found something.

Hi Wolfgang,
and thanks for the effort. The last 2 day it worked the way it should. But in my case the most expensive hours are 19 and 20, both days. I had problems on another side, so i flashed the openhab image new. I am now back at 3.0.2. But I also have the old image on another SD-card, so I can try to get this log from 11th of may.

And yes, I have an item for the hours channel. It showed the same hours like the switch channel did. I also did a test some days before (with the old image), I changed it from 22 to 21 hours, an then it was right.

Bye

Hi,
yesterday the problem was back. And something additional happend. Have a look at the screenshot, and the log.


2021-05-17 00:00:00.030 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Hours' changed from 00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,21,22,23 to 00,01,02,03,04,05,06,07,09,11,12,13,14,15,16,17,18,19,20,21,22,23

2021-05-17 08:00:00.012 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Active' changed from ON to OFF

2021-05-17 09:00:00.012 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Active' changed from OFF to ON

2021-05-17 10:00:00.020 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Active' changed from ON to OFF

2021-05-17 11:00:00.009 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Active' changed from OFF to ON

2021-05-17 14:01:00.022 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WP_Abschalten_Hours' changed from 00,01,02,03,04,05,06,07,09,11,12,13,14,15,16,17,18,19,20,21,22,23 to 00,01,02,03,04,05,06,07,09,10,11,12,13,14,15,16,17,18,19,20,21,23

At first, the hours 8 and 10 were selected ( but 7 and 8 should it be). This we can also see in the log. The Active Switch switches these hours 8 and 10. And then a strange thing happend. At 14 o’clock when the dates fron the next days are comming, the “WP_Abschalten_Hours” get an update and then the hours 8 an 22 are choosen.

I think, the easiest way would be to set it to Consecutive.
Or, I delete these one thing, and create it new. I will see.

Dear @Quautiputzli , I was able to reproduce the problem and also found the root cause in the code. I think I can provide a fix within the several next days.

Recreating the thing will not work. The problem will occur on days when one certain price appears twice.

Hi,
good to hear.
Thanks

Problem is fixed. Please download the updated version at

Yours

Wolfgang

1 Like

Thanks
How can I update? Just put the new file into the folder, deinstall the binding and install again?

I run with version 3.0.2 at the moment. Is this working with this? Becaus on your link its called …3.1.0…

Bye