Author Topic: GC100 Tri-Port Connector  (Read 912 times)

Offline Fryswatter

  • Full Member
  • ***
  • Posts: 114
  • Karma: +1/-0
GC100 Tri-Port Connector
« on: January 15, 2018, 01:16:53 am »
Does anyone know or have had any experience with the iFlex using a Tri-Port connector? I'm trying to get communication established with the IR Flex Blaster cable on port 3 of the Tri-Port connector. The IR Flex Blaster cable was the only cable hooked up to the iFlex module to begin with when I installed and configured the GC100 plug-in. However, after removing the IR Flex Blaster cable and installing a Tri-Port Connector to the single port of the iFlex module, I am forced by Global Cache to use port 3 of the Tri-Port Connector and now the GC100 plug-in won't recognize that the blaster cable is attached. I have configured the iFlex to use the Tri-Port with the blaster cable and tested it with multiple API protocol calls and it works just fine. There must be a part of the code in the plug-in to change in order for the plug-in to start addressing "SendProntoCode" to the correct port of the module! :-\

Shouldn't the GC100 parent device create 3 IR port devices to be able to use in scenes?
« Last Edit: January 15, 2018, 02:01:38 am by Fryswatter »

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 856
  • Karma: +61/-8
Re: GC100 Tri-Port Connector
« Reply #1 on: January 15, 2018, 03:51:25 pm »
First I'm unsure if this plugin will work with the "Flex" eg

    https://www.globalcache.com/products/flex/

I have used it successfully with this model:

    https://www.globalcache.com/products/itach/ip2irspecs/

Having said that I "imagine" they may be compatible.

You are correct in saying there should be three child devices showing in the UI but sometime back, for reasons unknown, the plugin was changed so that they became hidden. If the plugin is working for you, you may see them listed amongst all this stuff.

<VERA_IP_ADDRESS>/port_3480/data_request?id=user_data&output_format=xml

with the flag like so:  Hidden="0"

Regardless of the above I rehashed the plugin recently, so you could try uploading these files and restart and see what happens:

    http://forum.micasaverde.com/index.php/topic,37268.msg320919.html#msg320919

Once again noting this may not work with the iFlex. Other than than - not sure what your next step would be.


Offline Fryswatter

  • Full Member
  • ***
  • Posts: 114
  • Karma: +1/-0
Re: GC100 Tri-Port Connector
« Reply #2 on: January 15, 2018, 04:51:39 pm »
@a-lurker I'll read through the posts to the link you provided. I've had it working for years with just a single blaster cable attached to the iFlex module without a Tri-Port cable. And I do remember when they decided to by default hide the children..lmao. I called them up at support and they explained a few days after they did that. The plugin and devices continued to work without any issues however my uploaded device files ceased to work anymore. That's when I discovered that in the advanced section of the UI, you could select the child device for the IRport and all was well. Just can't figure out why, and I did a fresh plugin install, the addition child devices are not detected when attaching the tri-port cable.

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 856
  • Karma: +61/-8
Re: GC100 Tri-Port Connector
« Reply #3 on: January 16, 2018, 11:44:53 pm »
Well the change of cable seems to be the issue somehow. However if you want to try to updating the plugin you could follow these steps.
Use the UI to back up the existing plugin files first - always a good move, as plugins seem to come and go:

D_GC100.json
D_GC100.xml
I_GC100.xml

You should be able to "unhide" the existing three children (if they exist) with:

Code: [Select]
luup.attr_set("invisible", "0" ,<deviceID_IR_1>)
luup.attr_set("invisible", "0" ,<deviceID_IR_2>)
luup.attr_set("invisible", "0" ,<deviceID_IR_3>)

return true

in the Lua test window in the UI, where you have inserted the id of the three children above. If they don't exist that would seem to be an issue.

Turn off automatic updates for the GC100 plugin in the UI.

Then overwrite files with the four files from here - noting there is one extra file (L_GC100.lua) You can upload them using the UI upload. Make sure to uncheck the "Restart Luup after upload" then recheck it when upload the last file. After the luup engine restart and after a bit refresh your browser then: If the plugin update is successful you will see this variable: "UseGC100Codes" when the variables are listed in the UI.

Regardless it seems you may have some other problem if it all used to work and a cable change caused problems.

The GC100 code I modified works on Vera and openLuup. Good luck; not sure I can help much further.



Offline Fryswatter

  • Full Member
  • ***
  • Posts: 114
  • Karma: +1/-0
Re: GC100 Tri-Port Connector
« Reply #4 on: January 17, 2018, 12:32:05 am »
Well the change of cable seems to be the issue somehow. However if you want to try to updating the plugin you could follow these steps.
Use the UI to back up the existing plugin files first - always a good move, as plugins seem to come and go:

D_GC100.json
D_GC100.xml
I_GC100.xml

You should be able to "unhide" the existing three children (if they exist) with:

Code: [Select]
luup.attr_set("invisible", "0" ,<deviceID_IR_1>)
luup.attr_set("invisible", "0" ,<deviceID_IR_2>)
luup.attr_set("invisible", "0" ,<deviceID_IR_3>)

return true

in the Lua test window in the UI, where you have inserted the id of the three children above. If they don't exist that would seem to be an issue.

Turn off automatic updates for the GC100 plugin in the UI.

Then overwrite files with the four files from here - noting there is one extra file (L_GC100.lua) You can upload them using the UI upload. Make sure to uncheck the "Restart Luup after upload" then recheck it when upload the last file. After the luup engine restart and after a bit refresh your browser then: If the plugin update is successful you will see this variable: "UseGC100Codes" when the variables are listed in the UI.

Regardless it seems you may have some other problem if it all used to work and a cable change caused problems.

The GC100 code I modified works on Vera and openLuup. Good luck; not sure I can help much further.

Uploaded the files, and now there are no children available nor are they hidden.

Edit: I think I might just create some lua functions and use non-blocking function calls where needed. Hate to have to do that since it's not as simple as using a plugin, but it will suffice.
« Last Edit: January 17, 2018, 12:38:46 am by Fryswatter »

Offline RichieB

  • Full Member
  • ***
  • Posts: 127
  • Karma: +1/-0
Re: GC100 Tri-Port Connector
« Reply #5 on: July 20, 2018, 06:12:05 pm »
yes and no
 so i have one of these i used to use i found the Broadlink Ir baster much easier
but i will post the code i use to use im my setup maybe u could use it for something
Code: [Select]
dofile("/root/SceneScripts/Devices")

-- IR Codes

Pioneer= {}
Pioneer.IROut= "2"
Pioneer.Power= {}
Pioneer.Power.Output= Pioneer.IROut
Pioneer.Power.Frequency= "19290"
Pioneer.Power.Code= "1,164,85,9,33,9,13,8,33,9,13,8,13,8,33,9,13,8,33,9,13,8,33,9,13,8,33,9,33,9,13,8,33,9,13,8,13,8,13,8,33,9,33,9,33,9,13,8,13,8,13,8,33,9,33,9,13,8,13,8,13,8,33,9,33,9,33,9,385,172,85,9,33,9,12,9,33,9,12,9,12,9,33,9,12,9,33,9,12,9,33,9,12,9,33,9,33,9,12,9,33,9,12,9,12,9,12,9,33,9,33,9,33,9,13,8,13,8,13,8,33,9,33,9,13,8,13,8,13,8,33,9,33,9,33,9,385"
Pioneer.Input1= {}
Pioneer.Input1.Output= Pioneer.IROut
Pioneer.Input1.Frequency= "39936"
Pioneer.Input1.Code= "1,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,21,22,21,22,63,22,21,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,21,22,798"
Pioneer.Input2= {}
Pioneer.Input2.Output= Pioneer.IROut
Pioneer.Input2.Frequency= "19290"
Pioneer.Input2.Code= "1,164,85,9,33,9,11,10,33,9,11,10,11,10,33,9,11,10,33,9,11,10,33,9,12,9,33,9,33,9,12,9,33,9,12,9,33,9,12,9,33,9,12,9,12,9,12,9,12,9,33,9,12,9,33,9,12,9,33,9,33,9,33,9,33,9,12,9,385,173,84,9,33,9,12,9,33,9,12,9,12,9,33,9,12,9,33,9,12,9,33,9,12,9,33,9,33,9,12,9,33,9,12,9,33,9,12,9,33,9,12,9,12,9,12,9,12,9,33,9,12,9,33,9,12,9,33,9,33,9,33,9,33,9,12,9,385"
Pioneer.Input3= {}
Pioneer.Input3.Output= Pioneer.IROut
Pioneer.Input3.Frequency= "39936"
Pioneer.Input3.Code= "1,10,63,22,63,22,21,22,63,22,63,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,798,340,169,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,21,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,798"
Pioneer.Input4= {}
Pioneer.Input4.Output= Pioneer.IROut
Pioneer.Input4.Frequency= "40000"
Pioneer.Input4.Code= "1,360,180,22,67,22,22,22,67,22,22,22,22,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,67,22,22,22,22,22,22,22,67,22,67,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,22,22,22,22,67,22,22,22,67,22,989,360,180,22,67,22,22,22,67,22,22,22,22,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,22,22,22,22,22,22,67,22,67,22,22,22,67,22,22,22,67,22,67,22,67,22,22,22,22,22,989"
Pioneer.Input5= {}
Pioneer.Input5.Output= Pioneer.IROut
Pioneer.Input5.Frequency= "40000"
Pioneer.Input5.Code= "1,344,166,21,65,21,22,21,65,21,22,21,22,21,65,21,22,21,65,21,22,21,65,21,22,21,65,21,65,21,22,21,65,21,22,21,22,21,65,21,65,21,65,21,65,21,22,21,22,21,65,21,65,21,22,21,22,21,22,21,22,21,65,21,65,21,22,21,1039,344,166,21,65,21,22,21,65,21,22,21,22,21,65,21,22,21,65,21,22,21,65,21,22,21,65,21,65,21,22,21,65,21,22,21,65,21,65,21,22,21,65,21,22,21,22,21,65,21,65,21,22,21,22,21,65,21,22,21,65,21,65,21,22,21,22,21,1039"




--Cablebox
Cable= {}
Cable.IROut= "2"
Cable.Power= {}
Cable.Power.Output= Cable.IROut
Cable.Power.Frequency= "57339"
Cable.Power.Code= "1,191,191,47,146,47,146,47,48,47,146,47,146,47,146,47,146,47,146,47,48,47,48,47,48,47,48,47,48,47,146,47,48,47,48,47,48,47,48,47,48,47,146,47,146,47,146,48,2187"




--Tendak 4 x 1 HDMI Switch
HDMISwitcher= {}
HDMISwitcher.IROut= "3"
HDMISwitcher.Input1= {}
HDMISwitcher.Input1.Output= HDMISwitcher.IROut
HDMISwitcher.Input1.Frequency= "37993"
HDMISwitcher.Input1.Code= "1,343,171,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,759,343,85,22,759"
HDMISwitcher.Input2= {}
HDMISwitcher.Input2.Output= HDMISwitcher.IROut
HDMISwitcher.Input2.Frequency= "37993"
HDMISwitcher.Input2.Code= "1,343,171,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,759,343,85,22,759"
HDMISwitcher.Input3= {}
HDMISwitcher.Input3.Output= HDMISwitcher.IROut
HDMISwitcher.Input3.Frequency= "37993"
HDMISwitcher.Input3.Code= "1,343,171,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,759,343,85,22,759,343,85,22,759"
HDMISwitcher.Input4= {}
HDMISwitcher.Input4.Output= HDMISwitcher.IROut
HDMISwitcher.Input4.Frequency= "37993"
HDMISwitcher.Input4.Code= "1,343,171,22,21,22,21,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,21,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,21,22,63,22,63,22,63,22,63,22,759,343,85,22,759"


-- BenQ
Projector= {}
Projector.IROut= "1"
Projector.Power= {}
Projector.Power.Output= Projector.IROut
Projector.Power.Frequency= "38000"
Projector.Power.Code= "1,343,171,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,64,20,64,20,20,20,20,20,20,20,64,20,20,20,20,20,20,20,20,20,20,20,20,20,64,20,20,20,64,20,64,20,64,20,64,20,64,20,64,20,1781"
Projector.HDMI1= {}
Projector.HDMI1.Output= Projector.IROut
Projector.HDMI1.Frequency= "38000"
Projector.HDMI1.Code= "1,343,172,23,19,23,19,23,20,23,20,23,19,23,19,23,19,23,19,23,19,23,19,23,19,23,19,22,61,23,61,23,19,23,19,23,61,23,19,23,19,23,19,23,19,23,19,23,61,22,20,22,19,23,61,23,61,23,61,23,61,23,61,23,19,23,61,22,1636"
Projector.HDMI2= {}
Projector.HDMI2.Output= Projector.IROut
Projector.HDMI2.Frequency= "38000"
Projector.HDMI2.Code= "1,342,172,23,19,23,19,23,19,23,19,23,19,23,19,22,20,22,19,23,19,23,19,23,19,23,19,23,61,23,61,23,19,23,19,23,61,23,19,22,61,23,19,23,19,23,19,23,61,23,20,23,19,23,61,23,19,23,61,23,61,22,61,23,19,23,61,23,1636"

--Minix X7
Minix= {}
Minix.IROut= "2"
Minix.Power= {}
Minix.Power.Output= Minix.IROut
Minix.Power.Frequency= "38000"
Minix.Power.Code= "69,341,171,22,63,22,21,22,21,21,21,22,21,22,21,21,22,21,21,22,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,21,21,22,21,22,63,22,63,22,21,21,21,22,21,22,63,22,63,22,63,22,21,21,21,22,63,22,63,22,63,22,1526,342,85,22,1526"
Minix.Up= {}
Minix.Up.Output= Minix.IROut
Minix.Up.Frequency= "38000"
Minix.Up.Code= "69,342,171,21,64,21,22,21,21,22,21,22,21,21,21,22,21,22,21,21,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,21,21,21,22,21,22,63,22,21,22,63,22,21,21,21,22,63,22,63,22,63,22,21,22,63,22,1523,341,85,22,3644"
Minix.Down= {}
Minix.Down.Output= Minix.IROut
Minix.Down.Frequency= "38000"
Minix.Down.Code= "69,342,171,21,64,21,21,22,21,22,21,21,21,22,21,22,21,22,21,21,21,22,63,22,63,22,63,22,63,22,63,22,63,22,63,22,21,22,63,22,63,22,21,21,64,21,21,22,21,22,21,21,64,21,21,22,21,22,63,22,21,21,64,21,64,21,64,21,1524,341,85,21,3642"


-- Device Inputs


Pioneer.Minix= Pioneer.Input1
Pioneer.Chromecast= Pioneer.Input2
Pioneer.Cable= Pioneer.Input3
Pioneer.Game= Pioneer.Input4
Pioneer.USB= Pioneer.Input5


HDMISwitcher.Chromecast= HDMISwitcher.Input2
HDMISwitcher.Minix= HDMISwitcher.Input1
HDMISwitcher.Cable= HDMISwitcher.Input3
HDMISwitcher.Aux= HDMISwitcher.Input4

Projector.Chromcast= Projector.HDMI1
Projector.Minix= Projector.HDMI1
Projector.Cable= Projector.HDMI1

--functions
function SendIR(Info, Count)
luup.io.write("sendir,1:" .. Info.Output .. ",1," .. Info.Frequency .. "," .. Count .. "," .. Info.Code, GC100)
luup.sleep(500)
end

the IROut is the port
and it would send it to the main GC100

I had a device list also with something like

Code: [Select]
ApplianceModule= 389
ApplianceModule1= 390
ApplianceModule2= 391
ApplianceModule3= 392
ApplianceModule4= 393
ApplianceModule5= 394
SceneController= 2
SceneController1= 191
ALTUI= 299
AVRE400USAMain= 358
AVRInputControl= 317
AVRVolume= 388
BackPorch= 200
BIBackPorch= 254
BIBackPorchMotionSensor= 255
BIDriveway= 252
BIDrivewayMotionSensor= 253
BIFrontDoor= 248
BIFrontDoorMotionSensor= 249
BluetoothNetwork= 190
................. and more devices


then functions code

Code: [Select]
dofile("/root/SceneScripts/Devices.luup")
dofile("/root/SceneScripts/HomeTheater.IRCodes.luup")

function SetInput(Input)
luup.io.write(Input, GC100)
end

function AmpSendPower()
luup.io.write(HomeTheater.Amp.Power, GC100)
luup.sleep(500)
end

function RestartAmp()
AmpSendPower()
AmpSendPower()
end

function ProjSendPower()
luup.io.write(HomeTheater.Projector.Power, GC100)
luup.sleep(500)
end

function ConfigureHomeTheater(Configuration)
local TheaterStatus= luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", HomeTheater)
local Projector= {}
local Projector.Status= luup.variable_get("urn:jnethost-com:serviceId:State", "Projector", HomeTheater)
local Projector.Input= luup.variable_get("urn:jnethost-com:serviceId:State", "ProjectorInput", HomeTheater)
local Amp= {}
local Amp.Status= luup.variable_get("urn:jnethost-com:serviceId:State", "Amp", HomeTheater)
local Amp.Input= luup.variable_get("urn:jnethost-com:serviceId:State", "AmpInput", HomeTheater)

if (Configuration.Theater.Needed == 1)
then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {[newTargetValue] = "1"}, HomeTheater)
end

if not (Configuration.Projector.Needed == Projector.Status)
then
ProjSendPower()
if(Configuration.ProjectorNeeded == "0")
then
ProjSendPower()
end
end

if not (Configuration.Projector.Input == nil)
then
SetInput(IRCodes.Projector[Configuration.Projector.Input])
end

if not (Configuration.Amp.Needed == AmpStatus)
then
AmpSendPower()
end

if not (Configuration.Amp.Input == nil)
then
SetInput(IRCodes.Amp[Configuration.Amp.Input])
RestartAmp()
end

if not (Configuration.HDMISwitch.Input == nil)
then
SetInput(IRCodes.HDMISwitch[Configuration.HDMISwitch.Input])
end
end