Well i have installed visual studio code and am accessing the conf folder it has everything but all the rules, items and everything is empty though through the paper ui there are over 73 items, some rules etc.
I have created this file in the Openhab Config Rules folder:
rule āSay welcome if the door opensā
when
Item **ST - Samsung Post Box Sensor (Samjin)changed to OPEN
then
A-Sajiveās Echo Speaker.sendCommand(āHello Worldā)
end
is this correct and how and from where (these were made in Paper UI) do I verify the Item Name and the Echo command. Please advise.
If you would use VSCode to edit the rules, the names would be parsed. Read Here.
Where did you get those names from? PaperUI lists the items starting with the label (first line, bold) and followed by the name ( second line).
The used trigger is missing a space before the āchangedā.
I am ābattlingā at the moment to setup VS Code paramaters as per the instructions suggested by you.
It will take a bit of time for me to figure out the correct VS Code setup.
However at the moment i just want to achieve the following setup.
I have a setup Samsung Smartthings multipurpose sensor (marked in the attached image) which is online in the Paper UI
and a Amazon Echo Speaker (marked in the attached image) which is online in the Paper UI.
The very simple thing which i wish to achieve is that if there is a VIBRATION in the Samsung Sensor, Alexa should say:
āSajeev, just wanted to let you know that someone just rang the doorbellā.
I will be highly obliged if you could help me with a template file for this small rule and advise me in which folder to place it and how to execute it.
I can take it off from there with your help.
I await your inputs.
Vielen Dank für Ihre Kenntnisnahme
Freundliche Grüsse
Where Echo_Buero_TTS is the item that is linked to the TTS-channel of the device. SayCommand is a string item holding the text to be spoken. You could use a hardcoded string as well.
For the triggering item you should use the item that is linked to the sensors vibration channel (canāt say if it is a On/Off type or whatever).
I“m using amazon texttospeech getting a spoken message opening a door.
I set the Volume to 70 hearing echo loud.
It works.
But: If I speak to echo about an hour later, the volume is too low ā¦too quiet!
That really happens about an hour later.
when I restart my raspberry openhab says that the door sensor is set from NONE to OFF (closed)
and echo is saying : Door is closed. That“s not what II wanted at night -.-
rule "Balkonvoiceoffen"
when
Item xiaomi_balkon changed to OPEN
then
Echo_Diele_Room_TTS_Volume.sendCommand('70')
Echo_Diele_Room_TTS.sendCommand('Balkontuer ist geoeffnet')
Echo_Diele_Room_TTS_Volume.sendCommand('70')
end
rule "Balkonvoicezu"
when
Item xiaomi_balkon changed to CLOSED
then
Echo_Diele_Room_TTS_Volume.sendCommand('70')
Echo_Diele_Room_TTS.sendCommand('Balkontuer ist geschlossen')
Echo_Diele_Room_TTS.Volume.sendCommand('70')
end
Do you have any logentry stating the changed lower volume?
On your restart problem, either decide during which houres you donāt want such message and inhibit the during this times or manually remove/rename the rule during restart.
here it comes. After closing Balkontür the volume from echo is on the lowest level - hardly to understand - you have to turn up the volume. no entry about that in the log
2019-12-26 14:45:02.727 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS_Volume changed from NULL to 0
2019-12-26 14:45:02.998 [vent.ItemStateChangedEvent] - Echo_Diele_Room_Volume changed from NULL to 25
2019-12-26 14:45:11.832 [vent.ItemStateChangedEvent] - xiaomi_balkon_LastOpened changed from 2019-12-26T14:41:20.324+0100 to 2019-12-26T14:45:11.819+0100
2019-12-26 14:45:11.838 [vent.ItemStateChangedEvent] - xiaomi_balkon changed from CLOSED to OPEN
2019-12-26 14:45:12.013 [ome.event.ItemCommandEvent] - Item 'Echo_Diele_Room_TTS_Volume' received command 70
2019-12-26 14:45:12.051 [ome.event.ItemCommandEvent] - Item 'Echo_Diele_Room_TTS' received command Balkontuer ist geoeffnet
2019-12-26 14:45:12.079 [ome.event.ItemCommandEvent] - Item 'Echo_Diele_Room_TTS_Volume' received command 70
2019-12-26 14:45:12.104 [nt.ItemStatePredictedEvent] - Echo_Diele_Room_TTS_Volume predicted to become 70
2019-12-26 14:45:12.122 [nt.ItemStatePredictedEvent] - Echo_Diele_Room_TTS predicted to become Balkontuer ist geoeffnet
2019-12-26 14:45:12.151 [nt.ItemStatePredictedEvent] - Echo_Diele_Room_TTS_Volume predicted to become 70
2019-12-26 14:45:12.167 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS_Volume changed from 0 to 70
2019-12-26 14:45:12.170 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS changed from NULL to Balkontuer ist geoeffnet
2019-12-26 14:45:13.552 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS changed from Balkontuer ist geoeffnet to
2019-12-26 14:45:15.701 [vent.ItemStateChangedEvent] - xiaomi_balkon changed from OPEN to CLOSED
2019-12-26 14:45:16.044 [ome.event.ItemCommandEvent] - Item 'Echo_Diele_Room_TTS_Volume' received command 70
==> /var/log/openhab2/openhab.log <==
2019-12-26 14:45:16.050 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Balkonvoicezu': 'Volume' is not a member of 'org.eclipse.smarthome.core.library.items.StringItem'; line 7, column 5, length 26
==> /var/log/openhab2/events.log <==
2019-12-26 14:45:16.073 [ome.event.ItemCommandEvent] - Item 'Echo_Diele_Room_TTS' received command Balkontuer ist geschlossen
2019-12-26 14:45:16.096 [nt.ItemStatePredictedEvent] - Echo_Diele_Room_TTS_Volume predicted to become 70
2019-12-26 14:45:16.119 [nt.ItemStatePredictedEvent] - Echo_Diele_Room_TTS predicted to become Balkontuer ist geschlossen
2019-12-26 14:45:16.190 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS changed from to Balkontuer ist geschlossen
2019-12-26 14:45:17.532 [vent.ItemStateChangedEvent] - Echo_Diele_Room_TTS changed from Balkontuer ist geschlossen to
You are NOT setting the volume to ā70ā after the text is spoken because of a Typo!
Obviously you are only setting the textToSpeechVolume" in your rules, but why are you setting this volume before AND after the TextToSpeech command and both times to the same value?
How are you controlling the (main-) volume of the Echo? The log shows the the volume was zero and has been changed to ā25ā, with which control/command? What isnāt shown is the (main-)volume changing to a lower setting after a TextToSpeech command!
i“m setting the speech volume to 70 before, because alexa became quiet.
i thought setting the command also at the end would keep the volume.
now i have learned: these are 2 different channels. volume and tts channel.
i set the volume from 0 to 25 by hand - therefore it“s not shown in the log.
at the moment it“s working