SageTCP Client
SageTCP Client
For control of an HD100/200 or client. This is limited to a single device due to the limitations of the DotNetBridge. Hopefully this will get worked out in the future.
See the installation instructions. Post questions as they arise.
Osler
See the installation instructions. Post questions as they arise.
Osler
- Attachments
-
- SageTCPClient_02202010.zip
- (1.18 MiB) Downloaded 494 times
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Thank you. This is awesome.
May I suggest that you compile multiple devices ( named SageTVClient0 through SageTVClient9 ) and include them in the zip as a workaround, that would allow us users install up to 10 clients with out having to bug you with a request.
or (and this idea is based on your old vb code which is all I have used so far), maybe you could add a couple list properties and make the one device support multiple clients, like this, add a ClientMacAddressList property with Matching ClientDeviceNameList, then have a matching NULL Device for each ClientDeviceName in the list, with the properties to populate, again this would be a work around, but should be easy to implement.
Again, thank you sir,
Gene
May I suggest that you compile multiple devices ( named SageTVClient0 through SageTVClient9 ) and include them in the zip as a workaround, that would allow us users install up to 10 clients with out having to bug you with a request.
or (and this idea is based on your old vb code which is all I have used so far), maybe you could add a couple list properties and make the one device support multiple clients, like this, add a ClientMacAddressList property with Matching ClientDeviceNameList, then have a matching NULL Device for each ClientDeviceName in the list, with the properties to populate, again this would be a work around, but should be easy to implement.
Again, thank you sir,
Gene
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Well, I could not get it working, It could not get a TCP connection. Is the SageTCPServer compatible with SageTV V7?
I set the values in the sage.properties file, (while sagetv service was stopped). I do not think SageTV is loading the sageTCPServer.
Thanks,
Gene
I set the values in the sage.properties file, (while sagetv service was stopped). I do not think SageTV is loading the sageTCPServer.
Thanks,
Gene
Re: SageTCP Client
I do not know if it is compatible with SageTV 7 or not since I haven't upgraded.
SageTCPServer is an open source project and I don't know if changes have been implemented for V7. Try the download link at this site and see if it fixes the issue:
http://talluscorp.com/mediawiki/index.p ... eTCPServer
There are also very good instructions for setting it up on your SageTV machine at the above link.
Osler
EDIT:
I just checked at another HA software site that uses SageTCPServer as the interface with the SageTV core and they are reporting no compatibility problems with SageTV7. Follow the instructions and make sure you don't have a firewall issue as well.
SageTCPServer is an open source project and I don't know if changes have been implemented for V7. Try the download link at this site and see if it fixes the issue:
http://talluscorp.com/mediawiki/index.p ... eTCPServer
There are also very good instructions for setting it up on your SageTV machine at the above link.
Osler
EDIT:
I just checked at another HA software site that uses SageTCPServer as the interface with the SageTV core and they are reporting no compatibility problems with SageTV7. Follow the instructions and make sure you don't have a firewall issue as well.
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Thank you, I will look at the site right away.
Gene
Edit: Ok, got it working, I had nielm's old GetStatus plugin installed also, removing that from sage.properties cleared it up so all is good, well almost, If it takes a dll for each of my clients, the I would need 5 total, ( 1 for headless server, 1 for HD200, 2 for PC Clients, 1 for placeshifter client).
Gene
Edit: Ok, got it working, I had nielm's old GetStatus plugin installed also, removing that from sage.properties cleared it up so all is good, well almost, If it takes a dll for each of my clients, the I would need 5 total, ( 1 for headless server, 1 for HD200, 2 for PC Clients, 1 for placeshifter client).
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Ok,
I have had a few minutes to play with your control and I like it.
I would sill like to propose that you create a single "SageTV Connector" device with the following properties:
This would allow you two create one "Connector" device which would do the connections (one connection for each "devicename/hostaddress/port" in the list) which requires the dll, then create a "SageTV Device" for each SageTV device you have (Server, extenders, etc) with no dll needed, the only requirement for setup would be adding the info correctly to three list properties of the connector device.
Just an idea, so it wont hurt my feelings if you don't like it
Thanks for the great work!!
Gene
I have had a few minutes to play with your control and I like it.
I would sill like to propose that you create a single "SageTV Connector" device with the following properties:
- STVConnected - Numeric (or a Yes/No property)
STVHostAddresses - List --\
STVHostPorts - List ........ > These tie the connector back to the "SageTV devices"
STVDeviceNames - List --/
- STVControl/DeviceName - Alpha (Used to tell the Connector which client you want to control, do send action when this property is changed, then clear it)
STVControl/Channel - Alpha
STVControl/Control - Alpha
STVControl/CustomControl - Alpha
STVControl/DVDCommand - Alpha
...
rest of writable properties
...
This would allow you two create one "Connector" device which would do the connections (one connection for each "devicename/hostaddress/port" in the list) which requires the dll, then create a "SageTV Device" for each SageTV device you have (Server, extenders, etc) with no dll needed, the only requirement for setup would be adding the info correctly to three list properties of the connector device.
Just an idea, so it wont hurt my feelings if you don't like it
Thanks for the great work!!
Gene
Re: SageTCP Client
That is a good idea but doesn't solve the central problem. The issue is that you can not have multiples of ANY device that communicates with HouseBot via the DotNetBridge. Even with your idea there is still a requirement for a seperate device instance for each extender or client. You could use a null device as you say, but it all becomes overly complex in my opinion.
I will compile several dll imports as you requested this weekend. But this, too, starts to get out of hand. For example, with my sonos driver I would need to have 32 dlls with slightly different names to accommodate the maximum number of Zone Players someone could have in their house. For SageTV there is really no limit that I am aware of for the number of client/extenders you could have(surely it's limited by server RAM), so if I make 10 for you there will be someone that wants 150 of them for their motel installation.
Osler
I will compile several dll imports as you requested this weekend. But this, too, starts to get out of hand. For example, with my sonos driver I would need to have 32 dlls with slightly different names to accommodate the maximum number of Zone Players someone could have in their house. For SageTV there is really no limit that I am aware of for the number of client/extenders you could have(surely it's limited by server RAM), so if I make 10 for you there will be someone that wants 150 of them for their motel installation.
Osler
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Osler wrote:That is a good idea but doesn't solve the central problem. The issue is that you can not have multiples of ANY device that communicates with HouseBot via the DotNetBridge. Even with your idea there is still a requirement for a seperate device instance for each extender or client. You could use a null device as you say, but it all becomes overly complex in my opinion.
I will compile several dll imports as you requested this weekend. But this, too, starts to get out of hand. For example, with my sonos driver I would need to have 32 dlls with slightly different names to accommodate the maximum number of Zone Players someone could have in their house. For SageTV there is really no limit that I am aware of for the number of client/extenders you could have(surely it's limited by server RAM), so if I make 10 for you there will be someone that wants 150 of them for their motel installation.
Osler
I think you misunderstood me, in my example above, you would only need the "Connector Device" connected to the DLL as the other devices are just "NULL Devices" with the needed property, the "Connector Device" would use the DLL to tlak to sage TV, then It would set the properties in the Null Devices.
I am running late this morning, I will explain better when I get some time today.
Gene
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
Let me see if I can explain better:
Create New Device DLL that provides the "SageTV Connector" Device to HB, This device will only have the following Properties:
STVConnected - Numeric
STVHostAddresses - List
STVHostPorts - List
STVDeviceNames - List
Plus the writable properties used to control sage with:
STVControl/DeviceName - Alpha (Used to tell the Connector which client you want to control, do send action when this property is changed, then clear it)
STVControl/Channel - Alpha
STVControl/Control - Alpha
STVControl/CustomControl - Alpha
STVControl/DVDCommand - Alpha
...
rest of writable properties
...
Then in HouseBot, create a "Null Device" called "SageTV Client1" and add the remain Read-Only properties that are currently in your "SageTCP Client". This device will not need to connect to anything, it is just a dummy device to hold the read-only properties. Then added the Device name ("SageTV Client1" to the STVDeviceNames property as well as adding the IP and Port to the STVHostAddresses and STVHostPort, respectively.
Then when you set STVConnected to "Yes" (or "1"), the "SageTV Connector" device should connect open a connection to each of the address/ports in the STVHostAdresses and STVHostPorts list. as each connection recieves data, it should look up the name of the HB device in the STVDeviceNames list and push the data to that devices properties. Anytiome you want to Control one of the SageTV Clients, you would set the correct peroperty (i.e. STVControl/Channel to change the channel) then set the STVControl/DeviceName to the Name of the HB device, your code should then look that name up in it's STVDeviceNames and use the corresponding Host Address and Port, then connect to that sagetv client and send the command.
With this setup, Only the "SageTV Connector" device needs to user you HBDotNet.dll, the other devices are just dummy devices to store the properties in and all of you code is isolated to the "SageTV Connector" device, Should be easy to code as all you are doing is pushing the data to the properties of one of the Null devices.
Hope that is easier to understand.
Gene
Create New Device DLL that provides the "SageTV Connector" Device to HB, This device will only have the following Properties:
STVConnected - Numeric
STVHostAddresses - List
STVHostPorts - List
STVDeviceNames - List
Plus the writable properties used to control sage with:
STVControl/DeviceName - Alpha (Used to tell the Connector which client you want to control, do send action when this property is changed, then clear it)
STVControl/Channel - Alpha
STVControl/Control - Alpha
STVControl/CustomControl - Alpha
STVControl/DVDCommand - Alpha
...
rest of writable properties
...
Then in HouseBot, create a "Null Device" called "SageTV Client1" and add the remain Read-Only properties that are currently in your "SageTCP Client". This device will not need to connect to anything, it is just a dummy device to hold the read-only properties. Then added the Device name ("SageTV Client1" to the STVDeviceNames property as well as adding the IP and Port to the STVHostAddresses and STVHostPort, respectively.
Then when you set STVConnected to "Yes" (or "1"), the "SageTV Connector" device should connect open a connection to each of the address/ports in the STVHostAdresses and STVHostPorts list. as each connection recieves data, it should look up the name of the HB device in the STVDeviceNames list and push the data to that devices properties. Anytiome you want to Control one of the SageTV Clients, you would set the correct peroperty (i.e. STVControl/Channel to change the channel) then set the STVControl/DeviceName to the Name of the HB device, your code should then look that name up in it's STVDeviceNames and use the corresponding Host Address and Port, then connect to that sagetv client and send the command.
With this setup, Only the "SageTV Connector" device needs to user you HBDotNet.dll, the other devices are just dummy devices to store the properties in and all of you code is isolated to the "SageTV Connector" device, Should be easy to code as all you are doing is pushing the data to the properties of one of the Null devices.
Hope that is easier to understand.
Gene
Re: SageTCP Client
Yes...I see. I am not sure if I can dynamically create a null device from with the master device, however.
This method is not without merit, or some issues that come to mind as well (adding devices after the fact, for one, and ensuring links to your themes don't break). Let me do some poking.
Osler
This method is not without merit, or some issues that come to mind as well (adding devices after the fact, for one, and ensuring links to your themes don't break). Let me do some poking.
Osler
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: SageTCP Client
I would leave it up to the user to create the client devices, The code itself just needs to be a clone of the Null Device with the SageTV read only properties, I think I could compile that in the MinGW C++ compiler, just need to strip down the sample device in the SDK, then it would not need the dotnet stuff.Osler wrote:Yes...I see. I am not sure if I can dynamically create a null device from with the master device, however.
This method is not without merit, or some issues that come to mind as well (adding devices after the fact, for one, and ensuring links to your themes don't break). Let me do some poking.
It would be up to the user to maintain the list of devices (with the Address/Port info) in the list properties of the connector device.
Gene