-```
-
-
-
-### items.yaml
-
-The configuration of the item are done in the following way :
-
-alexa_cmd_01: comparison:EchoDevice:Commandlet:Value_to_Send
-
-
-### supported comparisons are :
-
-"True", "False" and for numeric values "<=",">=","=","<",">"
-
-#### Sample to switch on a Radiostation by using TuneIN
-```yaml
-Value = True means the item() becomes "ON"
-EchodotKueche = Devicename where the Command should be send to StartTuneInStaion = Name of the Commandlet
-s96141 = Value of the Radiostation (here S96141 = baden.fm)
-```
-
-example:
-`
-alexa_cmd_01: True:EchoDotKueche:StartTuneInStation:s96141
-`
-#### Sample to send Text with item-value included based on value lower then 20 degrees
-
-```yaml
-Value = <20.0 - send command when value of the item becomes less then 20.0
-EchodotKueche = Devicename where the Command should be send to
-Text2Speech = Name of the Commandlet
-Value_to_Send = Die Temperatur in der Kueche ist niedriger als 20 Grad Die Temperatur ist jetzt #test.testzimmer.temperature.actual/# Grad
-```
-
-```yaml
-#test.testzimmer.temperature.actual/# = item-path of the value that should be inserted
-```
-example:
-`
-alexa_cmd_01: <20.0:EchoDotKueche:Text2Speech:Die Temperatur in der Kueche ist niedriger als 20 Grad Die Temperatur ist jetzt #test.testzimmer.temperature.actual/# Grad
-`
-
-You can find the paths of the items on the backend-WebInterface - section items.
-
-#### alexa_cmd_XX
-
-You can specify up to 99 Commands per shng-item. The plugin scanns the item.conf/item.yaml during initialization for commands starting with 01 up to 99.
-
-Please start all the time with 01 per item, the command-numbers must be serial, dont forget one. The scan of commands stops when there is no command found with the next number
-
-#### Example
-
-Example for settings in an item.yaml file :
-
-```yaml
-# items/my.yaml
-%YAML 1.1
----
-
-OG:
-
- Buero:
- name: Buero
- Licht:
- type: bool
- alexa_name: Licht Büro
- alexa_description: Licht Büro
- alexa_actions: TurnOn TurnOff
- alexa_icon: LIGHT
- alexa_cmd_01: True:EchoDotKueche:StartTuneInStation:s96141
- alexa_cmd_02: True:EchoDotKueche:Text2Speech:Hallo das Licht im Buero ist eingeschalten
- alexa_cmd_03: False:EchoDotKueche:Text2Speech:Hallo das Licht im Buero ist aus
- alexa_cmd_04: 'False:EchoDotKueche:Pause: '
- visu_acl: rw
- knx_dpt: 1
- knx_listen: 1/1/105
- knx_send: 1/1/105
- enforce_updates: 'true'
-
-```
-Example for settings in an item.conf file :
-
-```yaml
-# items/my.conf
-
-[OG]
- [[Buero]]
- name = Buero
- [[[Licht]]]
- type = bool
- alexa_name = "Licht Büro"
- alexa_description = "Licht Büro"
- alexa_actions = "TurnOn TurnOff"
- alexa_icon = "LIGHT"
- alexa_cmd_01 = '"True:EchoDotKueche:StartTuneInStation:s96141"
- alexa_cmd_02 ="True:EchoDotKueche:Text2Speech:Hallo das Licht im Buero ist eingeschalten"
- alexa_cmd_03 = "False:EchoDotKueche:Text2Speech:Hallo das Licht im Buero ist aus"
- alexa_cmd_04 = "False:EchoDotKueche:Pause:"
- visu_acl = rw
- knx_dpt = 1
- knx_listen = 1/1/105
- knx_send = 1/1/105
- enforce_updates = true
-
-```
-
-### logic.yaml
-Right now no logics are implemented. But you can trigger the functions by your own logic
-
-
-## Plugin-functions
-
-The plugin provides the following publich functions. You can use it for example in logics.
-
-### send_cmd(dvName:str, cmdName:str, mValue:str)
-
-example how to use in logics:
-
-```yaml
-sh.AlexaRc4shNG.send_cmd("yourDevice", "Text2Speech", "yourValue")
----
-sh.AlexaRc4shNG.send_cmd('Kueche','Text2Speech','Der Sensor der Hebenlage signalisiert ein Problem.')
-```
-Sends a command to the device. "dvName" is the name of the device, "cmdName" is the name of the CommandLet, mValue is the value you would send.
-You can find all this informations on the Web-Interface.
-You can also use the placeholders
-
-- the result will be the HTTP-Status of the request as string (str)
-
-### get_last_alexa()
-
-This function returns the Device-Name of the last Echo Device which got a voice command. You can use it in logics to trigger events based on the last used Echo device.
-
-```yaml
-myLastDevice = sh.AlexaRc4shNG.get_last_alexa()
-
-```
-
-### get_list(type:str)
-
-This function returns the ToDo or the Shopping list - depending on "type" as dict
-
-valid types are :
-```yaml
- 'SHOPPING_LIST'
- 'TO_DO'
-```
-
-
-```yaml
-sh.AlexaRc4shNG.get_list(type:str)
-```
-## Example logic to fill Items with List-Infos
-
-
-
-from datetime import datetime
-# get the Todo-List
-myList=sh.AlexaRc4shNG.get_list('TO_DO')
-for entry in myList:
- if entry['completed'] == True:
- entry['icon'] = 'control_clear'
- else:
- entry['icon'] = 'control_home'
- entry['date'] = datetime.fromtimestamp((entry['updatedDateTime']/1000)).strftime("%d.%m.%Y, %H:%M:%S")
-# Write list to Item - type should be list
-sh.Alexa_Lists.list.todo(myList)
-# get the shopping-List
-myList=sh.AlexaRc4shNG.get_list('SHOPPING_LIST')
-for entry in myList:
- if entry['completed'] == True:
- entry['icon'] = 'control_clear'
- else:
- entry['icon'] = 'jquery_shop'
- entry['date'] = datetime.fromtimestamp((entry['updatedDateTime']/1000)).strftime("%d.%m.%Y, %H:%M:%S")
-# Write list to Item - type should be list
-sh.Alexa_Lists.list.shopping(myList)
-
-
-
-## Example to show lists in smartVisu with status.activelist
-
-
-status.activelist('','Alexa_Lists.list.todo','value','date','value','info')
-
-status.activelist('','Alexa_Lists.list.shopping','value','date','value','info')
-
-
-
-### Ergebnis :
-!PlaceHolder
-
-
-
-# Web-Interface
-
-The Webinterface is reachable on you smarthomeNG server here :
-
-http://yourserver:8383/plugins/alexarc4shng/
-
-## Cookie-Handling
-
-On the Webinterface you can store you cookie-file to the shng-Server.
-Export it with a cookie.txt AddOn from the browser. Copy it to the clipboard.
-Paste it to the textarea in the Web-Interface and Store it.
-
-Now the available devices from your alexa-account will be discoverd an shown on the second tab.
-
-You can also login / logoff when credentials are available. Please see results in the textarea on the right. Please refresh page manually after successfull login via the Web-Interface.
-
-!PlaceHolder
-
-## Alexa devices
-
-By click on one device the device will be selected as acutal device for tests.
-!PlaceHolder
-
-## Command-Handling
-
-The Web-Interface gives help to define new Command-Lets. How you get the informations for new Commands see section New Commands
-
-Here you can define new Command-Lets, test them, save and delete them.
-You can check the JSON-Structure of you payload.
-
-When you click on an existing Command-Let it will be load to the Web-Interface.
-
-You can enter test values in the field for the values. Press Test and the command will be send to the device. You get back the HTTP-Status of the Request.
-
-For test dont modify the payload, just use the test-value-field
-
-!PlaceHolder
-
-
-## How to create new Command-Lets (spy out the Amazon-Web-Interface)
-
-#### This documentation is based on Google-Chrome, but it's also possible to do this with other browsers.
-
-Open the Web-Interface for Alexa on Amazon. Select the page you want to spy out. Before click the command open the Debugger of the browser (F12). Select the network tab.
-When you click the command that you want to spy out the network traffic will be displayed in the debugger. Here you can get all the informations you need.
-Normally information will be send to amazon. So you have to concentrate on Post - Methods.
-
-
-![PlaceHolder](./assets/pic1.jpg "jpg")
-
-
-As example to spy out the station-id of a TuneIn Radio Station-ID you will it see it directly on context when you move your mouse to the post-command.
-You can copy the URL to the Clipboard an use is it in the AlexaRc4shNG.
-
-You can also copy it as cUrl Paste it into an editor and can find the payload in the --data section of the curl
-
-
-
-
-![PlaceHolder](./assets/pic2.jpg "jpg")
-
-For some commands you need to now the payload. You can get this by spying out the data. You have to select the network command. Then select the tab with Headers. In the bottom you will find the form-data. You can copy the payload to the clipboard an paste it into the AlexaRcshNG-WebInterface.
-
-
-![PlaceHolder](./assets/pic3.jpg "jpg")
-
-#### !! Dont forget to replace the values for deviceOwnerCustomerIdcustomerID serialNumber, serialNumber, family with the placeholders !!
-```
-
-
-
-
-
-!! for the Values !!
-
- (for alpha Values)
- (for numeric Values )
-
-```
-
-## Tips for existing Command-Lets :
-
-#### TuneIn
-You have to specify the guideID from Amazom as stationID "mValue". Station-Names are not supported right now.
-for example try the following:
-
-To locate your station ID, search for your station on TuneIn.com. Access your page and use the last set of digits of the resulting URL for your ID. For example:
-If your TuneIn.com URL is 'http://tunein.com/radio/tuneinstation-s######/', then your station ID would be 's######'
-(https://help.tunein.com/what-is-my-station-or-program-id-SJbg90quwz)
-
-#### SSML
-You have to put the SSML-Values into
-```
-
-```
-
-Find complete documentation to SSML [here](https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html)
-
-example :
-```
-
-I want to tell you a secret.I am not a real human..
- Can you believe it?
-
-```
-
-You can also use [SpeechCons](https://developer.amazon.com/docs/custom-skills/speechcon-reference-interjections-german.html#including-a-speechcon-in-the-text-to-speech-response)
-
-example
-```
-
- Here is an example of a speechcon.
- ach du liebe zeit..
-
-```
-## Credits
-
-The idea for writing this plugin came from henfri. Got most of the informations from : http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html (German). Thank you Alex! A lot of code came from Ingo. He has done the alexa iobrokern implementation https://github.com/Apollon77 Thank you Ingo ! Also a lot of informations come from for the open-hab2 implemenation! Thank you [Michael](https://community.openhab.org/t/released-openhab2-amazon-echo-control-binding-controlling-alexa-from-openhab2/37844)
-
-Special thanks to Jonofe from the Edomi-Forum who spent a nigth and half an evenning to support my with SSML. Thank you Andre.
-#### !! So many thanks for the very good research and development)
-## Trademark Disclaimer
-
-TuneIn, Amazon Echo, Amazon Echo Spot, Amazon Echo Show, Amazon Music, Amazon Prime, Alexa and all other products and Amazon, TuneIn and other companies are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.