Can't create/use a Custom Toniebox model [solved]

Hi, i’m new in using the TeddyCloud and I love it. Actually I’ve two boxes connected, one cc3200 and one ESP32. It works fine. But both boxes are red, so one has a selfmade couver from fabric. Now I wont to use a proper picture of this box (with the couver) in my TeddyCloud, but it dosn’t work.

Here is what i’ve done:

  1. I go to the docker volume “teddycloud_config” and edited the “tonieboxes.custom.json” like so:
/var/lib/docker/volumes/teddycloud_config/_data/tonieboxes.custom.json                       [
    {
        "id": "98-0001",
        "name": "Linus",
        "img_src": "./toniebox_linus_ohneHintergrund.png"
        "crop": [
            0,
            0,
            1]
    }
]
  1. I hoped for an entry in the model selection dropdown when editing the box, but there wasn’t.

  2. I changed the entry overlay.XXXXXXXXXXXX.boxModel in the file “config.overlay.ini” to the chosed modelnumber in the first file “98-0001”

Now when I edit the box, the Modelnumber 98-0001 is shown in the dropdown, but is not in the list and my picture is not shown, but the picture like the “unselected” one.

What did I wrong?

Is there a Logfile which I can look into, for get an idea what’s going wrong?

Best regards
Nils

Hi, have you restarted teddycloud also? And is there a opening „[“

For logging use the docker logs

Hi,

thanks for your suggestions, but there is of course an opening “[” in the file, I just missed it when copieng. And I restarted the Teddycloud multiple time by hitting “Restart Server” at the “Settings”-Page.

I found the docker logs meanwhile, but I don’t find a way to look it in a nice and comftable way. I only find the “docker logs toniecloud” command. Is the a way to copy it in a file?

Best regards
Nils

You missed the , before crop, didn’t saw that in the first look

You can always use a json validator to check your json.

Docker logs -f teddycloud > filename.log

Your tip using a json validator helped a lot. This way I found out, that a comma was missing after the pictures filename.

Now it worked a lot better, but I simply put the picture in the directory where the config is located. But it can’t be diplayed from there (to be honnest I’m not really thought this would work, but gave it a try).

The next question is now, where to store the photo. There is no other webserver in my LAN and would strongly prefer a way to store it inside the system. Is there a way?

(The logfile can be shown in portainer. There I can search inside the file and copy it to clipboard)

You can add a docker volume within teddycloud www folder

In the latest release I think it’s already added in the example docker compose ( at least in develop)

Then you can just use „/custom_img/box.png“

I used it this way:

/docker/teddycloud/custom_img:/teddycloud/data/www/custom_img

(as volume at docker-compose.yaml)

“pic”: “/custom_img/MyImage01.png”

(as URL at tonies.custom.json)

That sounds absolutely perfect… can you explain how to create such volume without reinstall? How to create it with portainer?

Just add it in your docker compose file and recreate the container. ( you will not loose anything )

More details will give ChatGPT :wink:

Intresting! I didn’t know that.

Many thanks for all your help.

Edit: Everything works fine now. I messed around with the tranparency, so I’d to do some work, but thats not a teddyCloud problem…