Re: [mh] "Voice" commands with arbitrary parameters

Giles Godart-Brown <[email protected]> Sat, 26 Jul 2025 11:14:42 +0100
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2989407012341177351==
Content-Type: multipart/alternative;
 boundary="------------MdBsdwLWvIGC7tFbm0Bt0JrT"
Content-Language: en-GB

This is a multi-part message in MIME format.
--------------MdBsdwLWvIGC7tFbm0Bt0JrT
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hello Brian

Long time.

I don't think I can answer your question, but I have now changed the way 
I use Misterhouse to increase reliability as follows;

  * Complex logic - keep in Misterhouse
  * Simple logic (like timers and pirs switching lights) - use Tasmota's
    rules wherever possible
  * Comms protocol - Mostly MQTT via mosquitto
  * UI - Home Assistant
  * Interface to difficult devices (like tuya) - Home Assistant
  * Voice commands - Alexa - to HA - to MH

I've also discovered the pi keepalive daemon 
(https://github.com/justinknguyen/Pi-Guide/blob/main/Pi-Guide/keepalived.md) 
which allows me to run Misterhouse (and other services) on a pair of Pis 
that automatically look after each other and switch if one fails but 
keeps a common IP address.
For example I was worried about mosquitto being a really important 
single point of failure, now I have two pis, the master is on 
192.168.100.23 and the backup on 192.168.100.24 but the common address 
192.168.100.25 is automatically associated with the currently running 
server.  All I have to do is set all my devices to look for 
192.168.100.25 and keepalived looks after the routing.
I use the same for Wireguard VPN and Misterhouse.
Unfortunately Home Assistant is dropping support for native Pi OS 
installs, and only concentrating on HA OS which means I cannot use 
keepalived. For now I'm thinking I will just have to have a cold backup 
machine on standby with a remote power switch so I can power it up 
manually if the master fails.
Regards
Giles


On 26/07/2025 08:11, Brian M wrote:
> I'm diving into so-called voice commands for the first time, though 
> I'm really just using mhsend to send a command from another computer. 
> The basics work fine, but in one case I'd like to pass an arbitrary 
> file name, and have my code receive that file name. Something like 
> "play file <filename>" and have my code be able to retrieve whatever 
> was specified for <filename>. Can that be done, and if so, what's the 
> syntax to define the voice command with an arbitrary string?
>
>                      -Brian M.
>
>
>
> ________________________________________________________
> To unsubscribe from this list, go to: 
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

--------------MdBsdwLWvIGC7tFbm0Bt0JrT
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font size="4">Hello Brian<br>
      <br>
      Long time. <br>
      <br>
      I don't think I can answer your question, but I have now changed
      the way I use Misterhouse to increase reliability as follows;<br>
    </font>
    <ul>
      <li><font size="4">Complex logic - keep in Misterhouse</font></li>
      <li><font size="4">Simple logic (like timers and pirs switching
          lights) - use Tasmota's rules wherever possible<br>
        </font></li>
      <li><font size="4">Comms protocol - Mostly MQTT via mosquitto</font></li>
      <li><font size="4">UI - Home Assistant </font></li>
      <li><font size="4">Interface to difficult devices (like tuya) -
          Home Assistant</font></li>
      <li><font size="4">Voice commands - Alexa - to HA - to MH<br>
        </font></li>
    </ul>
    <font size="4">I've also discovered the pi keepalive daemon
(<a class="moz-txt-link-freetext" href="https://github.com/justinknguyen/Pi-Guide/blob/main/Pi-Guide/keepalived.md">https://github.com/justinknguyen/Pi-Guide/blob/main/Pi-Guide/keepalived.md</a>)
      which allows me to run Misterhouse (and other services) on a pair
      of Pis that automatically look after each other and switch if one
      fails but keeps a common IP address.<br>
      For example I was worried about mosquitto being a really important
      single point of failure, now I have two pis, the master is on
      192.168.100.23 and the backup on 192.168.100.24 but the common
      address 192.168.100.25 is automatically associated with the
      currently running server.  All I have to do is set all my devices
      to look for </font><font size="4">192.168.100.25 and keepalived
      looks after the routing.<br>
      I use the same for Wireguard VPN and Misterhouse.<br>
      Unfortunately Home Assistant is dropping support for native Pi OS
      installs, and only concentrating on HA OS which means I cannot use
      keepalived. For now I'm thinking I will just have to have a cold
      backup machine on standby with a remote power switch so I can
      power it up manually if the master fails.<br>
      Regards<br>
      Giles<br>
    </font><font size="4"><br>
    </font><br>
    <div class="moz-cite-prefix">On 26/07/2025 08:11, Brian M wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">I'm
      diving into so-called voice commands for the first time, though
      I'm really just using mhsend to send a command from another
      computer. The basics work fine, but in one case I'd like to pass
      an arbitrary file name, and have my code receive that file name.
      Something like "play file &lt;filename&gt;" and have my code be
      able to retrieve whatever was specified for &lt;filename&gt;. Can
      that be done, and if so, what's the syntax to define the voice
      command with an arbitrary string?
      <br>
      <br>
                           -Brian M.
      <br>
      <br>
      <br>
      <br>
      ________________________________________________________
      <br>
      To unsubscribe from this list, go to:
      <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/misterhouse-users">https://lists.sourceforge.net/lists/listinfo/misterhouse-users</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>

--------------MdBsdwLWvIGC7tFbm0Bt0JrT--


--===============2989407012341177351==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2989407012341177351==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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


--===============2989407012341177351==--