GeVaSta
(Geert)
1
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.
rlkoshak
(Rich Koshak)
2
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.
Bloodboy
(Tobias)
3
Its relativ new: Actions | openHAB

1 Like
Lolodomo
(Lolodomo)
4
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.
GeVaSta
(Geert)
6
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.
Lolodomo
(Lolodomo)
7
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.
GeVaSta
(Geert)
8
I tested this syntax in Rules DSL and it does not work.
Dan responded in the other thread.
rlkoshak
(Rich Koshak)
9
That JS Scripting, not Rules DSL.
GeVaSta
(Geert)
10
Dan suggested new syntax as written in the docs, does not work either.