npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iobroker.alexa2

v3.26.7

Published

Remote control for Alexa (Amazon Echo)

Downloads

4,560

Readme

Logo

ioBroker.alexa2

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

This adapter allows you to remotely control your Alexa (Amazon Echo) devices.

Big thanks go to soef for version 1 of the adapter and to Hauke and ruhr70 for ideas in their scripts from ioBroker-Forum (especially the media progress updates)! Also, big thanks to meicker for support in documenting all of this and numerous users from ioBroker Forum for their testing support!

Disclaimer

All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal. ALEXA is a trademark of AMAZON TECHNOLOGIES, INC.

States and their meanings:

In the adapter namespace (e.g., alexa2.0) some channels are created

alexa2.0

| State name | meaning | |----------------------|--------------------------------------------------------| | Echo-Devices.* | States per Echo device, see below | | History.* | Infos for command history, see below | | Smart-Home-Devices.* | States per smart home device and in general, see below | | info.* | General information about the adapter status | | requestResult | Error info for TuneIn and smart-home device requests |

alexa2.0.Contacts.ContactId.*

All Alexa-Contacts that can be used to send Text Messages to, including himself. The own contact gets a special "(Self)" after his name.

| State name | meaning | |-------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | #clearOwnMessages | Only exists in own contact and a trigger deletes all messages that are send to himself (also includes messages to himself via App or devices!) | | textMessage | Sends this text as message to the user. It is shown on all devices of this user with a "yellow ring" |

alexa2.0.Echo-Devices.CommandsAll.*

Commands to be sent to all devices in the account.

| State name | meaning | Comments | |--------------------|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------| | deviceStop | Stop all actions on device | Button | | deviceDoNotDisturb | Switch on/off "Do not Disturb" for all devices. | true/false, or number in seconds to enable (max 12h) or string in form "HH:MM" until this time it is enabled |

alexa2.0.Echo-Devices.Serialnumber.*

Under "echo-devices" every amazon echo device is listed with its serial number. Not every device shows all the states. Every device has its own states as described below:

alexa2.0.Echo-Devices.Serialnumber.Alarm.*

Alarm (Wecker) settings for each device, if available.

| State name | meaning | value | |-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | .customVolume | Set a custom Volume for this Reminder. The volume is set 2s before the reminder triggers and re-set to the value before as soon as the timer is (or adapter thinks!) stopped - latest after 120s! When custom volumes and trigger times overlap it will be restored at the end once! | Number 0..100 | | .date | Overwrite the date for existing alarm to set a new date for this alarm. In case you have an existing alarm you can change the date here by simply overwrite the time in format YYYY-MM-DD. Might have no effect when multiple-times-per-day recurring settings were used! | Date Output | | .delete | Button to delete the Alarm | delete with true | | .enabled | Shows status of alarm and allows to change it: Activate alarm with true - Deactivate alarm with false | true / false | | .musicEntity | Shows the track info if this alarm is a music alarm | String or null | | .musicProvider | Shows the provider of the music if this alarm is a music alarm | String or null | | .nextTriggerDate | Contains the timepoint of the next expected triggering as unix epoch in ms | Number | | .recurringDays | Shows the list of days configured if the Alarm has recurring settings | US notation of weekdays (e.g. MO,TU,WE,TH,FR,SA,SU) | | .recurringPattern | Shows the recurring pattern of alarm | 0 = one time, no recurring P1D = daily XXXX-WD = on weekdays XXXX-WE = on weekends XXXX-WXX-1 = every monday XXXX-WXX-2 = every tuesday XXXX-WXX-3 = every wednesday XXXX-WXX-4 = every thursday XXXX-WXX-5 = every friday XXXX-WXX-6 = every saturday XXXX-WXX-7 = every sunday | | .snoozed | true if the Alarm is snoozed at the moment | true/false | | .sound | Contains the set sound for this alarm. Can be changed. Also changing between music sound entry and "build in sounds" is possible. | ID from list | | .time | Time for alarm. Overwrite the time for existing alarm to set a new time for this alarm. In case you have an existing alarm you can change the time here by simply overwrite the time in format hh:mm:ss, seconds are not needed to set. Might have no effect when multiple-times-per-day recurring settings were used! | Time Input | | .triggered | true if alarm is reached and triggered. Clock must be in sync with Amazon and iobroker, Use this to trigger other action as soon as the alarm time is reached | true / false | | New | Data to create a new Reminder as String in following format separated by ; as "timestamp;[label];[sound];[recurring]. timestamp as unix timestamp in ms, label as Text, sound as sound ID, recurring either empty for once, "DAILY" for daily or "WEEKLY=MO,TU,WE,TH,FR,SA,SU" with comma separated weekly day list. Fields in example above in brackets mean that they are optional! | String | | triggered | ID of the Alarm that triggered last on this device | ID |

When changing an Alarm does not work, please make sure that the Alarm timepoint is in the future - so changing e.g. "sound" on an Alarm in the past will not work!

alexa2.0.Echo-Devices.Serialnumber.Bluetooth.*

Here you find all connected or known bluetooth device(s) with MAC address(es). The states of each device:

| State name | meaning | |------------|----------------------------------------------------------------------------------------------------| | connected | Shows current connection status and allow connection (set to true) or disconnection (set to false) | | unpair | Button to unpair this device from the echo device |

alexa2.0.Echo-Devices.Serialnumber.Commands.*

With Commands, you can trigger some actions on your Alexa-Device. If you use these on a multiroom device, then they are executed independently and will not run in sync on the single devices!

| State name | meaning | value | |---------------|----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------| | doNotDisturb | Switch on/off "Do not Disturb" for this device or group. Value is updated with Device Configuration updates from Cloud too | true/false, or number in seconds to enable (max 12h) or string in form "HH:MM" until this time it is enabled | | flashbriefing | Briefing in 100 seconds - news etc.pp | Button | | goodmorning | Good morning from Alexa ... | Button | | funfact | Fun fact from Alexa ... (Only USA at the moment) | Button | | joke | Joke from Alexa ... | Button | | cleanup | Plays a "gong" tone like for start/end of listening mode ... | Button | | curatedtts | Random sentence from the chosen area from Alexa ... | Text (allowed: "goodbye", "confirmations", "goodmorning", "compliments", "birthday", "goodnight", "iamhome") | | singasong | Alexa sings a song ... | Button | | speak | Alexa says what you type in here ... | Text Input | | speakvolume | Adjust the speak volume of Alexa, this volume is set before the speak and reset afterwards | 0-100 | | skill | Launch a defined Skill | Skill-ID as String | | skillYours | launch a defined Skill - is prefilled with "Your Skills" as displayed in Alexa App too | Skill-ID as String | | tellstory | Alexa tells a story | Button | | traffic | Traffic news | Button | | weather | Weather news | Button | | deviceStop | Stop all actions on device | Button | | notification | Send text notification to customer of the device | Text, optionally specify title "title;text" | | announcement | Play announcement (like speak but with Bing before text) | Text | | ssml | Speak SSML XML string | Text | | textcommand | Send a Text command to Alexa,. Make sure to only use text (e.g. also 3 -> three and such, else Alexa might not correctly react to it!) | Text | | sound | Play a sound on the device. | Text |

Detailed information Speak and Announcement: Type in here what you want Alexa to say. You can also adjust the volume of Alexa by giving a percentage before your text. Example: 10;Alexa is saying Alexa with 10% volume, while 100;Alexa is 100% volume. Normally, you only can send 250 characters per speak command. By using the semicolon, it is possible to write as much as you want, as long as you separate 250 characters with a semicolon. Alexa will then speak the text after each other with a small break. You also can use the volume together with more 255 blocks by writing #Volume;#Block1;#Block2, a.s.o A volume set here will be used over a defined speak-volume.

Partially also sounds from https://developer.amazon.com/en-US/docs/alexa/custom-skills/ask-soundlibrary.html work. Specify in speak or ssml as <audio src="soundbank://soundlibrary/animals/amzn_sfx_bear_groan_roar_01"/>. Details and discussion please at https://forum.iobroker.net/topic/27509/ssml-audio

alexa2.0.Echo-Devices.Serialnumber.FireTVCommands.*

If a device is an Amazon FireTV then you can use the following commands:

| State name | meaning | value | |--------------|--------------------------|--------| | turnOn | Turn FireTV and TV on | Button | | turnOff | Turn FireTV and TV off | Button | | videoPause | Pause the running video | Button | | videoResume | Resume the current video | Button | | navigateHome | Navigate to Home | Button |

alexa2.0.Echo-Devices.Serialnumber.Info.*

Information about the Alexa device

| State name | meaning | value | |-------------------|---------------------------------------------------------------------------------------------|---------------------------| | capabilities | capabilities if the alexa device | Information | | deviceType | device type from Amazon | Information | | deviceTypeString | Device Type as string | Information | | isMultiroomDevice | Is multiroom device - Multiroom is a virtual device group | Information, true / false | | isMultiroomMember | Is Multiroom member - If true the device is part of a multiroom device group | Information, true / false | | MultiroomParents | If this device is part of a multiroom device group this state shows the parent group device | Information | | name | Name of Alexa Device | Information | | SerialNumber | Serial number of Alexa device |

alexa2.0.Echo-Devices.Serialnumber.Music-Provider.*

Directly tell Alexa to play Music or a playlist from supported music providers. Actually supported are: My Library, Amazon Music, Tune In. You can also include a multiroom device group name in the phrase to play it on this group (e.g. "SWR3 auf Erdgeschoss")

| State name | meaning | value | |-----------------------|------------------------------------|------------| | Amazon-Music | Phrase to play with Amazon Music | Text input | | Amazon-Music-Playlist | Playlist to play with Amazon Music | Text input | | My-Library | Phrase to play with My Library | Text input | | My-Library-Playlist | Playlist to play with My Library | Text input | | Tune-In | Phrase to play with Tune In | Text input | | Tune-In-Playlist | Playlist to play with Tune In | Text input |

alexa2.0.Echo-Devices.Serialnumber.Player.*

States to control the Playback of the device and to see the current status and media information

| State name | meaning | value | |---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------| | allowNext | Is the Next/Forward action allowed? | Information | | allowPlayPause | Is the Play/Pause action allowed? | Information | | allowPrevious | Is the Previous action allowed? | Information | | allowRepeat | Can Repeat function be used? | Information | | allowShuffle | Can Shuffle function be used? | Information | | ContentType | text field to put in desired content to play on this device | Information | | controlForward | Button to trigger player "forward" command (30s) | Button | | controlNext | Button to trigger player "next" command | Button | | controlPause | Button to trigger player "pause" command | Button | | controlPlay | Button to trigger player "play" command | Button | | controlPrevious | Button to trigger player "previous" command | Button | | controlRepeat | Button to trigger player "repeat" command | true / false | | controlRewind | Button to trigger player "rewind" command (30s) | Button | | controlShuffle | Switch to enable or disable Shuffle mode for player | true / false | | currentAlbum | Current album actually playing | Information | | currentArtist | Current artist actually playing | Information | | currentState | If playing -> true , else false | true / false | | currentTitle | Current title actually playing | Information | | imageURL | URL to the image of the album | Information | | mainArtURL | URL to current main art | Information | | mediaId | media ID of the current played media (usually queueID: | String, can be set to jump to the provided media ID | | mediaLength | Length of the current title | Information | | mediaLengthStr | active media length as (HH:)MM:SS | Information | | mainProgress | active media elapsed time | Information | | mainProgressPercent | active media elapsed time in percent | Information | | mediaProgressStr | active media progress as (HH:)MM:SS | Information | | miniArtUrl | URL to the art (mini) | Information | | muted | state of 'MUTE' | Information, true / false, volume = 0 is considered as muted | | playingInGroup | Is the medium played in a group? | Information | | playingInGroupId | ID of the playing group | Information | | providerID | ID of the current music provider | Information | | providerName | Name of the current music provider | Information | | quality | quality name of the current medium (might be empty) | Information | | qualityCodec | Codec of the current medium (might be empty) | Information | | qualityDataRate | data rate (kbps) of the current medium (might be empty) | Information | | qualitySampleRate | sample rate (Hz) of the current medium (might be empty) | Information | | queueId | queue ID of the current playlist | Information | | radioStationId | ID of the TuneIn radio station | Information | | service | name of the current music service | Information | | TuneIn-Station | text field to put in a Station name to play this station on this device. Also it is possible to type in the station number (s123456...), a show/podcast id (p1234567...) or a topic id (t123456789...) | Text input | | volume | Volume of playback. You can enter a value between 0-100% | INPUT Volume |

alexa2.0.Echo-Devices.Serialnumber.Preferences.*

Here you find some device preferences.

| State name | meaning | value | |----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| | ringNotificationsEnabled | Shows if the ring notifications are enabled or not and allows to edit it (true/false). The status is updated from cloud with a device configuration interval | | notificationVolume | The notification volume set for the device. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | number 0..100 | | ascendingAlarmState | The ascending alarm state set for the device. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | Boolean | | auxPort-*-Direction | The direction of the AuxPort (when supported). The value is loaded once on adapter start and then not synced with Cloud services, but changeable | "INPUT" or "OUTPUT" | | connectedSpeaker | The speaker with is used for the Device output. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | "InternalSpeaker", "Bluetooth" or "Aux" (if supported by Device! check the App) | | defaultAlarmNotificationSound | The default alarm sound set for the device. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | ID from a list | | defaultTimerNotificationSound | The default timer sound set for the device. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | ID from a list | | displayAdaptiveBrightnessEnabled | Is the adaptive brightness for the display of the device enabled or not. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | true/false | | displayEnabled | Is the display of the device enabled or not. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | true/false | | displayBrightness | Brightness of the display. The value is loaded once on adapter start and then not synced with Cloud services, but changeable | 0..100% | | equalizerBass | Equalizer Bass setting. Value is updated when changed if push connection is enabled | Number | | equalizerMidRange | Equalizer Midrange setting. Value is updated when changed if push connection is enabled | Number | | equalizerTreble | Equalizer Treble setting. Value is updated when changed if push connection is enabled | Number |

alexa2.0.Echo-Devices.Serialnumber.Reminder.*

Reminder (Erinnerungen) settings for each device, if available.

| State name | meaning | value | |-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | .customVolume | Set a custom Volume for this Reminder. The volume is set 2s before the reminder triggers and re-set to the value before as soon as the timer is (or adapter thinks!) stopped - latest after 120s! When custom volumes and trigger times overlap it will be restored at the end once! | Number 0..100 | | .date | Overwrite the date for existing alarm to set a new date for this alarm. In case you have an existing alarm you can change the date here by simply overwrite the time in format YYYY-MM-DD. Might have no effect when multiple-times-per-day recurring settings were used! | Date Output | | .delete | Button to delete the Alarm | delete with true | | .enabled | Shows status of alarm and allows to change it: Activate alarm with true - Deactivate alarm with false | true / false | | .nextTriggerDate | Contains the timepoint of the next expected triggering as unix epoch in ms | Number | | .recurringDays | Shows the list of days configured if the Alarm has recurring settings | US notation of weekdays (e.g. MO,TU,WE,TH,FR,SA,SU) | | .recurringPattern | Shows the recurring pattern of alarm | 0 = one time, no recurring P1D = daily XXXX-WD = on weekdays XXXX-WE = on weekends XXXX-WXX-1 = every monday XXXX-WXX-2 = every tuesday XXXX-WXX-3 = every wednesday XXXX-WXX-4 = every thursday XXXX-WXX-5 = every friday XXXX-WXX-6 = every saturday XXXX-WXX-7 = every sunday | | .snoozed | true if the Alarm is snoozed at the moment | true/false | | .sound | Contains the set sound for this alarm. Can be adjusted | ID from list | | .time | Time for alarm. Overwrite the time for existing alarm to set a new time for this alarm. In case you have an existing alarm you can change the time here by simply overwrite the time in format hh:mm:ss, seconds are not needed to set. Might have no effect when multiple-times-per-day recurring settings were used! | Time Input | | .triggered | true if alarm is reached and triggered. Clock must be in sync with Amazon and iobroker, Use this to trigger other action as soon as the alarm time is reached | true / false | | New | Data to create a new Reminder as String in following format separated by ; as "timestamp;label;[sound];[recurring]. timestamp as unix timestamp in ms or text like "HH:MM", label as Text (required), sound as sound ID, recurring either empty for once, "DAILY" for daily or "WEEKLY=MO,TU,WE,TH,FR,SA,SU" with comma separated weekly day list. For full flexibility recurring can also be a JSONified object with all data which is passed through. Fields in example above in brackets mean that they are optional! | String | | triggered | ID of the Alarm that triggered last on this device | ID |

When changing a Reminder does not work, please make sure that the Reminder timepoint is in the future - so changing e.g. "sound" on a Reminder in the past will not work!

alexa2.0.Echo-Devices.Serialnumber.Routines.*

Overview of routines set up in Alexa App. Self created routines have a serial number, Amazon shows as 'preconfigured:...' Each routine can be triggered with a button to run once.

| State name | meaning | value | |------------------------------------|-----------------|--------| | Serial or internal name of routine | name of routine | Button |

alexa2.0.Echo-Devices.Serialnumber.Timer.*

You can have one or more timers running on each Alexa device. Because of the very dynamic nature of timers, there will be no further objects created like with Alarm or Reminders, but a way to get triggered info exists.

| State name | meaning | value | |-----------------|--------------------------------------------------------------------------------------------------------------|------------| | activeTimerList | JSON array with the list of active timers containing ID, label and trigger timepoint as unix timestamp in ms | JSON array | | nextTimeDate | Contains the timepoint of the next expected triggering as unix epoch in ms | Number | Number | nextTimerId | ID of the next timer to trigger | String | | stopTimerId | Control with a timer ID to stop the timer (also stops if the timer is currently ringing!) | String | | triggered | A timer got triggered - in fact it is the "nextTimerId" one | true/false |

Please note that it is important that the timezone of the iobroker host is set to match your local timezone, else the triggered time detection might be wrong!

alexa2.0.Echo-Devices.Serialnumber.online

Is this Alexa device online and connected to the Amazon cloud?

| State name | meaning | value | |------------|------------------------|--------------| | online | Is the device online ? | True / False |

alexa2.0.History

| State name | meaning | value | |-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | #trigger | Button to get new History (more current then timestamp in creationTime), only needed when not using the push connection or when the automatic querying is disabled | Button | | cardContent | Additional information as shown in Alexa-App/Echo Show | Information | | cardJson | Additional information as shown in Alexa-App/Echo Show in JSON format | Information | | creationTime | date of this history entry, new history entries are only considered when later as this timestamp | Information | | domainApplicationId | Additional information like Skill-ID or such, optional | Information | | domainApplicationName | Additional information like Skill name or such, optional | Information | | json | Json of last command data to be able to process all infos e.g. in own JavaScripts | JSON | | name | Name of the device that got the last request | Information | | serialNumber | Serial number of the device that got the last request | Information | | status | Status of last command to Alexa | SUCCESS / FAULT / DISCARDED_NON_DEVICE_DIRECTED_INTENT; last one is generated when activating the device by saying the wake word, or when the device discarded input as "not for me" | | summary | text/summary/action received by the device | Information |

alexa.0.Smart-Home-Devices

Includes all smart home devices Alexa knows from your skills. States as follows, for all known devices:

| State name | meaning | value | |-----------------|--------------------------------------------------------------------------------------------|--------| | deleteAll | deletes all smart home devices from Alexa, same as the button in the Alexa App | Button | | discoverDevices | finds new smart home devices, same as the button in t