Jump to content
VINCELdUB

Experience Button Icons Drivers

Recommended Posts

In this thread, I am hoping for us all to post our icons we set up for experience buttons and scenario buttons. Let me be the first with a very simple one.

 

 

 

 

 

 

Happy Automating!!

Share this post


Link to post
Share on other sites

In another thread I was talking about locking/unlocking/ remote start on a vehicle with a extra remote hardwired into the relay module.

How do you create experience button icons?

Thank you

Sent from my SM-G965U using Tapatalk

Share this post


Link to post
Share on other sites

You’re welcome! Glad you have made use of it.




Happy Automating!!


Thanks to you. Is it very complicated to make one myself? to be able to put the icon that I need, in this house to put an irrigation icon



Enviado desde mi iPhone utilizando Tapatalk Pro

Share this post


Link to post
Share on other sites

Quite simply. You can edit mine to simplify.

Create a copy and name it “Car_starter.c4z”

Then rename Car_starter.c4z to Car_starter.zip

Open the zip file, and locate every image file in there.

Replace every image with same size image of one you want to use for the car starter. Has to be same resolution.

Personally, I open each image in an editor. “Paint.net” is a free and very good image editor. Then delete the contents and paste the new image in place. Save it. Keep same name of image. Very important.

Now open the “driver.xml” file with notepad or with “first object XML editor” free and very useful.

Press control+h and a replace window will pop up.

Replace the name of current driver with the new one every where.
experience-button-hottub with Car_starter

Now save the file without changing the name from driver.xml

Now change Car_starter.zip back to Car_starter.c4z

Add it to your system like you did hot tub driver.




Happy Automating!!

Share this post


Link to post
Share on other sites
1 hour ago, CondeLinux said:

 


Thanks to you. Is it very complicated to make one myself? to be able to put the icon that I need, in this house to put an irrigation icon



Enviado desde mi iPhone utilizando Tapatalk Pro

 

The above thread will work for you too. Simple change the name to something like “irrigation_toggle”

Share this post


Link to post
Share on other sites

Hi @VINCELdUB:

Thanks so much for posting this explanation. I have a lot of generic experience buttons in my project, and I've been able to create custom ones for my dealer to install.  It vastly improves the UI!

If you wouldn't mind though, I did want to ask you about one issue that has been puzzling me.  At first, I followed all the instructions and was careful to match the name of the .c4z file with the path of the images in the .xml file.  However, I kept getting an error.  After beating my head on this for a few hours, I finally figured out that if I also matched the model name to the .c4z filename and the path names, it worked like a charm.  E.g., one of my buttons was called goodbyetimer.c4z.  When the model name was "goodbye," it kept failing.  I changed the model name to "goodbyetimer," and all was well.

I am happy I got it to work, but I'm still puzzled about how this is working.  In the Hot Tub driver you posted as an example, the model name was "hottub," but the file name was "experience-button-hottub."  I am confused about why that works.  Would you mind explaining the syntax rules about the model name to me?  It is obvious I'm missing something! 

Thanks very much for your help.

Share this post


Link to post
Share on other sites
11 minutes ago, DLite said:

Hi @VINCELdUB:

Thanks so much for posting this explanation. I have a lot of generic experience buttons in my project, and I've been able to create custom ones for my dealer to install.  It vastly improves the UI!

If you wouldn't mind though, I did want to ask you about one issue that has been puzzling me.  At first, I followed all the instructions and was careful to match the name of the .c4z file with the path of the images in the .xml file.  However, I kept getting an error.  After beating my head on this for a few hours, I finally figured out that if I also matched the model name to the .c4z filename and the path names, it worked like a charm.  E.g., one of my buttons was called goodbyetimer.c4z.  When the model name was "goodbye," it kept failing.  I changed the model name to "goodbyetimer," and all was well.

I am happy I got it to work, but I'm still puzzled about how this is working.  In the Hot Tub driver you posted as an example, the model name was "hottub," but the file name was "experience-button-hottub."  I am confused about why that works.  Would you mind explaining the syntax rules about the model name to me?  It is obvious I'm missing something! 

Thanks very much for your help.

as long as all your xml is right, the name doesn't matter

Share this post


Link to post
Share on other sites
as long as all your xml is right, the name doesn't matter

Yeah, what mr. greenfield solutions said. ^
;)


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

Actually, just to be super clear, I am referring to the "model" not the "name."  I understand that the name doesn't matter.  Does the "model" matter?  When I changed the "model," everything seemed to work, but maybe I am imagining this.

Thanks for your help.

 

Share this post


Link to post
Share on other sites

Here is an example to clarify -- sorry for my poor explanation.

Consider the XML excerpt below from goodbyetimer.c4z.  (I've cut out extraneous lines in order to shorten the post.)

<name>Scenario - Experience Button - Goodbye Timer</name>
    <model>goodbyetimer</model>
    <creator>Control4</creator>
      
            <display_icons>
                <Icon height="300" width="300">controller://driver/goodbyetimer/icons/device/default_300.png</Icon>
                <Icon height="90" width="90">controller://driver/goodbyetimer/icons/device/default_90.png</Icon>

The XML file above installs properly and works fine. 

 

However, just changing the <model> line to anything other than goodbyetimer consistently results in failure.  For example, the XML file below failed to install into the project when my dealer tried: 

<name>Scenario - Experience Button - Goodbye Timer</name>
    <model>goodbye</model>
    <creator>Control4</creator>
   
            <display_icons>
                <Icon height="300" width="300">controller://driver/goodbyetimer/icons/device/default_300.png</Icon>
                <Icon height="90" width="90">controller://driver/goodbyetimer/icons/device/default_90.png</Icon>

 

Does this make sense?

Share this post


Link to post
Share on other sites

cause you path is wrong - you see your xml path for images - it says goodbyetimer but your model is goodbye - path should be goodbye. they need to match

Share this post


Link to post
Share on other sites

Right. This is exactly my question.

After a bunch of trial and error, I finally noticed that my driver only worked when the “model” matches the pathname. However, Vince’s example driver earlier in the thread works perfectly, even though the model is “hottub” and the path is “experience-button-hottub.” The two do not exactly match, but that driver still works. How come?


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

First, thanks for posting this VINCELdUB. Great information.

I am working on a button for my water valve and having trouble with the instructions.

My question is regarding what to do with the file once you have renamed it from a .c4z to a .zip.

Do you extract the zip file,  make all of the necessary changes then zip it back up and change it back to a .c4z? If so, can I just use the native extract all and compressed zip features in windows 10 or do I need other software?

OR

Do you perform the changes while it is still a .zip file? I have downloaded first object XML editor and tried notepad, but when I alter the .xml file while the driver folder is in .zip format it will not allow me to save the changes to driver.xml. It says it is read-only and must save as another filename.

 

Thanks for the help.

 

Share this post


Link to post
Share on other sites
59 minutes ago, BAS said:

Do you extract the zip file,  make all of the necessary changes then zip it back up and change it back to a .c4z? If so, can I just use the native extract all and compressed zip features in windows 10 or do I need other software?

Yes, you extract the .c4z, make changes, and re-zip the .c4z.

.c4z files are just .zip files.

You can use *any* zip software as long as it uses the zip standard, and doesn't encrypt the file.

RyanE

Share this post


Link to post
Share on other sites
On 3/2/2020 at 10:45 AM, DLite said:

Right. This is exactly my question.

After a bunch of trial and error, I finally noticed that my driver only worked when the “model” matches the pathname. However, Vince’s example driver earlier in the thread works perfectly, even though the model is “hottub” and the path is “experience-button-hottub.” The two do not exactly match, but that driver still works. How come?


Sent from my iPhone using Tapatalk

It's based on the filename as far as I'm aware, not the model.

For example if my driver filename was um_netflix.c4z the path should be: <Icon height="300" width="300">controller://driver/um_netflix/...</Icon>

Share this post


Link to post
Share on other sites
3 hours ago, TheWizard said:

For example if my driver filename was um_netflix.c4z the path should be: <Icon height="300" width="300">controller://driver/um_netflix/...</Icon>

That's exactly right.

They're based on the filename because the way those URLs work is nginx (the webserver) running on the controller has mapping rules (for the "/driver/[filename]/[path]" path, /driver/um_netflix/images/ in this case) that map to the true location of the files on the controller's filesystem (typically /mnt/internal/c4z/[filename]/www/[path]).

Since .c4z files are .zip files, that are unzipped into the 'c4z directory' as the name of the driver, this works.

RyanE

Share this post


Link to post
Share on other sites
That's exactly right.
They're based on the filename because the way those URLs work is nginx (the webserver) running on the controller has mapping rules (for the "/driver/[filename]/[path]" path, /driver/um_netflix/images/ in this case) that map to the true location of the files on the controller's filesystem (typically /mnt/internal/c4z/[filename]/www/[path]).
Since .c4z files are .zip files, that are unzipped into the 'c4z directory' as the name of the driver, this works.
RyanE

Thanks very much for clarifying.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...