Code Monkey home page Code Monkey logo

Comments (29)

kailampi avatar kailampi commented on May 26, 2024 1

Yes, right now it is fetched, as I had to restart HA in order to activate logging. Now I know which log we should look at, thanks. We need to come back on tomorrow afternoon, when new prices will be available, but not fetched. I'll post a log be then.

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024 1

Np, thanks. As you can see the data is there. This might be related to the other issue, ill get back to you on that.

from nordpool.

AivarJ avatar AivarJ commented on May 26, 2024 1

HA restart at 18:53

Right now ha_time latest commit f6e8c1b seems to work as expected. Today's and tomorrow's prices is available and the hourly price update works.

Running test now and will update the log if I find anything remarkable.

image

UPDATE
The sensor stopped working. The status of the sensor has not changed since 00:00. I will update the log if something changes in the morning.

UPDATE
No changes/no new log. Restarting HA server.
image
image

My f6e8c1b commit log

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Hi!

Playing how? Have you changed some of the code. You need to enable debug logging. You should look for stuff in the nordpooldata update method.

If you post your log I might be able help you out better.

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

Hi,

Playing meant, that I have constructed own sensors (sensors.yaml) using the price information and automation rules, but no touch to code!

Can you advice a bit, what is the right keyword for the custom component (last line):

logger:
default: error
logs:
custom_components.my_integration: debug

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

I could figure it out.. "nordpool" was the key word :)

Not sure if this helps yet, or should it be looked at when it tries to fetch prices tomorrow?

2020-04-16 20:13:56 DEBUG (MainThread) [custom_components.nordpool.sensor] Dumping config mappingproxy({'VAT': True, 'currency': 'EUR', 'friendly_name': 'Nordpool', 'low_price_cutoff': 1.0, 'precision': 2, 'price_in_cents': True, 'price_type': 'kWh', 'region': 'FI'})
2020-04-16 20:13:56 DEBUG (MainThread) [custom_components.nordpool.sensor] timezone set in ha <DstTzInfo 'Europe/Helsinki' LMT+1:40:00 STD>
2020-04-16 20:13:56 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty None
2020-04-16 20:13:56 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty None
2020-04-16 20:13:56 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty None
2020-04-16 20:14:27 DEBUG (SyncWorker_12) [custom_components.nordpool.sensor] NordpoolSensor _data_today is none, trying to fetch it.
2020-04-16 20:14:29 INFO (SyncWorker_12) [custom_components.nordpool] New data was posted updating tomorrow prices in NordpoolData EUR
2020-04-16 20:14:29 DEBUG (SyncWorker_12) [custom_components.nordpool.sensor] Called _update setting attrs for the day
2020-04-16 20:14:29 DEBUG (SyncWorker_12) [custom_components.nordpool.sensor] NordpoolSensor _data_tomorrow is none, trying to fetch it.
2020-04-16 20:14:29 DEBUG (SyncWorker_12) [custom_components.nordpool.sensor] Updated _current_price 41.29

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Dunno what wrong according to the log tomorrow’s prices is fetched. Can you take a picture of the state?

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

Ok, now the case is as in the picture (tomorrow prices missing) and I guess that relevant parts of the logs are here.

2020-04-17 12:59:38 DEBUG (SyncWorker_5) [custom_components.nordpool.sensor] Tried to update the hourly price but it wasnt a new hour.
2020-04-17 13:00:09 DEBUG (SyncWorker_18) [custom_components.nordpool.misc] Its a new hour!
2020-04-17 13:00:09 DEBUG (SyncWorker_18) [custom_components.nordpool.sensor] Updated _current_price 33.99
2020-04-17 13:00:40 DEBUG (SyncWorker_10) [custom_components.nordpool.sensor] Tried to update the hourly price but it wasnt a new hour.
2020-04-17 13:01:42 DEBUG (SyncWorker_7) [custom_components.nordpool.sensor] Tried to update the hourly price but it wasnt a new hour.
2020-04-17 13:01:42 INFO (SyncWorker_7) [custom_components.nordpool] New data was posted updating tomorrow prices in NordpoolData EUR
2020-04-17 13:01:42 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty inf
[same messages repeat until]

2020-04-17 13:02:13 DEBUG (SyncWorker_16) [custom_components.nordpool.sensor] Tried to update the hourly price but it wasnt a new hour.
2020-04-17 13:02:13 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty inf
2020-04-17 13:02:13 INFO (MainThread) [custom_components.nordpool.sensor] api returned junk infinty inf
[same messages repeat]

nordpool

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

wrong button...

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

I don't know what the problem is, the log states that it should get the prices for to morrow, but I didn't include it in the log as it would be spam a lot. I'll add the sensor with the same settings on my own computer and see if can recreate it. I'll also create a different branch with additional logging that i would like you to try.

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

Would it be something with time zones? I found an inconsistency when day changes, but I will open a new thread about it.

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

Ok, here is the huge log of new prices retrieval (only three entries).

2020-04-20 13:05:31 INFO (SyncWorker_15) [custom_components.nordpool] New data was posted updating tomorrow prices in NordpoolData EUR
2020-04-20 13:05:31 DEBUG (SyncWorker_15) [custom_components.nordpool] {'SYS': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 22, 0, tzinfo=), 'value': inf}], 'Min': inf, 'Max': inf, 'Average': inf, 'Peak': inf, 'Off-peak 1': inf, 'Off-peak 2': inf}, 'SE1': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 22, 0, tzinfo=), 'value': inf}], 'Min': inf, 'Max': inf, 'Average': inf, 'Peak': inf, 'Off-peak 1': inf, 'Off-peak 2': inf}, 'SE2': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 22, 0, tzinfo=), 'value': inf}], 'Min': inf, 'Max': inf, 'Average': inf, 'Peak': inf, 'Off-peak 1': inf, 'Off-peak 2': inf}, 'SE3': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 22, 0, tzinfo=), 'value': inf}], 'Min': inf, 'Max': inf, 'Average': inf, 'Peak': inf, 'Off-peak 1': inf, 'Off-peak 2': inf}, 'SE4': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 6, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 7, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 8, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 9, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 10, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 11, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 12, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 13, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 14, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 15, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 16, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 17, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 18, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 19, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 20, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 21, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 22, 0, tzinfo=), 'value': inf}], 'Min': inf, 'Max': inf, 'Average': inf, 'Peak': inf, 'Off-peak 1': inf, 'Off-peak 2': inf}, 'FI': {'values': [{'start': datetime.datetime(2020, 4, 20, 22, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 20, 23, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 0, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 1, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 2, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 3, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 4, 0, tzinfo=), 'end': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=), 'value': inf}, {'start': datetime.datetime(2020, 4, 21, 5, 0, tzinfo=

from nordpool.

AivarJ avatar AivarJ commented on May 26, 2024

I have a similar problem. Tomorrow's prices will not be updated, but hourly rates will continue to be updated every hour.

today's prices copied to tomorrow's field
today prices copied to tomorrow field

after api returned junk infinty inf
after api returned junk infinty inf

My log

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Thanks for the logs. The bug is that we try to update the data at 1300 in your local time, since your 1 hour ahead of stockholm the data isnt published yet.

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Can you update and see if the last commit fixes the issue?

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

Thanks, I did it, but unfortunately I don't see any difference. At this time there should be tomorrow prices available. I did not have debugs enabled, so I need wait until tomorrow if you want to see logs as well, do you?

image

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

The fix i tried to do was regarding the sensor trying to update prices before it was ready, if you restarted after the prices for tomorrow was released it should have worked. If tomorrow’s prices never is shown, you should open a separate issue.

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Hopefully I’ll get some time to track this 🐛 this weekend.

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

I did not exactly understand. What was the excepted fix? Was it for for the timezone issue or for the tomorrow prices fetch?

It has worked all the time if I restart HA after tomorrow prices release, new prices will appear. It has been actually my workaround for now. But now I expected that I don't need that automated HA restart anymore, but the plugin can retrieve new prices when they are available.

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

The expected fix was that you didnt need to restart ha to get the values, i suspected the bug to be a issue with the timezone as the api should only fetch new data if the time past 1300 h in Stockholm time. With the log you shows that the api fetches the data, but since your one hour ahead of stockholm is the data is fetched before tomorrows prices is released! The data is returned from the api, but with invalid values (inf == infinity).

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

I have created a branch that I think (🤞) should fix this issue and the and the problem regarding the "missing" first hour in #31

Anybody want to try?

https://github.com/custom-components/nordpool/tree/ha_time

Download the branch using you browser or use git to clone the repo. Manually copy the nordpool folder to your custom-component folder. Remove any sensor that you might have added using yaml. Add debug logging and leave it running for a couple of days.

inside your configuration.yaml

logger:
  default: warning
  logs:
    custom_components.nordpool: debug

Remove any sensors nordpool sensors that you might have setup using the ui, shutdown, remove the log. start HA again and setup the nordpool sensors using the UI.

Report back any bugs :)

from nordpool.

AivarJ avatar AivarJ commented on May 26, 2024

time brance changes don't seem to work. Hours prices are updated only once after the restart.

NordpoolSensorNewDay2
image

ha_time_branch_log

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Thanks for the report.
Your log clearly states that the price changed (the price that is logged is the raw price from the api), i dont know why this updated in the front end.

You had also setup at sensor using yaml, so I found a bug regarding that.

Can you try again, setup the sensor using mwh, disable vat and no price in cents? It much easier to compare again nordpools own data.

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

I will setup another HA for testing this. Don’t want to mess the current setup, because I use it something useful already. I’ll report back then. Thanks for your effort.

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Thanks. I found a bug where i had disabled polling, but didnt had setup the callback (result was that the sensors state didnt update).

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

Hopefull i have fix all the issues now. I managed to shutdown my dev computer 🤦‍♂️ so i didnt get to see how it worked, ill leave everything running and check tomorrow.

from nordpool.

AivarJ avatar AivarJ commented on May 26, 2024

one day ha_time_remove_last_update_hourly log

Still no tomorrow values, but midnight price update was there.

EDIT:
The sensor has stopped, no hour data.

UPDATE:
The latest change seems to work just fine. At least it's working at the moment.

Before the last ha_time repo upload, I did a full reboot of the HA hardware system.

latest ha_time_add_more_logging log

from nordpool.

kailampi avatar kailampi commented on May 26, 2024

The same commit that fixed the issue of "first hour price lost in Finland" seemed to fix this issue as well.

For me this looks like both issues are now found and fixed. The next question is, will this commit to be merged to general commit soon?

from nordpool.

Hellowlol avatar Hellowlol commented on May 26, 2024

That’s good news! Yeah, I’ll see if I can’t get this done over the weekend. Working with nordpools api is no fun so I’m gonna probably end up ditching the entire package and create one that uses entsoe instead.

from nordpool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.