www.homeseer.com    
 

Go Back   HomeSeer Message Board > User Interface Plug-ins > User Interface Discussion > ImperiHome Plug-in (3P)

Reply
 
Thread Tools Display Modes
  #1  
Old November 15th, 2017, 08:19 AM
SteveH SteveH is offline
Seer
 
Join Date: Dec 2016
Location: UK
Posts: 12
Using Imperihome Speak Action

I have Imperihome installed on a Tablet and the Imperhome plugin installed on my HS3 machine. Both devices are within a home LAN.
All Zwave devices/events etc show up and are controllable from the Imperihome app so it would seem that the configuration is correct but when I try to use the Imperihome plugin "Speak" action in an Event all I see in the log is 'Connection refused'. The problem seems clear enough but I'm confused as to where the configuration file to correct it lies. I've trawled through various user guides but I am unable to find a clear explanation of how I use Imperihome running on a separate tablet as a speaker client. Can anyone suggest where the problem lies please?
Reply With Quote
  #2  
Old November 15th, 2017, 09:17 AM
spud's Avatar
spud spud is offline
Moderator
 
Join Date: Jan 2012
Location: Canada
Posts: 5,153
have you read this: https://forums.homeseer.com/showthre...42#post1234642

is your tablet Android? (it doesn't work on iOS)
have you enable API HTTP Server on your tablet?
Reply With Quote
  #3  
Old November 15th, 2017, 01:21 PM
SteveH SteveH is offline
Seer
 
Join Date: Dec 2016
Location: UK
Posts: 12
Hi - thanks for the quick reply. Yes I did read that but could not find anything in there that suggests why this is failing.
The tablet is running android and API HTTP server is enabled (listening on port 8080). I have also set up a 2nd instance of Imperihome on an android phone.
The command shown in the HS log as being sent to the tablet is
DEBUG CMD SENT: http://192.168.1.177:8080/api/rest/speech/tts?text=Hello+Test%2c+message&vol=96

The response shown in the log is:
INFO WebException: ConnectFailure Error: ConnectFailure (Connection refused)

The error response for the same message sent to the android phone is however different:
INFO WebException: Timeout The request timed out.
Apparently Imperihome Pro is configured the same on both android devices and both can control all devices in my HS3 setup so odd that the error message is different (?) but either way I can't see where my configuration is failing?
Reply With Quote
  #4  
Old November 16th, 2017, 10:57 AM
SteveH SteveH is offline
Seer
 
Join Date: Dec 2016
Location: UK
Posts: 12
Problem solved. Perhaps no one else has found this to be a problem but in case you do.

The User guide confused me. The reference to a "Use custom HTTP.Server" box led me to think that this plugin was communicating through port 8080 (there is no such box to tick, at least not in the version of HS3 I am running). The note about using the MyHS service further confused me. In the end I tried accessing port 8072 of the tablet running Imperhome and got the Imperihome information page whereby everything was crystal clear. Using this plugin to access voice output using the Imperihome Voice action just requires port 8072 to be entered in the Control API field of the plugin. You will only need to modify port forwarding rules if you want to access from outside your home network.
This is actually a useful function when you want, for example, vocal confirmation of an action being run.
Reply With Quote
  #5  
Old November 16th, 2017, 11:41 AM
spud's Avatar
spud spud is offline
Moderator
 
Join Date: Jan 2012
Location: Canada
Posts: 5,153
Glad you got it to work but I don't understand what confused you?
The Control API, which is used to make the Speak action work, is very different from the rest of the plugin. With the Control API the server is your phone or tablet, so you need to enter the IP and port of your phone in the Control API tab of the plugin. For the other features of the plugin, the plugin (or HS) is the server and your phone is the client.
Reply With Quote
  #6  
Old November 16th, 2017, 05:37 PM
freeon freeon is offline
Seer Master
 
Join Date: Aug 2012
Location: Canada
Posts: 710
I'm having a similar issue. The app is running on android and can control my devices. I Enable API HTTP Server on the app. Added device on control API screen a put the IP but the name field didn't auto populate. I doubled checked the IP and port and they are correct. When I try to send a speak command I get this in the log "ConnectFailure Unable to connect to the remote server". Did I miss a step?
Reply With Quote
  #7  
Old November 17th, 2017, 12:38 PM
SteveH SteveH is offline
Seer
 
Join Date: Dec 2016
Location: UK
Posts: 12
Spud - the confusion was the port settings. I'm sure that it seems obvious to you but what is missing, for me, from the user guide is just a few sentences on how the plugin works, even the clarification about the Control API being separate from the rest of the plugin helps makes things clearer. The Settings page in the Imperihome App has a setting for 'API HTTP Server Port' - this by default is set to 8080 and based on what I understood from the user guide needed to be set to 8072.
Freeon- if your issue is similar to mine all I did was to go into the Settings tab on the plugin, tick the Use Custom http Server box and use 8072 for the http port and 8043 for the https port. Not sure if you can customise these ports but those are my settings. Then in the Control API tab enter the IP address of the device on which your Imperihome application runs. If the IP address is recognised the name field should be auto populated. This defaults to port 8080. I changed that to 8072 and was immediately able to address the Imperihome app on my tablet from the Imperihome plugin script Action.
Spud - thanks again, the plugin works great and, now, even more useful for me.
Reply With Quote
  #8  
Old November 17th, 2017, 01:39 PM
spud's Avatar
spud spud is offline
Moderator
 
Join Date: Jan 2012
Location: Canada
Posts: 5,153
Quote:
Originally Posted by SteveH View Post
Spud - the confusion was the port settings. I'm sure that it seems obvious to you but what is missing, for me, from the user guide is just a few sentences on how the plugin works, even the clarification about the Control API being separate from the rest of the plugin helps makes things clearer. The Settings page in the Imperihome App has a setting for 'API HTTP Server Port' - this by default is set to 8080 and based on what I understood from the user guide needed to be set to 8072.
Freeon- if your issue is similar to mine all I did was to go into the Settings tab on the plugin, tick the Use Custom http Server box and use 8072 for the http port and 8043 for the https port. Not sure if you can customise these ports but those are my settings. Then in the Control API tab enter the IP address of the device on which your Imperihome application runs. If the IP address is recognised the name field should be auto populated. This defaults to port 8080. I changed that to 8072 and was immediately able to address the Imperihome app on my tablet from the Imperihome plugin script Action.
Spud - thanks again, the plugin works great and, now, even more useful for me.
I think you are still confused

The "Use custom http server" checkbox as well as the port setting on the settings tab have nothing to do with the Control API
You can use the Control API without ticking the "Use custom http server" checkbox. This checkbox just tells the plugin to run its own web server instead of using the HS3 web server, but it doesn't affect at all the control API.

I guess what happened is that on your mobile device the port 8080 was already used by another app, so when you changed it to 8072 on both the app settings and the Control API tab it started to work because this port was not used.

Do the test and untick the "Use custom http server" checkbox, the Control API should still work fine.
Reply With Quote
  #9  
Old November 17th, 2017, 02:44 PM
freeon freeon is offline
Seer Master
 
Join Date: Aug 2012
Location: Canada
Posts: 710
Quote:
Originally Posted by SteveH View Post
Spud - the confusion was the port settings. I'm sure that it seems obvious to you but what is missing, for me, from the user guide is just a few sentences on how the plugin works, even the clarification about the Control API being separate from the rest of the plugin helps makes things clearer. The Settings page in the Imperihome App has a setting for 'API HTTP Server Port' - this by default is set to 8080 and based on what I understood from the user guide needed to be set to 8072.
Freeon- if your issue is similar to mine all I did was to go into the Settings tab on the plugin, tick the Use Custom http Server box and use 8072 for the http port and 8043 for the https port. Not sure if you can customise these ports but those are my settings. Then in the Control API tab enter the IP address of the device on which your Imperihome application runs. If the IP address is recognised the name field should be auto populated. This defaults to port 8080. I changed that to 8072 and was immediately able to address the Imperihome app on my tablet from the Imperihome plugin script Action.
Spud - thanks again, the plugin works great and, now, even more useful for me.
This didn't work for me so must be something different than you.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about event action "speak" jjsmd HS3 / HS3PRO Discussion 3 August 2nd, 2015 03:00 PM
Add a Speak Action to an event? misraels HS3 Scripting 1 January 27th, 2014 12:32 PM
Speak action without Proxy / Plugin Monk HomeSeer General Discussion Area 7 January 9th, 2011 10:19 PM
SPEAK ACTION Repeating multiple times loowee HS2 / HSPRO 7 August 16th, 2008 11:34 AM
Speak action triggered over phone mmrober Script & Plug-In Development 1 December 31st, 2002 09:10 AM


All times are GMT -4. The time now is 08:51 PM.


Copyright HomeSeer Technologies, LLC