hak / homebridge-tuya-cloud Goto Github PK
View Code? Open in Web Editor NEWTuya cloud API integration to homebridge
License: Apache License 2.0
Tuya cloud API integration to homebridge
License: Apache License 2.0
Hi! I was planning to expand the job you've done since I'm using some devices that will only work via Tuya Cloud API. I'm currently using a mini Nodejs server to poll them and rewrite easier API for HB Http plugin. It's the first time I'm dealing with developing a new plugin so I apologies!
I'm planning to expand it to switches and RBG Lights. Happy to contribute if I make it after this issue :)
Describe Your Problem:
during installation, npm run build fails.
Logs:
> [email protected] build /Users/tommasotani/Downloads/homebridge-tuya-cloud-master
> rimraf ./dist && tsc
src/platform.ts:53:76 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
53 let sign = this.calc_sign(this.config.clientID + this.accessToken + t, this.config.secret);
~~~~~~~~~~~~~~~~~~
src/platform.ts:65:12 - error TS2769: No overload matches this call.
Overload 1 of 2, '(config: AxiosRequestConfig): AxiosPromise<any>', gave the following error.
Type 'unknown' is not assignable to type 'string | undefined'.
Type 'unknown' is not assignable to type 'string'.
Overload 2 of 2, '(url: string, config?: AxiosRequestConfig | undefined): AxiosPromise<any>', gave the following error.
Argument of type '{ headers: { client_id: unknown; sign: string; t: string; sign_method: string; }; url: string; baseURL: unknown; params: any; data: string; method: string; }' is not assignable to parameter of type 'string'.
65 return axios({
~~~~~~~
66 headers: headers,
~~~~~~~~~~~~~~~~~~~~~~~
...
71 method: "GET"
~~~~~~~~~~~~~~~~~~~
72 });
~~~~~~
node_modules/axios/index.d.ts:47:3
47 baseURL?: string;
~~~~~~~
The expected type comes from property 'baseURL' which is declared here on type 'AxiosRequestConfig'
src/platform.ts:131:26 - error TS2571: Object is of type 'unknown'.
131 for (const device of this.config.deviceList) {
~~~~~~~~~~~~~~~~~~~~~~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.