Page 1 sur 1

TCP plugin example

Publié : 15 avr. 2017, 22:11
par yoggi
I would like to create a plugin that controls my Sharp TV, I am looking for an example plugin that uses TCP (raw), does anybody know of a plugin that uses tcp that I can look at when it comes to connecting over tcp?

Joachim

Re: TCP plugin example

Publié : 15 avr. 2017, 22:31
par Anonyme
Contenu supprimé à la demande de son auteur

Re: TCP plugin example

Publié : 12 mai 2017, 08:52
par yoggi
Hi magicgg91 and hi Jeedom community,

My efforts to create a plugin for Sharp Aquos TV has progressed to the point where I have a plugin that can send tcp/ip commands to the TV and get the response back from it. I used jmoore987’s sharp_aquos_rc python library (github) but I have a question I hope somebody could help me with!

I want to read values from the TV and show them in Jeedom, what is the best way of saving these temporary values (values like if the TV is on or off, volume level, sleep timer, inputs etc. the return values are short text strings like ‘0’ ‘1’ ‘OK’ ‘ERR’ … ). Should I use Jeedoms database? Or should I do it in some other way since the values are of no use after the TV is turned off and could be removed?
I would be glad if somebody could give a short code example (to be used in the php class file)!

Regards,

Joachim

Re: TCP plugin example

Publié : 12 mai 2017, 09:15
par bobeponge14
hello Yoggi

I think you have to read this documentation to understand how to create a plugin https://github.com/jeedom/plugin-templa ... /doc/fr_FR and analyse template plugin.
As said magicgg91 the best way is to analyse some plugin.
For my part, I also developed my first plugin and I studied the plugin mpower which allowed me to understand quite a lot.
You can also take inspiration from the plugin LG TV or the plugin TV philipps
Rgds

Re: TCP plugin example

Publié : 12 mai 2017, 10:33
par yoggi
Hi bobeponge14,

I have looked at other plugins (I have looked at the LGTV and Philips but not mpower, I will have a look at it!), and I have read the document you linked to. I used google to translate it into English but technical details don’t always translate that well.

As this is the English part of Jeedom I was hoping that you (read Jeedom forum users) would be a little bit more forthcoming as most of the documentation and examples are in French. I admit I am a newcomer to Jeedom, php and python (and programing in general) but I do think that I have made good progress in ‘reverse engineered’ the current plugins in order to get to where I am now with my TV plugin.

I hope that somebody could answer the question if Jeedoms database is a good place to store temporary values or if this should be done using php arrays.

Joachim

Re: TCP plugin example

Publié : 04 sept. 2017, 07:37
par pir2d2
Hello Yoggi,

I am interested in your plugin. Can you release your plugin in bêta so I can test it ? ;)

cheers,
Pierre