loftux / homebridge-teslafi Goto Github PK
View Code? Open in Web Editor NEWHomebridge Teslafi plugin
Homebridge Teslafi plugin
Homebridge TeslaFi returns the correct climate temperature from Tesla but does not appear to be sending the correct temperature to Tesla.
When controlling the temperature, as a test, I tried both Cool to 68F and Auto to 68F. Any adjustment in the thermostat from Homebridge sets the Tesla to the lowest climate setting (LO). This is the same for 68F as it is for 82F. The Tesla is set to LO. From what I can tell, the only part of the climate setting that works correctly is ON/OFF.
I went on TeslaFi directly to see if this is a TeslaFi issue or a homebridge plugin issue. I tested the "Start Conditioning" and "Stop Conditioning" button in the Live Controls and both only turned ON/OFF - it did not adjust the temperature, so it preserves the previous temperature set. This makes me think that the issue is occurring on the Homebridge plugin side - since TeslaFi live controls do not set the climate to LO.
The expected functionality of course is to be able to adjust the exact temperature of the climate and have it reflect properly on the Tesla. Thanks for your help!
For those that have multiple cars, can this support be added in the plugin?
This is what I am getting in my log. Also attempted uninstalling and installing again. I am running the latest version of Homebridge (1.3.4).
[4/3/2021, 7:34:10 PM] ====================
[4/3/2021, 7:34:10 PM] ERROR LOADING PLUGIN homebridge-teslafi:
[4/3/2021, 7:34:10 PM] /homebridge/node_modules/homebridge-teslafi/dist/platform/platformAccessoryOnline.js:53
if (s.subtype && s.subtype?.indexOf('locationsensor') > -1) {
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/homebridge/node_modules/homebridge-teslafi/src/platform/platform.ts:12:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
[4/3/2021, 7:34:10 PM] ====================
Config
Node.js Version | v14.17.0
NMP v6.14.7
homebridge
/var/lib/homebridge
/var/lib/homebridge/config.json
ERROR
(node:4149) UnhandledPromiseRejectionWarning: Error: Unable to launch browser, error message: Failed to launch the browser process!
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 1: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: cannot create ���@h��@8
@$@@@����l��l�����������0�0���� ��� ��� ��i��i�xX
��X
��X
0�\�#��� ��� ��� �@ �U
�U
�U
PR�td��� ��� ��� ��i@�iP�tdL۷L۷L۷�,�,Q�td���@@/lib64/ld-linux-x86-64.so.2GNU INFOCrashpad��Y
Ba p � ��������AIPWhnz���������������&.5=FU\d����#)/6;@EPYajs�����������&3>BKPXeu{���������������!'27?FMV[bgksz������������������
(/6;CMSZbju����������������
=DJQYahnv: Directory nonexistent
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 1: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: ELF: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 9: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: cannot open J: No such file
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 9: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �����������
� +: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 10: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: : not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 11: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: *: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 12: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: :: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 13: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: K: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 14: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: o: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 15: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 16: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 17: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 18: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 19: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 20: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: �: not found
/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: 5: /usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: Syntax error: end of file unexpected (expecting ")")
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at Cluster.<anonymous> (/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer-cluster/src/Cluster.ts:168:19)
at Generator.throw (<anonymous>)
at rejected (/usr/lib/node_modules/homebridge-teslafi/node_modules/puppeteer-cluster/dist/Cluster.js:6:65)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:4149) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
Set lower refresh rate limit to 20s as per Teslafi API documentation ( 3 times per minute)
This renders the picture starting from an SVG and doesn't require Puppeteer, it can run both on the browser or on Node.
https://codesandbox.io/s/fervent-monad-rjwv7
(It requires the SF Pro font installed on the system to render properly)
Example output:
Hi,
I've started using this great plugin and I've got some questions. Github issues might not be the best place for this.
Would you mind using a channel in the Homebridge discord https://discord.com/invite/kqNCe2D?
Hi, I would test the dashboard but the homebridge loops continusly with this error:
[11/25/2021, 3:18:55 PM] Error: ENOENT: no such file or directory, open '/homebridge/Ale.Tesla_dashboard.png'
-- ASYNC --
at Page. (/usr/local/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/lib/helper.js:82:19)
at ElementHandle.screenshot (/usr/local/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/lib/JSHandle.js:337:44)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at makeScreenshot (/usr/local/lib/node_modules/homebridge-teslafi/node_modules/node-html-to-image/src/screenshot.js:33:20)
at /usr/local/lib/node_modules/homebridge-teslafi/node_modules/node-html-to-image/src/index.js:28:20
-- ASYNC --
at ElementHandle. (/usr/local/lib/node_modules/homebridge-teslafi/node_modules/puppeteer/lib/helper.js:82:19)
at makeScreenshot (/usr/local/lib/node_modules/homebridge-teslafi/node_modules/node-html-to-image/src/screenshot.js:33:34)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at /usr/local/lib/node_modules/homebridge-teslafi/node_modules/node-html-to-image/src/index.js:28:20
The /homebrdige directory permission are correct... Where is the issue?
Thanks a lot
I’ve started trying this out.
The occupancy sensor for locations triggers randomly. Need some sort of heuristic or threshold time. For example don’t change to unoccupied unless away for 120 seconds (configureable). However change to present immediately when detected.
It takes a long time to detect presence when arriving home.
Separating out the location and software update sensor.
How about showing the battery level as a light level
?
Hi... thanks so much for putting this together... Works great for basic functions!
I have my car set to not auto lock when home, but it still sleeps. So when it wakes up due to app use, charging, or other API commands (I also have some set up through webCoRE), I receive the "Doors Unlocked" notification. I also received "Doors Locked" when it goes back to sleep, which technically isn't correct because the doors remain unlocked. I could turn off the door locked notifications, but I do want to receive them in other situations. Is there any way you can configure the notifications not to trigger in conjunction with sleep/wake function or maybe not at the location that I've set for the occupancy sensor?
Thanks again!
Your readme seems to state that there are two different occupancy states - one for the software installation status and one for the actual vehicle location. In HomeKit, I am getting one occupancy sensor that is titled Tesla 2021.x.xx.xx Installed. I deduce that this is the software one.
But I do not have another occupancy sensor even though I have my Teslafi tagged home location specified in the Homebridge settings. I have checked the following:
"location":"Country House"
"taggedLocations": ["Country House"],
Upon Homebridge restart, in the logs I'm getting [7/27/2021, 8:05:14 AM] [Tesla] Removing location Sensor Tesla Country House
and that's the only reference to the location that every shows (no restoring or load).
Any thoughts on what might be going on here?
Thanks again!
Switch to used Header based token authentication.
Upgrade dependencies.
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.