Hey guys
I Know I’m being an n00b here and missing something very easy.
I’m looking to build a remote control using Openremote to control some Z Wave devices and to control my TV’s running MediaPortal. So far I’ve got the Z Wave devices running fine but having a few issues controlling MediaPortal.
MediaPortal has a plugin call WiFi remote, you can download an app on Android and use it that way or you can send telnet commands to it
I can telnet to the device and issue commands and it controls MediaPortal fine, once I try it from Openremote I run into problems
I’ll run through the process I’ve completed
First from telnet
C:\telnet 192.168.. 8017
{‘Type’:‘identify’,‘Name’:‘My PC’, ‘Application’:‘CouchPotato’, ‘Version’:‘0.3.1.2’, ‘Authenticate’:{ ‘AuthMethod’:‘none’}}
First command just logs you in and lets you issue commands
{‘Type’:‘key’, ‘Key’:‘m’}
Key m is just the mute button, once issued the TV is mute\muted
All that works fine
I then added the commands to OpenRemote, so I created two new commands
Name: Connect
Protocol: Telnet
IP:192.168..
Port:8017
Command: null|{‘Type’:‘identify’,‘Name’:‘My PC’, ‘Application’:‘CouchPotato’, ‘Version’:‘0.3.1.2’, ‘Authenticate’:{ ‘AuthMethod’:‘none’}}
Name: Mute
Protocol: Telnet
IP:192.168..
Port:8017
Command: null|{‘Type’:‘key’, ‘Key’:‘m’}
I then mapped them to buttons on the GUI, so I press the connect button first to login and then mute button but that’s it nothing happens in MediaPortal. I check the logs and I see the command have been sent successfully
DEBUG 2016-11-01 17:04:02,167 (Telnet): Building Telnet command
DEBUG 2016-11-01 17:04:02,167 (Telnet): Telnet Command: port= 8017
DEBUG 2016-11-01 17:04:02,167 (Telnet): Telnet Command: command = null|{‘Type’:‘identify’,‘Name’:‘My PC’, ‘Application’:‘CouchPotato’, ‘Version’:‘0.3.1.2’, ‘Authenticate’:{ ‘AuthMethod’:‘none’}}
DEBUG 2016-11-01 17:04:02,167 (Telnet): Telnet Command: ipAddress = 192.168..
DEBUG 2016-11-01 17:04:02,167 (Telnet): Telnet Command created successfully
INFO 2016-11-01 17:04:02,198 (Telnet): send: {‘Type’:‘identify’,‘Name’:‘My PC’, ‘Application’:‘CouchPotato’, ‘Version’:‘0.3.1.2’, ‘Authenticate’:{ ‘AuthMethod’:‘none’}}
DEBUG 2016-11-01 17:04:31,823 (Telnet): Building Telnet command
DEBUG 2016-11-01 17:04:31,823 (Telnet): Telnet Command: port= 8017
DEBUG 2016-11-01 17:04:31,823 (Telnet): Telnet Command: command = null|{‘Type’:‘key’, ‘Key’:‘m’}
DEBUG 2016-11-01 17:04:31,823 (Telnet): Telnet Command: ipAddress = 192.168..
DEBUG 2016-11-01 17:04:31,823 (Telnet): Telnet Command created successfully
INFO 2016-11-01 17:04:31,823 (Telnet): send: {‘Type’:‘key’, ‘Key’:‘m’}
I do have a work around in place at the moment, using my Z Wave controller (Vera Lite) I created a scene and can send LUUP code and it will then issue the correct command
LUUP Code:
local Inlog="{“Type”:“identify”,“Name”:“Vera”,“Application”:“VeraGos”,“Version”:“0.0.1.1”,“Authenticate”:{“AuthMethod”:“none”}}"
local wmcCmd = “{“Type”:“key”, “Key”:“m”}”
local socket = require(“socket”)
tcp = assert(socket.connect(“192.168..”, 8017))
tcp:send(Inlog … “\r\n”)
luup.sleep(100)
tcp:send(wmcCmd … “\r\n”)
tcp:close()
return 0
I would like it if Openremote could send the command straight to MediaPortal and not have to jump off my Z Wave box
Thanks