openHAB can now use Amazon Echo devices to speak any text (TTS) - new feature in the amazonechocontrol binding

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.

Am i in the right folders?

Please advise.

Items created with PaperUI are not stored in .temp files, the same is with rules and things created with PaperUI.

Thanks for your email.

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ā€.

Sehr geehrter Herr Baginski

Thanks for your email and inputs.

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

TREHAN Sajive

Iā€™ll try to come with something but that will take a bit since Iā€™m on a bicycle trip.
Stand by!

Sehr geehrter Herr Baginski

Thanks for your message.

Please do enjoy your bicycle trip.

When are you expected back and could help me, so that I can plan my time accordingly?

Please advise.

Vielen Dank fĆ¼r Ihre Kenntnisnahme
Freundliche GrĆ¼sse

TREHAN Sajive

Iā€™m using such command ina rule to let the Echo speak:

Echo_Buero_TTS.sendCommand(SayCommand.state.toString)

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).

Sehr geehrter Herr Baginski

Good Morning.

Just wanted to check if you were back?

I await your reply and help.

Vielen Dank fĆ¼r Ihre Kenntnisnahme
Freundliche GrĆ¼sse

TREHAN Sajive

Didnā€™t my last post help?
If not, please show where you are running into problems.

I have 2 problems:

  1. 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.

  2. 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

Any suggestions?

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.

I guss you should adjust the ā€œvolumeā€ and not ā€œtextToSpeechVolumeā€.
I have here the item:

amazonechocontrol:echo:XXXX:xxxxxxx:volume
1 Like

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!

the error from logfile is fixed.

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