frankh93 wrote: 29 Aug 2025, 04:31
@asoo sorry to mention you, but I have installed the Zepp Simulator with the Bip 6 fw (the model I own) but havent been able to load a watchface made on SashaCX75 tool... Could you explain how to load it into the emulator? Thank you beforehand
Since the structure of the index.js and app.json files, including app.js, differs from the files provided by the Sasha editor,
if you want to use the official Zepp simulator, you can do so in two ways:
1. Rewrite the entire script in the format specified by the simulator,
or
2. Copy some of the script in the index.js file provided by the Sasha editor into the index.js file of the simulator you created.
From "zeus," I won't go into further detail about using Zeus. If you can install the simulator, I think you should understand how to use Zeus.
Code: Select all
Base Options
-h, --help Display help information. [boolean]
-v, --version Display version number. [boolean]
For more information, see https://docs.zepp.com/
PS D:\zeus> zeus create EmtpyWatch
Updating devices, waiting...
? What type of application do you want to create? WATCHFACE
? Which OS version API to develop with? OS 1.0 API (Build products can run on devices with OS 1.0 and above)
? Which watchface template do you want to use? Empty
? Which platforms should this application be built on? Amazfit Bip 6
[ℹ] Fetching template...
[ℹ] Create application using the local template "Empty".
create \app.js
create \app.json
create \assets\390x450-amazfit-bip-6\icon.png
create \watchface\index.js
[✔] Project created successfully by "Empty" template.
Start installing dependency packages.
********* ******* ******* *******
//////**/ /**///// /**////** /**////**
**/ /** /** /** /** /**
**/ >***** /******* /*******
**/ /**/// /**//// /**////
**/ /** /** /**
******** /******* /** /**
//////// //////// // //
I'm all done. Now you can start your application.
When you create an empty watch face with Zeus,
you'll find that index.js, app.json, and app.js
have the following format:
index.js
Code: Select all
WatchFace({
onInit() {
console.log('index page.js on init invoke')
},
build() {
console.log('index page.js on build invoke')
},
onDestroy() {
console.log('index page.js on destroy invoke')
},
})
app.json
Code: Select all
{
"configVersion": "v2",
"app": {
"appId": 10013,
"appName": "Empty",
"appType": "watchface",
"version": {
"code": 1,
"name": "1.0"
},
"vender": "zepp",
"description": "Empty watchface",
"icon": "icon.png"
},
"permissions": [],
"runtime": {
"apiVersion": {
"compatible": "1.0.0",
"target": "1.0.1",
"minVersion": "1.0.0"
}
},
"targets": {
"390x450-amazfit-bip-6": {
"module": {
"watchface": {
"path": "watchface/index",
"main": 1,
"editable": 0,
"lockscreen": 1
}
},
"platforms": [
{
"name": "Pamir",
"deviceSource": 9765120
},
{
"name": "PamirW",
"deviceSource": 9765121
},
{
"name": "PamirW64",
"deviceSource": 10158337
}
],
"designWidth": 390
}
},
"i18n": {
"en-US": {
"appName": "Empty"
}
},
"defaultLanguage": "en-US",
"debug": false
}
app.js
Code: Select all
App({
globalData: {},
onCreate(options) {
console.log('app on create invoke')
},
onDestroy(options) {
console.log('app on destroy invoke')
}
})
Then, if you want to test the watch face created with the sahsa editor in the official simulator, copy some script from the watch face file created with the sasha editor and paste it into the index.js file you created with zeus, with the following requirements:
index.js ( zeus )
Code: Select all
// dynamic modify start (Only in the first part)
// Copy all the script ( editor ) between these two lines into this section.
// dynamic modify end (Only in the first part)
WatchFace({
////////////////////////////
init_view() {
// Copy all the script ( editor ) at init_view() { to },
},
//////////////////////////////
onInit() {
console.log('index page.js on init invoke')
},
build() {
console.log('index page.js on build invoke')
/////////////////////////////////////////////
//// do not forget add this function
this.init_view();
/////////////////////////////////////////
},
onDestroy() {
console.log('index page.js on destroy invoke')
},
})
There's another section that needs to be edited: in the app.json file.
You'll see that the folder used to store the images, the watch face ID, and the watch face name are specified in this file.
Therefore, if you're testing on a simulator, I recommend editing the watch face ID and name, and storing the images in the correct folder specified in app.json. Also, make sure the images are in standard PNG format, not encrypted. And file image size must be more 1x1 pix
Code: Select all
{
"configVersion": "v2",
"app": {
"appId": 10013, <--------- "ID" recommended that you change it so that it doesn't overwrite the old watch face, as this will be copied over in the simulator.
"appName": "Empty", <--------- "Name" recommended that you change it so that it doesn't overwrite the old watch face, as this will be copied over in the simulator.
"appType": "watchface",
"version": {
"code": 1,
"name": "1.0"
},
"vender": "zepp",
"description": "Empty watchface",
"icon": "icon.png" <--------- It is recommended to change it to match your preview file.
},
"permissions": [],
"runtime": {
"apiVersion": {
"compatible": "1.0.0",
"target": "1.0.1",
"minVersion": "1.0.0"
}
},
"targets": {
"390x450-amazfit-bip-6": { <----------------------- Folder that stores images
"module": {
"watchface": {
"path": "watchface/index",
"main": 1,
"editable": 0,
"lockscreen": 1
}
},
"platforms": [
{
"name": "Pamir",
"deviceSource": 9765120
},
{
"name": "PamirW",
"deviceSource": 9765121
},
{
"name": "PamirW64",
"deviceSource": 10158337
}
],
"designWidth": 390
}
},
"i18n": {
"en-US": {
"appName": "Empty" <--------- "Name" recommended that you change it so that it doesn't overwrite the old watch face, as this will be copied over in the simulator.
}
},
"defaultLanguage": "en-US",
"debug": false
}
Then, when you use the "zeus dev" command, the program will add your watch face to the simulator.
To launch the simulator, you must first download the device file you want to simulate and select the correct device before running the watch face.
I've tested all of these steps and it work.
However, there may be others who have a better way to enable it.
The method I'm describing here is based on the fact that you've correctly installed Zeus and the simulator and they're working.
For installation instructions, please see the previous post.
viewtopic.php?p=21049#p21049