Skip to content

Commit

Permalink
Merge pull request #554 from agraf/ledvance
Browse files Browse the repository at this point in the history
Add Ledvance support
  • Loading branch information
Apollon77 authored Nov 23, 2023
2 parents c0bd701 + 6d2e310 commit ada8224
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ <h6 class="title translate">Cloud-App-Login</h6>
<select id="appType" class="value">
<option value="smart_life">SmartLife</option>
<option value="tuya_smart">Tuya Smart</option>
<option value="ledvance">Ledvance</option>
</select>
<label for="region" class="translate">Mobile app Account Type</label>
</div>
Expand Down
8 changes: 8 additions & 0 deletions lib/appcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ class AppCloud {
secret2: 'vay9g59g9g99qf3rtqptmc3emhkanwkx',
secret: 'aq7xvqcyqcnegvew793pqjmhv77rneqc',
};
} else if (appType === 'ledvance') {
this.apiKeys = {
ttid: 'sdk_tuya@fx3fvkvusmw45d7jn8xh',
key: 'fx3fvkvusmw45d7jn8xh',
secret: 'cgqx3ku34mh5qdesd7fcaru3gx7tyurr',
secret2: 'armptsqyfpxa4ftvtc739ardncett3uy',
certSign: 'A',
}
} else {
this.apiKeys = {
ttid: 'smart_life',
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,8 @@ async function connectMqtt() {
adapter.config.cloudUsername,
adapter.config.cloudPassword,
adapter.config.appPhoneCode || 49,
adapter.config.appType === 'tuya_smart' ? 'tuyaSmart' : 'smartLife',
adapter.config.appType === 'tuya_smart' ? 'tuyaSmart' :
(adapter.config.appType === 'ledvance' ? 'ledvance' : 'smartLife'),
{log: adapter.log.debug.bind(this)},
);

Expand Down

0 comments on commit ada8224

Please sign in to comment.