OH3 : Linky binding not auto updating

Hello,

i’m currently using the linky binding https://next.openhab.org/addons/bindings/linky/
it work well, but does’nt pull everyday my electricity consumption.
I need to deactivate the thing and reactivate it to pull consumption.

Do you know how I can set up automatic pulling?

thank’s for your help

edit : maybe I can try to Enable and disable things every time I want an update, so I made a rules :
every day at 23:30
execute :
sendHttpPutRequest(“http://localhost:8080/rest/things/linky%3Alinky%3Adc1f72b527/enable”, “application/json”, “false”)
sendHttpPutRequest(“http://localhost:8080/rest/things/linky%3Alinky%3Adc1f72b527/enable”, “application/json”, “true”)

But I have a problem :

2020-12-07 18:44:44.138 [ERROR] [enhab.core.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

Maybe in javascript I can access thing directly? I have juste the Item Registry :confused:

I Tried this :

var thingsService = Java.type(“org.openhab.core.thing.ThingManager”);

thingsService.setEnabled(“linky:linky:dc1f72b527”, false);

But no luck :

2020-12-07 21:10:47.139 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘scratchpad’ failed: TypeError: thingsService.setEnabled is not a function in at line number 10

It’s long solved, but just for Documentation:


function enableandDisableThings(ThingUID)
{
    var thingsService = Java.type("org.openhab.core.thing.ThingManager");
    var thingBundle = FrameworkUtil.getBundle(thingsService.class);
    var bundleContext = thingBundle.getBundleContext();

    var thingsServiceRef = bundleContext.getServiceReference(thingsService.class);
    var thingsServiceIml = bundleContext.getService(thingsServiceRef); // Instance of ItemChannelLinkRegistry


    thingsServiceIml.setEnabled(mythings.getUID(), true); 
}