Trigger MH action from another machines command line

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trigger MH action from another machines command line

Jon Boehm
What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands. 

Maybe by faking web interface commands?

Thanks,
Jon

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trigger MH action from another machines command line

H Plato
Hi Jon,

  The http interface seems to be the most robust method to trigger things. I use curl on raspberry pi’s without issue.

  For voice commands, IA7 runs this javascript:

                                var voice_cmd = $(this).text().replace(/ /g, "_");
                                var url = '/RUN;last_response?select_cmd=' + voice_cmd;

> On Jun 13, 2017, at 1:30 PM, Jon Boehm <[hidden email]> wrote:
>
> What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands.
>
> Maybe by faking web interface commands?
>
> Thanks,
> Jon
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trigger MH action from another machines command line

Jon Boehm
Would you be willing to share or point me at a shell script simple example.

Thanks

On Tue, Jun 13, 2017 at 1:47 PM, H Plato <[hidden email]> wrote:
Hi Jon,

  The http interface seems to be the most robust method to trigger things. I use curl on raspberry pi’s without issue.

  For voice commands, IA7 runs this javascript:

                                var voice_cmd = $(this).text().replace(/ /g, "_");
                                var url = '/RUN;last_response?select_cmd=' + voice_cmd;

> On Jun 13, 2017, at 1:30 PM, Jon Boehm <[hidden email]> wrote:
>
> What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands.
>
> Maybe by faking web interface commands?
>
> Thanks,
> Jon
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trigger MH action from another machines command line

H Plato
Sure, pretty straightforward:


will turn off the office light object

 If you open up IA7 in chrome, inspect an element, and then choose network, you can see the URL calls. Operate the object that you want, right click on the URL and ‘copy as cURL’ -- you’ll have the command you need.

On Jun 13, 2017, at 3:41 PM, Jon Boehm <[hidden email]> wrote:

Would you be willing to share or point me at a shell script simple example.

Thanks

On Tue, Jun 13, 2017 at 1:47 PM, H Plato <[hidden email]> wrote:
Hi Jon,

  The http interface seems to be the most robust method to trigger things. I use curl on raspberry pi’s without issue.

  For voice commands, IA7 runs this javascript:

                                var voice_cmd = $(this).text().replace(/ /g, "_");
                                var url = '/RUN;last_response?select_cmd=' + voice_cmd;

> On Jun 13, 2017, at 1:30 PM, Jon Boehm <[hidden email]> wrote:
>
> What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands.
>
> Maybe by faking web interface commands?
>
> Thanks,
> Jon
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trigger MH action from another machines command line

Jon Boehm
Thanks this REALLY helpful!!  Works for localhost but I'm getting the following when trying using the LAN IP address.  

MisterHouse password_protect set to all.  Password required for all functions


On Tue, Jun 13, 2017 at 3:46 PM, H Plato <[hidden email]> wrote:
Sure, pretty straightforward:


will turn off the office light object

 If you open up IA7 in chrome, inspect an element, and then choose network, you can see the URL calls. Operate the object that you want, right click on the URL and ‘copy as cURL’ -- you’ll have the command you need.

On Jun 13, 2017, at 3:41 PM, Jon Boehm <[hidden email]> wrote:

Would you be willing to share or point me at a shell script simple example.

Thanks

On Tue, Jun 13, 2017 at 1:47 PM, H Plato <[hidden email]> wrote:
Hi Jon,

  The http interface seems to be the most robust method to trigger things. I use curl on raspberry pi’s without issue.

  For voice commands, IA7 runs this javascript:

                                var voice_cmd = $(this).text().replace(/ /g, "_");
                                var url = '/RUN;last_response?select_cmd=' + voice_cmd;

> On Jun 13, 2017, at 1:30 PM, Jon Boehm <[hidden email]> wrote:
>
> What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands.
>
> Maybe by faking web interface commands?
>
> Thanks,
> Jon
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trigger MH action from another machines command line

H Plato

I allow lan addresses to connect without a password, so in my mh.ini:

password_allow_clients = 127\.0\.0\.1,10\.120\.0\..+

Another options would be to log in, and then take the cookie file and pass it to curl. I haven’t done this, but there are some instructions here:



On Jun 13, 2017, at 9:25 PM, Jon Boehm <[hidden email]> wrote:

Thanks this REALLY helpful!!  Works for localhost but I'm getting the following when trying using the LAN IP address.  

MisterHouse password_protect set to all.  Password required for all functions


On Tue, Jun 13, 2017 at 3:46 PM, H Plato <[hidden email]> wrote:
Sure, pretty straightforward:


will turn off the office light object

 If you open up IA7 in chrome, inspect an element, and then choose network, you can see the URL calls. Operate the object that you want, right click on the URL and ‘copy as cURL’ -- you’ll have the command you need.

On Jun 13, 2017, at 3:41 PM, Jon Boehm <[hidden email]> wrote:

Would you be willing to share or point me at a shell script simple example.

Thanks

On Tue, Jun 13, 2017 at 1:47 PM, H Plato <[hidden email]> wrote:
Hi Jon,

  The http interface seems to be the most robust method to trigger things. I use curl on raspberry pi’s without issue.

  For voice commands, IA7 runs this javascript:

                                var voice_cmd = $(this).text().replace(/ /g, "_");
                                var url = '/RUN;last_response?select_cmd=' + voice_cmd;

> On Jun 13, 2017, at 1:30 PM, Jon Boehm <[hidden email]> wrote:
>
> What is the best/easiest way of triggering a misterhouse action from anther machines command line.  The other machine is running raspbian and is on the same LAN.  I would like to turn on/off X10 items and run the equivalent of speech commands.
>
> Maybe by faking web interface commands?
>
> Thanks,
> Jon
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>






------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Loading...