setImage action not available/not recognized

I am using OH5.2 with textual DSL.

In the docs there is an action described:

setImage(String itemName, String url, int timeout)

But I am unable to get this to work. I get this error in the logs:

Script execution of rule with UID ‘testbutton-1’ failed: The name ‘setImage’ cannot be resolved to an item or type

Is this action not available anymore? What are the alternatives?

Mij goal is to send a notification inclusing an image that also works remote. The source of the image is only local available to OH.

I do not find any reference to a setImage action anywhere in the docs. Can you point out where you find this?

Setting the image of a notification isn’t going to be a stand alone action. It will be a method or argument on something else.

The docs for sendNotification says

sendNotification(emailAddress, message, icon, tag, title, referenceId, onClickAction, mediaAttachmentUrl, actionButton1, actionButton2, actionButton3)

It’s an argument, not a separate function call.

Its relativ new: Actions | openHAB

:melting_face:

1 Like

It was implemented partially so that it is not available in DSL rule.

You are welcome to create an issue in core repo and I will add support for DSL rule.

Edit: I am not sure now that something is really missing. By the way, there is probably something wrong somewhere.

I saw Dan referenced the action like

actions.HTTP.setImage("Apartment_Camera_Snapshot", "http://camera.local/camera-snapshot.jpg");

https://community.openhab.org/t/sendnotification-with-image-does-not-work-remotely-in-ios-app/168090/2?u=gevasta

Not tested it yet.

That is something new ? I never used that syntax to call a core action.

Is it DSL code or JSScripting?

I am now afraid if any core action is still working in DSL

I will have to test some of them to check.

I tested this syntax in Rules DSL and it does not work.

Dan responded in the other thread.

That JS Scripting, not Rules DSL.

Dan suggested new syntax as written in the docs, does not work either.