You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[linky] Fixes for change in Enedis API on 2024 December 20 (openhab#17945)
* fixes for change in Enedis API on 2024 December 20 !
- URL for data is now mes-mesures-prm and not mes-mesures.
- Dto format have changed : mainly merge data & date, field renaming, and moving.
- Some changes on date format.
* add timezone to thing config to allow overriding default timezone
* add possible fix for 500 Internal Server Error
* backport some fixes from linkyv2 branch to handle enedis website errors
* remove condition so we can always get metadata to fix 500 error
* remove the missingData stuff from previous commit, realize if was duplicate with check already done in getConsumptionAfterChecks
* remove also the refreshinterval on ExpiringDayCache constructor, we don't need it anymore
* remove nullable on action field
Signed-off-by: Laurent ARNAL <[email protected]>
| timezone | The timezone at the location of your linky |
31
32
32
33
This version is now compatible with the new API of Enedis (deployed from june 2020).
33
34
To avoid the captcha login, it is necessary to log before on a classical browser (e.g Chrome, Firefox) and to retrieve the user cookies (internalAuthId).
@@ -43,6 +44,8 @@ Instructions given for Firefox :
43
44
1. Disconnect from your Enedis account
44
45
1. Repeat steps 1, 2. You should arrive directly on step 5, then open the developer tool window (F12) and select "Stockage" tab. In the "Cookies" entry, select "https://mon-compte-enedis.fr". You'll find an entry named "internalAuthId", copy this value in your openHAB configuration.
45
46
47
+
A new timezone parameter has been introduced. If you don't put a value, it will default to the timezone of your openHAB installation. This parameter can be useful if you read data from a Linky in a different timezone.
48
+
46
49
## Channels
47
50
48
51
The information that is retrieved is available as these channels:
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyConfiguration.java
+1
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ public class LinkyConfiguration {
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/LinkyHandlerFactory.java
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/api/ExpiringDayCache.java
+6-3
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,9 @@ public class ExpiringDayCache<V> {
43
43
44
44
privatefinalStringname;
45
45
privatefinalintbeginningHour;
46
-
privatefinalSupplier<@NullableV> action;
46
+
privatefinalintbeginningMinute;
47
+
48
+
privateSupplier<@NullableV> action;
47
49
48
50
private@NullableVvalue;
49
51
privateLocalDateTimeexpiresAt;
@@ -55,9 +57,10 @@ public class ExpiringDayCache<V> {
55
57
* @param beginningHour the hour in the day at which the validity period is starting
56
58
* @param action the action to retrieve/calculate the value
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/dto/ConsumptionReport.java
+19-20
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@
12
12
*/
13
13
packageorg.openhab.binding.linky.internal.dto;
14
14
15
-
importjava.time.ZonedDateTime;
15
+
importjava.time.LocalDate;
16
+
importjava.time.LocalDateTime;
16
17
importjava.util.List;
17
18
18
19
importcom.google.gson.annotations.SerializedName;
@@ -22,43 +23,41 @@
22
23
* returned by API calls
23
24
*
24
25
* @author Gaël L'hopital - Initial contribution
26
+
* @author Laurent Arnal - fix to handle new Dto format after enedis site modifications
0 commit comments