Jump to content

- - - - -

Expert Mode settings lost

  • Please log in to reply
No replies to this topic

#1 123



  • Registered
  • PipPipPipPip
  • 2170 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 07 March 2008 - 09:40 AM

It seems that any changes I make in Builder's Expert Mode (including adding new Enum's (buttons) to MenuNavigationValues are Lost once the Premise Server service is stopped. In other words, everything works great (even exiting/restarting the builder) until I restart the computer or manually
stop the service. Then upon entering builder, I discover that all the changes I made are gone and I get an error such as:

"LoadStringValue() failed for property 'Value' on object 'sys://Schema/Modules/Default/Classes/SAT/MenuNavigation Active' --
contents: '{53B7413B-BD32-4466-BA24-1D0C4E6808B3}'"

It seems to get this error because the "Active" enum which I had added to MenuNavigation no longer exists.

How do I solve this? How do I make a change in Expert Mode stay there??

Surely there's a way - because otherwise it would be next to useless...I've searched the old forums and this yahoo group to no avail. If you can help shed some light on this I'd be forever grateful! :)

You've got something funny going on here. Do you have anything in the event log that indicates a bad load of the Premise Cache file (psc) after a restart?

Also, check the Premise logs (not the Windows logs) to see if you have any that have a *.bad file type. That indicates corruption of some sort. These are XML files so it is possible you've got some non-XML friendly attributes in the file.

I ran across this once with an improperly encoded ampersand (&) used in a song title. That caused Premise to fail when loading the cache file.
You can't add an enum value to an existing enumeration in Premise.

What is going on here is that Premise restricts you from changing or extending the "original" schema. Every time Premise loads, it pulls the original (i.e., shipped) read-only schema xml into the configuration. So in order to extend a device, you must (in expert mode) sub-class the device and add your own properties to it. Then you can apply IR or serial to the property (as long as you flag it as bindable).
Hi Damon,

Well that explains it, alright. Sure enough, I've discovered that it works when in the builder if I create new enums because it keeps it in the PSC (premise cache) file, but as soon as the premise service is stopped/restarted, it deletes the cache...it never writes my changes to the "_device" schema file, even if I take the read-only flag off of it...I'm sure Premise does this to protect its files, but in this case, it sure would make life easier. And if I'm not supposed to be able to create new enums, it shouldn't offer a New->Enum option and then act like it's working fine until premise service is stopped...Ergh...:)

I tried and tried to subclass the device and make my own properties and I didn't get anywhere. Maybe there's just something I'm not understanding, I don't know.

I'm not trying to rant at you, but I just don't understand why this is so complicated. I mean, I'm no dummy (at least I don't think...:) ) - been a programmer for 14 years.

I don't understand why it's not a little easier for me to make my own buttons (with IR capability) for devices in Premise. I need these buttons for a brand new DirectTV HD-DVR SAT receiver. This thing has several buttons that are custom (such as just a Red Button, Blue Button, etc.)...How are any other future devices controlled by IR supposed to be used if they don't have exactly the buttons that were thought of several years ago during Premise development?

Anyway, as it turns out, it happens that the PVR class will provide enough buttons that I can use. It's just that several of them will be named wrong. But I guess that's my easiest bet since it doesn't seem to be even moderately easy for me to create my own buttons.
Is it easy to change the position of the buttons you have to use with the wrong names?

It should not be too hard to put a different bitmap on the buttons you need so they are labeled right as long as that same button won't be used for another device. I have made a few buttons so far and most of them are a 43x43 pixel .gif or a 100x30 pixel .gif I haven't a clue how to make a new interface but I know John is working on one so maybe the future devices won't be a problem.
There are two processes at work here.

First, you must add a property to the device class that the button will control. Something like a "DirectvCommand" MultiValue with choices "Red", "Green", "Blue", "Yellow". This is what actually holds the IR command - the browser merely changes the value of the property and knows nothing of the actual IR to send out.

To add a property to hold IR (actually this is in the help files under adding custom properties to a device), first go into expert mode and make an Enumeration in your module's Classes folder and name it "DirectvCommands". Add four enums to it.

Then go to your directv class in Modules (Modules\ModuleName\Classes\ClassName). Right click and add new > Property > MultiValue. It will prompt you for a filter (enumeration) to use for the drop down list - use your DirectvCommands Enumeration. Once selected, make sure to flag this multivalue property as "Bindable" (so you can attach IR to it), and "Momentary". Now you can learn IR into this property.

Adding the actual buttons to the Browser is a completely separate process (and should be - who are we to say what type of interface you are using for your DVR control?).

This is where you need to look at the Plugins\Selectors area and find the PVR class to duplicate one of its control panels, then change the properties of the buttons to point to the values of our new DirectvCommand MultiValue property. It's not the most intuitive, but if you just look at the structure, you should be able to figure it out. Just look at the structure vs what you see on the screen for particular devices and you'll see what's going on.
Thank you Damon! :)

Believe it or not, I actually managed to figure this out finally shortly after I posted my last message (doing basically exactly what you said). I had previously created the enum structure - but didn't understand I had to create a Multivalue in the class to tie into it, hence why I couldn't get the sucker to work! Next, I hadn't picked "Momentary" and that screwed me up too.

What can I say, I never was a genius with Premise... ;) This is one of those things that it's actually not that hard as long as you actually understand what you are supposed to do. Which I didn't. :)

Thank you Damon for taking the time to explain. You've been very helpful and it does mean a lot!!!

And as for UI, it's a custom UI created outside of Premise which ties into Premise via the minibroker so don't need to worry about the browser.

Thanks again!!!

Some older posts to help you along, and training ppt:

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users