Page 6 of 7

Re: Sony TV Network Remote Control Plugin

Posted: Sun Dec 31, 2017 6:18 am
by kgschlosser
this sony plugin is getting rather large.

But it is going to be able to control TV's, AVR's, Camera's, Home Theatre in a box, some standalone media speakers. well I guess whatever responds to a UPNP SSDP discovery packet and supports the methods that are built into the API.

11343 lines of code so far. and I have the TV and about 1/2 of the AVR done. I started working on the actual EG plugin a while ago I will have to change some things about on it. The count above does not include the plugin for the API.

Re: Sony TV Network Remote Control Plugin

Posted: Mon Jan 01, 2018 5:22 am
by kgschlosser
ok so I have finished up with the AVR.... stuff.. only the camera left to do.

Number of Files: 31
Commented Lines: 592
Doc String Lines: 4232
Code Lines: 6044
Blank Lines: 1337
Total Lines: 12205

Re: Sony TV Network Remote Control Plugin

Posted: Wed Jan 03, 2018 3:32 am
by blaher
Sounds like quite the epic plug-in. :)

Re: Sony TV Network Remote Control Plugin

Posted: Wed Jan 03, 2018 6:50 am
by kgschlosser
It's getting quite large.

I have been working on the documentation for it. I still have more work to do with it. but essentially if i format all of my doc strings a specific way and set up the files needed to parse and organize those doc stings it will generate the HTML code for documentation web pages.

here is the tally thus far after getting together the documentation (well most of it. still doing some reformatting)

Commented Lines: 1155
Doc String Lines: 4988
HTML Lines: 47572
Restructured Text Lines: 431
Code Lines: 8104
Blank Lines: 1920
----------------------------------------
Totals:
Number of Files: 139
Python Code Lines: 16167
Documentation Code Lines: 52991
Lines: 64170

Re: Sony TV Network Remote Control Plugin

Posted: Wed Jan 03, 2018 6:55 am
by kgschlosser
attached is a copy of the documentation. Have a read through if ya like. You will get to see some of the things you are going to be able to do with it.


open up the index.html in your browser.

Re: Sony TV Network Remote Control Plugin

Posted: Thu Jan 04, 2018 3:21 am
by blaher
Looks pretty cool.

class SonyAPI.browser.BookmarkItem(sony_api, url='', title='', type='', favicon='')[source]

icon

load()

Loads this website.

Using this combined with Alexa to load a YouTube video of a fireplace when you say, Alexa, turn on fireplace, would be pretty novel. :-)

Re: Sony TV Network Remote Control Plugin

Posted: Thu Jan 04, 2018 3:54 am
by kgschlosser
a youtube yule log. (search it you'll laugh!!)

Re: Sony TV Network Remote Control Plugin

Posted: Thu Jan 04, 2018 1:59 pm
by zian
Please tell me AVR stands for Audio Video Reciever and not A Video Recorder.

Pretty please.
Cherry on top too.
;)

Re: Sony TV Network Remote Control Plugin

Posted: Thu Jan 04, 2018 4:54 pm
by kgschlosser
I am going to say yes.. But you are going to be all hurt about it tho.

It presently works with this audio devices. They do not list any other ones.

HT-CT800 2.1
STR-DN1080 7.2
SRS-ZR5

Re: Sony TV Network Remote Control Plugin

Posted: Sat Jan 06, 2018 2:29 pm
by zian
No big whoop. Not for me anyways.
I have this Sony... STRDN1030
And along with EG & USBirt It does most all I want.

It would just be neat if the Sony could "talk" to my other gear.
Maybe someday.

Still... appreciate all your work on this.
Your A Good Man.

Re: Sony TV Network Remote Control Plugin

Posted: Sat Jan 06, 2018 3:54 pm
by kgschlosser
Well I doubt that Sony is going to add the API to already existing equipment. They will add it to new products. I am not sure if there is any means of network control.


Here are 2 things you can do to see.

Download the Intel UPNP developers tools

And Angry IP Scanner


The UPNP tools you will want to use the device sniffer application. In one of the drop-down menu there will be an item to scan root devices. Once it finishes go through the list and see if you can locate your AVR. It's easier if you know it's IP. But if you look at the data sent from each device you should see something under the ST: section (I think) that will have Sony in it.

Angry IP Scanner is a port scanner. Simply input the IP of your AVR and have it scan all ports (may take a while to do) and see if any are open angry IP I think shows you some information about the connection .

Does your AVR have a serial port?

Re: Sony TV Network Remote Control Plugin

Posted: Sat Dec 01, 2018 7:39 pm
by tobyg
I just wanted to flag that I've copied the revised version of the plugin to the first post at the top of this thread. The plugin does still work with my new Sony XBR75X900F (which, by the way, is a beautiful set if anyone's in the market).

Re: Sony TV Network Remote Control Plugin

Posted: Mon Jan 21, 2019 3:21 am
by blaher
tobyg wrote: Sat Dec 01, 2018 7:39 pm I just wanted to flag that I've copied the revised version of the plugin to the first post at the top of this thread. The plugin does still work with my new Sony XBR75X900F (which, by the way, is a beautiful set if anyone's in the market).
Why did you delete the guid = "{B2C87E9E-D94F-49A6-AD79-71BBE984ACFB}" line? I tried to update to your plugin, but EventGhost thinks it's a different plugin, presumably because of that, and macros are all hosed.

Also, do you think you could trigger an event after the 'get current state'? It's working for me doing a "print(eg.result)", but that's not much use for macros.

Cheers!

Re: Sony TV Network Remote Control Plugin

Posted: Thu Jun 27, 2019 10:12 pm
by philg
Hi, I just purchased a STR-DN1080 (after checking that there was some support in EventGhost as I used EG on my old pioneer amp a lot).
Anyway, cut to the chase - Im getting lots of errors (using the plugin 0.0.3 in the first link on this topic.

Mute
Sony TV Network Remote Plugin: Mute
Error in Action: "Sony TV Network Remote Plugin: Mute"
Traceback (most recent call last) (0.5.0-rc6):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\SonyNetworkRemote\__init__.py", line 180, in __call__
self.plugin.SendCommand(self.value)
TypeError: object() takes no parameters

TV Power
Sony TV Network Remote Plugin: TV Power
Error in Action: "Sony TV Network Remote Plugin: TV Power"
Traceback (most recent call last) (0.5.0-rc6):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\SonyNetworkRemote\__init__.py", line 180, in __call__
self.plugin.SendCommand(self.value)
TypeError: object() takes no parameters


I tried upgrading eventghost from the 4.x to 5.x RC6 but it made no difference.

Any idea what those errors are and if there is anything newer that may work (I dont feel like dusting off my python skills unless I really have to!)

Regards,
Phil

Re: Sony TV Network Remote Control Plugin

Posted: Fri Jun 28, 2019 3:40 am
by kgschlosser
I would be willing to continue development but I need access to a TV.

Because of the use of both UPNP and HTTP for connection and control I would need to have VPN access so i would be able to get broadcasted SSDP packets and things of that nature.