cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8069
Views
49
Helpful
20
Replies

change wallpaper via API for all device

orcunulutas
Level 1
Level 1

Hello,

we have more then 300 devices and i need to change wallpaper on all device.

i know following command ;

xConfiguration Video Wallpaper: custom

however, i need upload wallpaper to all device. i guess very long time upload file via web interface.

i tried root login enable however, i give following error message ;

Root access no longer available on TC release builds. Please use the remotesupport account for uses which previously required root access.

so, how can i push wallpaper to all device via API or anything ? 

seems not login to device via scp and sftp because root login disabled with new versions of TC firmware.

20 Replies 20

Magnus Ohm
Cisco Employee
Cisco Employee

Here is a simple python script for uploading wallpapers to multiple codecs. Its not exactly async as it would indicate, but it works.

 

import asyncio
import aiohttp
import aiofiles

async def send(session, img, url):
    data = aiohttp.FormData()
    async with aiofiles.open(img, mode='rb') as f:
        data.add_field('file', f, filename=img, content_type='image/png')
        async with session.post(url, data=data) as response:
            print(response.status)

async def main(devices):
    for k,v in devices.items():
        (user,password) = v.split(':')
        url = 'https://{}/api/wallpapers'.format(k)
        auth = aiohttp.BasicAuth(login=user, password=password)
        async with aiohttp.ClientSession(auth=auth, connector=aiohttp.TCPConnector(ssl=False)) as session:
            await send(session, 'wallpaper_test.png', url)

devices = {'10.10.10.1':'admin:',
           '10.10.10.2':'admin:'}

asyncio.run(main(devices))

/Magnus

Thank you Magnus

Hi Magnus,

 I notice that there is also a URL to POST a backup 

https://codecipaddress/api/backup

Could your python code be amended to post a backup file to a number of codecs? If so is the file format a zip? Many Thanks

Sergio Quezada
Level 1
Level 1

I have been using CE-Deploy. I have posted the link to the software below.

 

https://github.com/voipnorm/CE-Deploy/releases/tag/v7.3.2

Thanks for you reply squezada. CE-deploy is excellent. Bear in mind it only works on Windows 10/Mac , and you need an internet connection.  

Sergio Quezada
Level 1
Level 1

The tool I use now is CE-Deploy  works great.

https://github.com/voipnorm/CE-Deploy/releases/tag/v7.3.2

 

Regards,

Sergio Quezada

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: