openHAB 4.3 Milestone discussion

Hi all,

I just installed new update 4.3.0.M2.
After that all DSL rules seems to be not working any longer without any message, error, warning.
So I recovered the snapshot wit 4.3.0.M1 again.
Is there any idea?
Thanks and have a nice evening
Sebastian

The question is where to report that issue ā€¦ the add-on has not changed its supported MIME types, so this is more likely a core issues. Anyway, it seems weird to me.

Agreed. Iā€™m on a short vacation so probably wonā€™t get to this until next week but Iā€™ve a couple of tests in mind to help figure out whatā€™s going on. I guess Iā€™ll file an issue on core, if thatā€™s what the evidence suggests and see where it goes from there.

1 Like

Hi there,
Iā€™m on 4.3.0 M2.

When passing adding additional parameters to toItemScript as with ?fig=2 in the following snippetā€¦

Number:Temperature Refoss_P11d_Temp "Temperature" { channel="mqtt:topic:openhab:refossp11d:temperature" [profile="transform:JS",toItemScript="significant.js?fig=2"], expire="30m" }
Number:ElectricCurrent Refoss_P11d_Current "Current [%.1f %unit%]"  { channel="mqtt:topic:openhab:refossp11d:current" [profile="transform:JS",toItemScript="significant.js"], expire="30m"}

this parameter is shared across all invocations of significant.js, i.e. fig is always 2 when significant.js is called, even when it is not explicitly given as in my second item.
This is rather surprising behavior, and I was wondering whether itā€™s a bug or a feature in M2 (or before?)
Couldnā€™t try it on any other build, so please forgive me, if this behavior is not specific to M2.
Thx, Stephen

PS: Update: It seems that one has to manually set the injected variable to undefined at the end of the transformation script in order to have reset before the next invocation - Iā€™m quite astonished:

...
fig = undefined; // reset fig to undefined for the next iteration
...

Or just do
toItemScript="significant.js?fig="

I canā€™t recall any change in M2 that could cause this behaviour, so I would think it has been a problem before.
Can you please report that as bug issue in GitHub - openhab/openhab-core: Core framework of openHAB?

Continuing the discussion from openHAB 4.3 Milestone discussion:

Yes, that would do the trick. But I would like to avoid cluttering my dozens of calls to significant.js with unnecessary fig= parametersā€¦ (Background: significant.js is my transformation script for rounding incoming values from sensors to a more sensible, reduced number of significant figures/digits depending on the unit of the measurement. I also use fig= to override my unit specific default, e.g. 2 for temperatures.)

I followed @florian-h05 's suggestion and opened the issue 4414 on Github using something like the following script donothing.js as a simplified example:

// return the input value unchanged, logging arg1 and arg2 if injected
(function(i) {
    // console.log("donothing.js: started");
    var strarg1 = "" ;
    var strarg2 = "" ;
    if (typeof arg1 !== 'undefined') { 
        strarg1 = "    arg1=" + arg1.toString() + " (" + typeof arg1 + ")";
    }
    if (typeof arg2 !== 'undefined') { 
        strarg2 = "    arg2=" + arg2.toString() + " (" + typeof arg2 + ")";
    }
    console.log("donothing.js: i=" + i.toString() + strarg1  + strarg2);
    arg1 = "UNCHANGED";
    arg2 = "UNCHANGED";
    return i;
})(input)

Thanks!

1 Like

Anyone having issues with the iCloud binding after 4.3.0M2? This is on openhabian/pi4. I updated to the new milestone and immediately found icloud no longer connects. It will trigger a 2fa prompt that Iā€™ll see on my apple devices and I do get the automated ā€˜weā€™ve received a password login from this address, if this was you do nothingā€™ email note from apple. ie. Apple seems to think there was a valid login. But the icloud account thing never gets updated to ā€˜Onlineā€™ and will end up in status ā€˜ERROR: CONFIG.ā€™ Log shows invalid 2fa token.

Thoughts?

2024-10-15 06:09:42.255 [WARN ] [l.handler.ICloudAccountBridgeHandler] - iCloud authentication requires 2-FA code. Please provide code configuration for thing ā€˜icloud:account:872293b897ā€™.

2024-10-15 06:09:42.256 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ā€˜icloud:account:872293b897ā€™ changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Please provide 2-FA code in thing configuration.

2024-10-15 06:10:26.757 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ā€˜icloud:account:872293b897ā€™ changed from OFFLINE (CONFIGURATION_ERROR): Please provide 2-FA code in thing configuration. to UNKNOWN

2024-10-15 06:14:40.235 [WARN ] [l.handler.ICloudAccountBridgeHandler] - ICloud token invalid.

2024-10-15 06:14:40.238 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ā€˜icloud:account:872293b897ā€™ changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Invalid 2-FA-code.

Upgraded to 4.3.0 M2 and now my groovy scripts are failing.
Initially, I had to clear the Openhab cache and that fixed many issues.
Here is the section of my Openhab Log that docuements the groovy script failure:

2024-10-14 18:30:13.715 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'XXXXXXXXXX' failed: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script37.groovy: -1: unable to resolve class org.openhab.binding.omnilink.internal.action.OmnilinkActions
 @ line -1, column -1.
Script37.groovy: -1: unable to resolve class org.openhab.binding.pushover.internal.actions.PushoverActions
 @ line -1, column -1.
Script37.groovy: -1: unable to resolve class org.openhab.binding.hue.internal.action.LightActions
 @ line -1, column -1.
Script37.groovy: -1: unable to resolve class org.openhab.binding.astro.internal.action.AstroActions
 @ line -1, column -1.
4 errors

I can provide more info. Any initial thoughts?
Thanks.

Same issue here, groovy scripts are not working since I updated to M2.
This is the error message:

Failed to pre-compile action: 2(org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script19.groovy: -1: unable to resolve class org.openhab.binding.doorbird.internal.action.DoorbirdActions @ line -1, column -1. Script19.groovy: -1: unable to resolve class org.openhab.binding.wled.internal.WLedActions @ line -1, column -1. Script19.groovy: -1: unable to resolve class org.openhab.binding.astro.internal.action.AstroActions @ line -1, column -1. Script19.groovy: -1: unable to resolve class org.openhab.binding.mqtt.internal.action.MQTTActions @ line -1, column -1. Script19.groovy: -1: unable to resolve class org.openhab.binding.solarforecast.internal.actions.SolarForecastActions @ line -1, column -1. Script19.groovy: -1: unable to resolve class org.openhab.binding.network.internal.action.NetworkActions @ line -1, column -1. 6 errors )

The Bug Fix #17383 looks suspicious. @wborn could this fix have caused the issue I listed above?

Yes it may have caused this regression as it changed how script imports work. Iā€™ll have a look!

3 Likes

@wborn - have you had a chance to look into this the groovy script import issue? Any updates? Thanks.

Yes I can reproduce it and reverting those changes fixes it. Though it would be nice if I can get both to work. So Iā€™ll further look into that.

Hello everyone,

Iā€™m running into a configuration warning since oh4.3m2 in OpenHAB related to my MQTT setup, and Iā€™d appreciate some guidance. Hereā€™s the warning Iā€™m seeing in the logs:

2024-11-01 15:52:25.215 [INFO ] [ernal.GenericItemChannelLinkProvider] - Profile 'offset' for channel 'mqtt:topic:haspplate01:sensor_haspbme680_iaqaccuracy' is missing the scope prefix, assuming the correct UID is 'system:offset'. Check your configuration.

From what I understand, OpenHAB is expecting a specific UID (likely system:offset), but my current configuration might be missing this scope prefix. Iā€™m not entirely sure where to adjust this in my setup, as the UID is not explicitly set in my mqtt.things or items files.

Hereā€™s what Iā€™ve tried so far:

  1. Checked my mqtt.things and items files for any missing or incorrect UID specifications.

  2. Verified the profile settings in my channel link configuration.

Has anyone encountered this issue before, or could you guide me on how to properly set the UID

Yes.
I had to change the profile syntax from [profile="xyz"] to [profile="system:xyz"]

Hello,

I was wondering about the state of the issue on openhab core #3823 (Thing manager logic causes things to stuck in NOT_YET_READY Ā· Issue #3823 Ā· openhab/openhab-core Ā· GitHub).

Is this issue will be fixed before the official 4.3 release ?
It seems really a blocker for this new release as the addons not initialized correctly when not defined in a .things file.

Thanks,
Laurent.