Premise Newbie issues

Motorola Premise
I got a Syntax error when I added this to the OnChangeOnInit script.
------------------------------------------------------------------------------------------------
' Twiddle RxTextLineTerminators because it appears to fix a 2-way comms problem
this.RxTextLineTerminators=1A
this.RxTextLineTerminators=1B
this.RxTextLineTerminators=1A
------------------------------------------------------------------------------------------------
Syntax error in script:

Error Expected end of statement
Line:2
Text:this.RxTextLineTerminators=1A (The 1A was highlighted in dark red, so were the 1B and 1A from line 3 and 4.)
this.RxTextLineTerminators=1B
this.RxTextLineTerminators=1A

I don't think it makes any difference what I change the RxTextLineTerminators value to, I think setting it back to 1A just resets the driver.
I tried using ZZ and it worked the same as using 1B. The ZZ was changed automaticly to 0D 0A 00


I just checked the Class Constructor in Damon's Integra driver.
Here is what he has.
-----------------------------------------------
set worker = this.CreateObject(schema.Device.Serial.Command.Path,"Worker")
worker.AppendCR = true
worker.waittime = "50"
this.Baud = 11
this.RxTextLineTerminators = "1A"
'cleanup
set worker = nothing
--------------------------------------------------------------
The part where it says this.Baud = 11 seems funny to me. I tried changing it to 9600 but it made no difference.
The driver still only works one way on reboot, I tried changing RxTextLineTerminators=to ZZ and back to 1A and it works again.
 
I think you need to add quotes around the string. I can't remember though as I'm still haven't been home to play with premise :-(

123 has given us several good examples to work with. I can implement a few of them this weekend and I'll post my code when it's working.

I think this will work though after you add quotations:

' Twiddle RxTextLineTerminators because it appears to fix a 2-way comms problem
this.RxTextLineTerminators="1A"
this.RxTextLineTerminators="1B"
this.RxTextLineTerminators="1A"

Thanks 123 and Wayne
 
I think you need to add quotes around the string. I can't remember though as I'm still haven't been home to play with premise :-(

123 has given us several good examples to work with. I can implement a few of them this weekend and I'll post my code when it's working.

I think this will work though after you add quotations:

' Twiddle RxTextLineTerminators because it appears to fix a 2-way comms problem
this.RxTextLineTerminators="1A"
this.RxTextLineTerminators="1B"
this.RxTextLineTerminators="1A"

Thanks 123 and Wayne

I just logged into say I figured out the Syntax error. I added the quotes after looking at Damon's driver and noticing he had tthe quotes around the 1A.
I have rebooted several times now and I still have two-way working now.

Thanks 123
 
Now that the driver seems to be working right, I can only assume something either changed in Premise since Damon wrote the original driver, or our receivers are just a bit different than the older models. I could be wrong but I am glad it is working.
 
Waynedb,

Sorry; I should've warned you earlier. My example, this.RxTextBufferLines=60, sets the value of a property that takes an integer value. Your extrapolation for use with RxTextLineTerminators overlooked that it takes a string value. String values must be delimited by double quotes.
Code:
this.RxTextBufferLines = 60   ' This property takes an integer value
this.RxTextLineTerminators = "0D 0A 00"   ' This property takes a string value
Baud is an Enumeration and an enumeration is a key-value pair. If you examine Schema/Networks/BaudRate you'll find the following key/value pair: 11 -> "9600" (in other words, the value of the eleventh key is "9600"; see the screenscrape below).

If you use this.Baud = 11 then you mean to say set the baudrate to "9600". An alternate way to express the same information is this.Baud = "9600". The double-quotes are significant; this.Baud = 9600 is incorrect!

Notice that an enumerated property, like Baud, is bit of an odd beast because it can take either an integer (the key: 11) or a string (the value: "9600").

The ZZ was changed automaticly to 0D 0A 00
The string, ZZ, was unquoted so Premise rejected it and supplied the property with its default value "0D 0A 00". If you navigate to Schema/Device/Serial/Configuration you'll see the definition of the RxTextLineTerminators and other related properties (see the attached screenscrape).

BTW, It still might be worth exploring alternate terminators; the twiddling solution is a crusty kludge. Maybe setting RxTextLineTerminators to "1A 00" would help?
 

Attachments

  • Schema_Device_Serial_Configuration.png
    Schema_Device_Serial_Configuration.png
    29.4 KB · Views: 16
  • Schema_Networks_BaudRate.png
    Schema_Networks_BaudRate.png
    16.4 KB · Views: 18
Waynedb,

Sorry; I should've warned you earlier. My example, this.RxTextBufferLines=60, sets the value of a property that takes an integer value. Your extrapolation for use with RxTextLineTerminators overlooked that it takes a string value. String values must be delimited by double quotes.
Code:
this.RxTextBufferLines = 60   ' This property takes an integer value
this.RxTextLineTerminators = "0D 0A 00"   ' This property takes a string value
Baud is an Enumeration and an enumeration is a key-value pair. If you examine Schema/Networks/BaudRate you'll find the following key/value pair: 11 -> "9600" (in other words, the value of the eleventh key is "9600"; see the screenscrape below).

Thanks, I have a lot to learn about this stuff, the missing QUOTES finally jumped out at me while I was looking at the Class Constructor and noticed Damon had the quotes around the 1A. I keep telling myself I am going to learn this stuff someday.

I will try your different RxTextLineTerminators suggestion the next time I reboot.
 
Wayne, I used the method of changing the rx terminator and it fixed my problem! I'm also running now using the gc-100 too. I'll post my driver in a few days after I use it a while to make sure there are no bugs I'm missing, but everything is working 100% as of now.

Anyone used rs232 with a samsung tv via ex-link? I'm planning on using the attached specs. There isn't an rs232 port on the back, but supposedly you can go into the service menu, enable rs232, then make a special 1/8" stereo to serial cable using the attached specs. I can be the ginea pig, but I was wondering if anyone else was thinking of doing this?
 

Attachments

  • exlink_part1.GIF
    exlink_part1.GIF
    33.7 KB · Views: 23
  • exlink_part2.GIF
    exlink_part2.GIF
    49.8 KB · Views: 28
Wayne, I used the method of changing the rx terminator and it fixed my problem! I'm also running now using the gc-100 too. I'll post my driver in a few days after I use it a while to make sure there are no bugs I'm missing, but everything is working 100% as of now.

Nice to see this works on more than just my setup, I wish I knew what causes the Integra driver to corupt itself.
 
Thanks 123, I just thought I'd tell you this was a very useful and easy to follow video! I didn't know if you'd have any programing advice for the following?

How can I back up this new custom selector? Is it backed up when I back up the module for my receiver? I tried to modify the TV selector for all TVs to add PIP channel buttons, but they won't stay upon a backup from client?

What I did:
I figured out how to add buttons to manipulate existed control property actions associated with a device. However, when I restore from a back up, I lose the new buttons and need to remake them? What I was trying to do was add channel buttons to PIP control and it works great, but I can't seem to figure out how to back up the new controls/selector addition?!?

What I did was I went to modules - Plugins - Controls Library - MiscControls. Then I copied the composite control I wanted, this was channelIR, pasted and renamed it under MiscControls. Then I set the target object, property and action. Next, I went to modules - Plugins - Selectors - AudioVideo - AV_Components - Television - TV and added a new composite control panel and pointed it to the channel buttons I created under MiscControls and position the channel buttons as necessary.

However,

vip,

Here's a short video demonstrating how to customize the user-interface controls for a specific Receiver model. It is fairly easy and only takes a few minutes.

Good luck!

BTW,
I overlooked to welcome you to Cocoontech and the Premise forum! Welcome! We hope you'll stick around and share your experiences with us.
 
Another newbie quesion:

Any way to force an action associated with a GUI such as forcing Video2 in the web UI?

I notice if you dig into the controls library, you see that there is an option to force commands such as PowerOn PowerOff PreviousChannel... How would I force a particular input when such as Video2 when I select it twice in the GUI? Right now, if I select it for the first time an IR signal is sent, but a second selection of the same input does not send a command.
 
Can you provide a little more detail...what is it you're trying to do and what are you trying to accomplish? (I'm stuck on the part where you press Video2 twice...are you trying to cycle thru the video selector?)
 
The problem is my TV has one way communication with Premise. So if someone manually changes it to video3, I need to be able to force premise to resend the video2 command. Right now, you have to select a different source in the GUI, then go back to video2. I was wanting to just simply reselect video2 from the GUI drop down and have it resend video2.

Can you provide a little more detail...what is it you're trying to do and what are you trying to accomplish? (I'm stuck on the part where you press Video2 twice...are you trying to cycle thru the video selector?)
 
so I'm half done with my home theater automation project and finally ok at using premise. But I'm looking at my IR receiver I ordered and wondering why did I order it? What do you guys use IR receivers for, should I return it? Could anyone post a macro code that uses an IR receiver? I'm kind of confused on it. Do you just compare the received string to some stored string, then run some command? How do you make a reliable compared statement as the received signal could be off a little due to intereference...

The problem is my TV has one way communication with Premise. So if someone manually changes it to video3, I need to be able to force premise to resend the video2 command. Right now, you have to select a different source in the GUI, then go back to video2. I was wanting to just simply reselect video2 from the GUI drop down and have it resend video2.

Can you provide a little more detail...what is it you're trying to do and what are you trying to accomplish? (I'm stuck on the part where you press Video2 twice...are you trying to cycle thru the video selector?)
 
The happiness of IR controlled devices....unfortunately (or fortunately) Premise tends to be really rock solid on the IR side of things...provided you have installed the blinkie correctly, learned the IR codes correctly, and set some of the other parameters, like 'repeat = 1', etc.
Where one of the major problems with IR, as you can guess, is the first time you pick up the physical remote, you have upset the apple cart, with the exception of discrete commands. For instance, some receivers have discrete off/on. That's good. Volume also tends to be immune to physical vs Premise problems (it might be loud, but you can still adjust it from either). Where things get wrapped around the axle is things like surround modes, inputs, etc...as you have no doubt found out.
Get rid of your IR receiver? No. Remember to a) leave the physical remotes alone? Yes. ;) Teach the wife (if applicable) how to use Premise and to NEVER touch the old remotes.Yes. Do these things and you'll be fine.
On the other hand, after a year or two, I finally WON my bid on an Integra. So, do as I say.... :rolleyes:
 
For now, I see three reasons to keep the global cache receiver (GC-IRE & RG1):

1. I used it a lot so far to learn remote codes in premise instead of searching the web.
2. I just spotted an IR driver that 123 posted a while back that allows you to define an IR remote that will allow universal remotes to trigger Premise actions!
3. Is this possible: Can I write an on property change code that takes any received IR command on the IRE and spit it out to all emitters? This would allow one to put all the components in a closet and still use the factory remote pointed at the receiver connected to the GC-IRE. Any thoughts?

The happiness of IR controlled devices....unfortunately (or fortunately) Premise tends to be really rock solid on the IR side of things...provided you have installed the blinkie correctly, learned the IR codes correctly, and set some of the other parameters, like 'repeat = 1', etc.
Where one of the major problems with IR, as you can guess, is the first time you pick up the physical remote, you have upset the apple cart, with the exception of discrete commands. For instance, some receivers have discrete off/on. That's good. Volume also tends to be immune to physical vs Premise problems (it might be loud, but you can still adjust it from either). Where things get wrapped around the axle is things like surround modes, inputs, etc...as you have no doubt found out.
Get rid of your IR receiver? No. Remember to a) leave the physical remotes alone? Yes. :) Teach the wife (if applicable) how to use Premise and to NEVER touch the old remotes.Yes. Do these things and you'll be fine.
On the other hand, after a year or two, I finally WON my bid on an Integra. So, do as I say.... :)
 
Back
Top