Thank you very much, the script is now functional better, only e-mails are still not being sent:
There is only a meaningless error message in the log and I am unable to set the mail binding to DEBUG logging:
2020-11-14 10:39:00.328 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '0ca79312a0' failed: null
I have now switched to “App Password”, but it doesn’t help either.
My rule now looks like this:
triggers:
- id: "1"
configuration:
itemName: KlingeltasterMQTT_Klingeltaster
state: ON
type: core.ItemStateChangeTrigger
conditions: []
actions:
- inputs: {}
id: "2"
label: Doorbell Büro
configuration:
sink: chromecast:chromecast:b2ac767c16ed70bc25bdf4e581062ad4
sound: doorbell.mp3
type: media.PlayAction
- inputs: {}
id: "3"
label: Doorbell Bad
configuration:
sink: chromecast:chromecast:684a1f597a61ec0ab6befdcc93ecb59f
sound: doorbell.mp3
type: media.PlayAction
- inputs: {}
id: "4"
label: Doorbell Couch
configuration:
sink: chromecast:chromecast:3ed70b5dca4fc33e8e31aef499e592b1
sound: doorbell.mp3
type: media.PlayAction
- inputs: {}
id: "5"
label: Doorbell Ruheraum
configuration:
sink: chromecast:chromecast:275cfb4fba2f082c07046848f1e0e4b3
sound: doorbell.mp3
type: media.PlayAction
- id: "6"
configuration:
type: application/vnd.openhab.dsl.rule
script: >-
val mailActions = getActions("mail","mail:smtp:SMTP_Server")
mailActions.sendMail("c.hof.....ter@gmail.com", "Es klingelt an der Haustür", "Jemand steht vor der Hausür", "http://10.0.0.51/jpg/image.jpg")
type: script.ScriptAction
I hope I don’t need 2 days for each of my rules to switch to OH 3 