SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   Plugin: InControl For SageTV/HomeSeer (http://forums.sagetv.com/forums/showthread.php?t=50370)

lamanmi 09-13-2010 05:28 PM

Quote:

Originally Posted by Moskus (Post 449009)
Device buttons with actions "Channel Up/Page Up" works! :)

But the scripting functions don't. ;)

Moskus,

We are getting close. Can you try this as a script or send you a sample of your script? This is working on my test system.

Michael



Code:

sub main()

dim nsuccess

hs.plugin("InControl_Sage").SendSageCommandByID "1000_0", "Channel Down/Page Down"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByID "1000_0", "Channel Up/Page Up"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByName "Sage Server", "Channel Down/Page Down"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByName "Sage Server", "Channel Up/Page Up"

end sub


mbowling 09-13-2010 09:41 PM

Michael,

I've noticed a problem when a message is displayed on the TV from HomeSeer. The intended message will display normally. Then if I leave the message on the TV until another event runs that changes a device status, a new cryptic message is displayed in the same message box as the original message. In this case the message was:

"@HAMONINIT;Garage Interior Door to Garage;Closed" ... <more text> ... "END".

Moskus 09-14-2010 01:47 PM

Quote:

Originally Posted by lamanmi (Post 449188)
Moskus,

We are getting close. Can you try this as a script or send you a sample of your script? This is working on my test system.

Michael



Code:

sub main()

dim nsuccess

hs.plugin("InControl_Sage").SendSageCommandByID "1000_0", "Channel Down/Page Down"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByID "1000_0", "Channel Up/Page Up"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByName "Sage Server", "Channel Down/Page Down"
hs.waitsecs 3
hs.plugin("InControl_Sage").SendSageCommandByName "Sage Server", "Channel Up/Page Up"

end sub


OK, I take my previous statement back. It seems like scripting works too!

SendSagetCommandByName("Sage Server") did nothing. But the other worked now. Strange, it didn't in my script.

lamanmi 09-14-2010 04:24 PM

mbowling,

Quote:

Originally Posted by mbowling (Post 449225)
Michael,

I've noticed a problem when a message is displayed on the TV from HomeSeer. The intended message will display normally. Then if I leave the message on the TV until another event runs that changes a device status, a new cryptic message is displayed in the same message box as the original message. In this case the message was:

"@HAMONINIT;Garage Interior Door to Garage;Closed" ... <more text> ... "END".

I will take a look at that....one short term solution, would be to put at least some timeout to the message (i.e. 3600 seconds)...

Michael

mbowling 09-14-2010 10:18 PM

2 Attachment(s)
Michael,

I stumbled onto an interesting problem today. I have a HomeSeer event that adjusts the lighting when my HD200 is turned on. This works fine. However, I noticed that when watching a TV show and the "Stop" button is pressed on the remote control, the HomeSeer event will run that automatically adjusts the lighting. I repeated this several times by manually adjusting the lighting, pressing the "Stop" button, and then watching the lights. I also see the event being run in the HomeSeer log file.

I would have never noticed this except sometimes my wife will manually turn on a light to read a book. This is one of the lights that the HomeSeer event turned off when the HD200 was turned on. I press the "Stop" button on the remote control... the reading light turns off... she gives me a dirty look. :(

Screenshots attached.

Email68 09-16-2010 12:58 AM

I'm trying to display the caller id using the send message as well as a couple of you.

I was just trying the sendmessage action item and putting in replacement variables. But that didn't work.

So next I'm trying to use a instant script command where A22 holds the text of my caller id name.

&hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " $$DS:A22

If I leave the replacement variable part off, it displays You have a call from

But with the variable nothing displays.

Any ideas?

Thanks

mbowling 09-16-2010 10:02 AM

Quote:

Originally Posted by Email68 (Post 449726)

So next I'm trying to use a instant script command where A22 holds the text of my caller id name.

&hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " $$DS:A22

If I leave the replacement variable part off, it displays You have a call from

But with the variable nothing displays.

I'm not familiar with "instant script" or the "$$DS:A22" variable.
If you want to retrieve the device string from VBScript you would use hs.DeviceString("A22").

hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " & hs.DeviceString("A22")

lamanmi 09-16-2010 03:20 PM

Quote:

Originally Posted by Email68 (Post 449726)

&hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " $$DS:A22

I am also not familure with that, however, you can try using a concat operator such as &:


Code:

&hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " & $DS:A22

Email68 09-17-2010 12:24 AM

Thanks guys. That cleared it up.


How would I get a space between these two variables? One holds the name and the other holds the number.

Quote:

&hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " & hs.DeviceString("A22") & hs.DeviceString("A21"),4
-Tim

mbowling 09-17-2010 09:44 AM

Quote:

Originally Posted by Email68 (Post 449971)
How would I get a space between these two variables? One holds the name and the other holds the number.

Add a space in double quotes follow by another concatenation operator.

hs.plugin("InControl_Sage").SendSageMessageByID "All Devices","You have a call from " & hs.DeviceString("A22") & " " & hs.DeviceString("A21"),4

Email68 09-17-2010 12:50 PM

Thanks Mike. That worked perfect.

I really need to learn this scripting one day.

Tim

Email68 09-19-2010 08:51 PM

I'm thinking of getting an HD PVR. I already have a bitwise controller on HS. So I was wondering if there is a way using this plug in that sagetv could control a cable box to change channels for recording through the HD PVR.

lamanmi 09-20-2010 11:17 AM

Email68,

Quote:

Originally Posted by Email68 (Post 450493)
I'm thinking of getting an HD PVR. I already have a bitwise controller on HS. So I was wondering if there is a way using this plug in that sagetv could control a cable box to change channels for recording through the HD PVR.

This plugin will allow you to fire a Homeseer event from Sage. That Homeseer event could then trigger something on the Bitwise controller. This may be OK for casual use of tuning the cable box. I could even see creating a Homeseer event that would send the IR signals to turn on the cable box and set it to a channel as part of a Home Theater startup sequence.

However, I do not believe it would make sense to use this Plugin to control channel changes based on Sage TV recording schedules through the HD PVR. The best approach would be to use an IR Blaster of some sort (USB-UIRT) or some other direct connection to the Cable Box from the Sage Server itself (vs. through a server with HomeSeer). In my case, I have a Time Warner cable box that has a firewire connection tied to my Sage Server. When Sage goes to record something it calls out to an external program which uses the firewire to tell the cable box to change channels. It works very well.

Email68 09-20-2010 08:51 PM

Thanks.

That makes more sense. If I persue the purchase of a HD PVR, I'll look into that route.

-Tim

Moskus 09-22-2010 06:16 AM

Wish:
HomeSeer script command to initiate a rescan of the SageTV library. :)

lamanmi 09-22-2010 05:32 PM

Quote:

Originally Posted by Moskus (Post 450970)
Wish:
HomeSeer script command to initiate a rescan of the SageTV library. :)

Moskus,

I'll add that to the list, should be doable.....

Michael

Email68 09-28-2010 12:57 AM

Having trouble setting up 4 extenders.

When I delete all settings in HS to let Sage assign the ID numbers, I get duplicate ID numbers on different ports.

I also tried to manually add them in HS by assigning different port numbers and of course HS assigned the ID. When I enter the port number in an extender, it uses some different ID number, not the one I manually assigned.

So, I'm having trouble reliably setting up four extenders with unique ID's.

Any help is appreciated!

-Tim

lamanmi 09-28-2010 05:30 PM

Tim,

A few basic questions to get us started.

- Is Sage running as a Service?
- If you start up the Sage UI on the server, does it correctly add an ID in HomeSeer?
- If you start by turning on one extender at a time will it add the first one correctly?

To try correcting, please do the following:

- Shut down Sage
- In HomeSeer go to http://<homeseer name>/InControl_Sage_config
- Click on "Delete All" link
- Start up the Sage Server (if running Sage as a Service start up Sage UI)
- Go to the InControl - can you get through all the settings?
- If so, turn on one extender and follow the above step.

If you are still having problems, it would be very helpful if you can turn on Debug logging in HomeSeer (http://<homeseer name>/InControl_Sage_config and change log level to 3) and Sage (Advanced/Debug Log) try the above steps and send me the log files. Let me know if you need help turning on the logs and finding them.

Michael


Quote:

Originally Posted by Email68 (Post 452202)
Having trouble setting up 4 extenders.

When I delete all settings in HS to let Sage assign the ID numbers, I get duplicate ID numbers on different ports.

I also tried to manually add them in HS by assigning different port numbers and of course HS assigned the ID. When I enter the port number in an extender, it uses some different ID number, not the one I manually assigned.

So, I'm having trouble reliably setting up four extenders with unique ID's.

Any help is appreciated!

-Tim


Email68 10-01-2010 09:18 AM

Michael,

I tried your steps and still have the same issue of it keeps assigning the same homeseer ID number. For example 1022 to each extender.

I see how to turn on the debug on hs, but I don't know how to do it on sage. I'll try it again and do the logs if you'd like.

Thanks for the help.

-Tim

lamanmi 10-04-2010 05:32 PM

Email68,

Are you using Sage TV as a service?

Quote:

Originally Posted by Email68 (Post 453076)
Michael,

I tried your steps and still have the same issue of it keeps assigning the same homeseer ID number. For example 1022 to each extender.

I see how to turn on the debug on hs, but I don't know how to do it on sage. I'll try it again and do the logs if you'd like.

Thanks for the help.

-Tim



All times are GMT -6. The time now is 02:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.