Avant toute chose merci de (re)prendre connaissance de la charte et de la respecter.
Pour résumer :
- Avant de poser une question, je cherche si la réponse existe
- Je suis poli, courtois et je respecte tout un chacun sur le forum
- Si un post m'agace : je m'en éloigne plutôt que de répondre d'une façon qui pourrait être mal interprétée

Il n'est jamais du luxe que de rappeler des choses simples :
Courtoisie, amabilité, politesse et bonne humeur sont les maîtres mots pour un forum sympathique, bienveillant et accueillant :)

Toute la communauté vous remercie

TCP plugin example

Let's talk about plugins, widgets, scripts, and development with JEEDOM
Messages : 4
Inscription : 15 avr. 2017, 22:01

TCP plugin example

Message par yoggi » 15 avr. 2017, 22:11

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?


Avatar de l’utilisateur
Messages : 10085
Inscription : 09 août 2014, 12:15
Localisation : Région Parisienne
Contact :

Re: TCP plugin example

Message par magicgg91 » 15 avr. 2017, 22:31


For your first post, I think you could at least say hello.

You can download some plugins and analyse the code.
DomoPi - Mon site dédié au Raspberry Pi et à la domotique

Messages : 4
Inscription : 15 avr. 2017, 22:01

Re: TCP plugin example

Message par yoggi » 12 mai 2017, 08:52

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)!



Avatar de l’utilisateur
Messages : 266
Inscription : 15 mai 2015, 17:25
Localisation : Calvados Caen

Re: TCP plugin example

Message par bobeponge14 » 12 mai 2017, 09:15

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
Production : Jeedom Diy VM sur Proxmox
Dev/test: Jeedom Diy VM sur Virtual Box
Plugin : wifismartplug

Messages : 4
Inscription : 15 avr. 2017, 22:01

Re: TCP plugin example

Message par yoggi » 12 mai 2017, 10:33

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.


Messages : 224
Inscription : 08 mai 2015, 15:03
Localisation : Sainte Marie, La Réunion

Re: TCP plugin example

Message par pir2d2 » 04 sept. 2017, 07:37

Hello Yoggi,

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

raspberry pi, zstick S2, Jeedom V3, plein de capteurs, plein d'actionneurs, plein de protocoles différents.


Revenir vers « Software & Plugins »

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité