Apollon77 / alexa-remote

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No examples of how to use this module

tstibbs opened this issue · comments

There's a very simple example of how to get going with the module, but some of the functions give no hints about how to invoke them.

For example, executeSmarthomeDeviceAction requires a set of parameters, but there is no indication of what those should be, or any acceptable format.

Not looking for full docs, but some simple examples of how to invoke the various functions would be very useful.

Puuhh ... then you directly decided for a "not that easy" topic because you first need to read and parse the smart home device structures to know what data and parameters are needed to be sent and how depending on the device ...

In fact I use it in my iobroker adapter (e.g. https://github.com/Apollon77/ioBroker.alexa2/blob/master/main.js#L1178) and there is also a node-red node based on this library (no idea if they implemented smart home device stuff).

Sorry but there is not time right now for more documentation from my side atm ... maybe later somewhen

Thanks @Apollon77 the project you linked to is actually a very helpful example of how to use this, gave me exactly what I needed :)

For anyone finding this thread and wondering what I found out, you can invoke executeSmarthomeDeviceAction something like this:

executeSmarthomeDeviceAction(entityId, {
    action: 'turnOn'
}, callback)

Thank you that you fighted yourself through my code ;-)) Hope there were no losses ...

Documenting all of that is a big topic and I never found time after I took over that library - also because the changes by amazon let me focus on functionality

Example updated