Re: [mh] Help for Alexa Integration - Episode #2 : Xiaomi vacuum (mirobo)

Wayne Gatlin <[email protected]> Tue, 15 Mar 2022 20:38:20 -0500
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <CANgJVDdQUqe_ajsYrBEywv_XR4nms8EQmckEZOHKkQCfRWsCTQ@mail.gmail.com>
You only have on and off commands with the hue emulation. But what I do is
make enough AlexaItems to map all the commands to on and off, so you would
need 3 here, the last one you can map on and off to the same command. Or a
cleaner method is to just make 5 AlexaItems, 1 for each command and map on
and off to each command so you can easily tell what each one is. Either
way, you then make a routine in the Alexa app with the commands you want to
say and map the routine action to the MH AlexaItems you made in the last
step.

I did this for my garage door so I can say open instead of on, also for my
tv volume, etc.


I considered adding some code to automatically add routines for custom
commands but I never go to it.



On Sat, Mar 12, 2022, 12:26 PM Gianni Veloce via misterhouse-users <
[email protected]> wrote:

> Hi MH-lovers!
>
> Having solved the issues with my Alexa (grace to your great support) I
> have managed finally to voice control all my lights (a mixture of X10 and
> Insteon, I know it is old-fashion but heading soon for tasmotized Sonoffs:))
>
> Happy after that initial success I tried to integrate to Alexa my Xiaomi
> Roborock S6 vacuum.
> For those that may not know there is a script for linux that works pretty
> well with various Xiaomi models and you can find it here
> https://github.com/haim0n/python-mirobo
>
> But the issue with Alexa is that afaik AlexaBridge is allowing only ON and
> OFF commands, so when I put in my items.mht
> a line with all the command options for the Xiaomi vacuum
> ALEXABRIDGE_ADD, AlexaItems, !_vacuum, Vacuum, run_voice_cmd, start,
> stop,  find, home, pause
> Alexa responds only to the two first (start and stop that are linked to on
> and off).
>
> So i ask you experts is there any way to make Alexa respond to all 5
> commands?
>
> TIA
> GV
>
> P.S. here is my mirobo.pl
> $v_vac1 = new Voice_Cmd '[start,stop,find,home,pause] vacuum';
> if ($state = said $v_vac1) {
>     speak "$state vacuum";
>     `mirobo $state`;
> }
>
> ________________________________________________________
> To unsubscribe from this list, go to:
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users