Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

tradfri blinds support #37

Open
treban opened this issue Aug 31, 2019 · 17 comments
Open

tradfri blinds support #37

treban opened this issue Aug 31, 2019 · 17 comments

Comments

@treban
Copy link
Owner

treban commented Aug 31, 2019

support for the new tradfri blinds

@tehmilcho
Copy link

tehmilcho commented Oct 27, 2019

Hey its magic the 100x190 Blinds are now online Avaible i ordert now 5 of them. There should be here on 08.11.2019 says Ikea.

If you need to Test or check something let me know. :)

@tehmilcho
Copy link

So now i got 4 blinds working... Oh boy is this still buggy... Anyway has i sad.. If you need something just ask =)

@treban
Copy link
Owner Author

treban commented Nov 14, 2019

Hey, I'm on vacation right now. Unfortunately, I will not be able to fix the support until next week.

@treban
Copy link
Owner Author

treban commented Dec 28, 2019

hey @tehmilcho,
I have released version 0.1.23
This is still tagged as beta.
can you use it to test if the blinds work?

inside pimatic folder:
npm install pimatic-tradfri@beta

@tehmilcho
Copy link

tehmilcho commented Dec 28, 2019

Hey,

im some how to stupid to do this :/ ...

  1. I go in "Pimatic-App" and run the command, then i get a Error of permissions so i run it with Sudo than my "Node_modules" wars killt from all modules.

--> Fixit it by restore my Backup

  1. i go in Pimatic-App\node_modules" now i get a Error too:

npm ERR! path /home/pi/pimatic-app/node_modules/.bin/pimatic.js
npm ERR! code EEXIST
npm ERR! Refusing to delete /home/pi/pimatic-app/node_modules/.bin/pimatic.js: is outside /home/pi/pimatic-app/node_modules/pimatic and not a link
npm ERR! File exists: /home/pi/pimatic-app/node_modules/.bin/pimatic.js
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-28T14_35_08_950Z-debug.log

what do i wrong?

@treban
Copy link
Owner Author

treban commented Dec 28, 2019

That's strange.
Maybe the additional options mentioned here?
https://pimatic.teamemo.com/Usage/Installing-Plugins

@tehmilcho
Copy link

tehmilcho commented Dec 28, 2019

mhh im confused ...

pi@leetwerkpanda:~$ sudo npm install --unsafe-perm pimatic-tradfri@beta
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN [email protected] requires a peer of pimatic@>=0.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

  • [email protected]
    added 1 package from 1 contributor, updated 1 package and audited 125 packages in 0.962s
    found 0 vulnerabilities

he has its updated but im Pimaitc under Plugins it says "1.22" and by the Devicesearch i cant find new Devices from tradfri (aspect from the devices i had fund before)

Update:
Sorry im Stupid again .. forgot to switch to "Pimatic-app" .. now i get this strange error with the "Pimatic.js" again:

pi@leetwerkpanda:~/pimatic-app$ sudo npm install --unsafe-perm pimatic-tradfri@beta
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/pimatic-app/package.json'
npm WARN [email protected] requires a peer of pimatic@>=0.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN pimatic-app No description
npm WARN pimatic-app No repository field.
npm WARN pimatic-app No README data
npm WARN pimatic-app No license field.

npm ERR! path /home/pi/pimatic-app/node_modules/.bin/pimatic.js
npm ERR! code EEXIST
npm ERR! Refusing to delete /home/pi/pimatic-app/node_modules/.bin/pimatic.js: is outside /home/pi/pimatic-app/node_modules/pimatic and not a link
npm ERR! File exists: /home/pi/pimatic-app/node_modules/.bin/pimatic.js
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-28T18_06_55_428Z-debug.log

I tried to remove this pimatic.js just for testing .. then i get the next Error

npm ERR! path /home/pi/pimatic-app/node_modules/sqlite3/node_modules/request/node_modules/.bin/uuid
npm ERR! code EEXIST
npm ERR! Refusing to delete /home/pi/pimatic-app/node_modules/sqlite3/node_modules/request/node_modules/.bin/uuid: is outside /home/pi/pimatic-app/node_modules/sqlite3/node_modules/request/node_modules/uuid and not a link
npm ERR! File exists: /home/pi/pimatic-app/node_modules/sqlite3/node_modules/request/node_modules/.bin/uuid
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-28T18_12_06_033Z-debug.log

@treban
Copy link
Owner Author

treban commented Dec 28, 2019

Please also add this option to the install command.
--production

sudo npm install --unsafe-perm --production pimatic-tradfri@beta

@tehmilcho
Copy link

Its the Same .... im testing in the moment with my old installation on my Raspberry PI ... because my current Pimatic installations runs (fine) on a Lattepanda Delta with Ubuntu 16.04 LTS

@tehmilcho
Copy link

tehmilcho commented Dec 28, 2019

It seems to work on my Raspberry .. but i also checked the filesystem and this "pimatic.js" is also on the Raspberry .. its mabye the Node-Version a Problem? On the Raspberry runs a 4.5 and on the Lattepanda a 10.16?

Update:

I tried to copy the new Tradfri folder from my Raspberry to the lattepanda ... Pimatic will start, under Plugins are the correct version but the Plugin will not loaded and the Pimatic-Mobilefrontend reports Errors and cant not process any rules anymore.

00:48:03.752 [pimatic-mobile-frontend] error: Client error: Unable to process binding "if: function(){return !$data.hidden }"
00:48:03.752 [pimatic-mobile-frontend] error:>Message: Cannot read property 'hidden' of null

@tehmilcho
Copy link

tehmilcho commented Dec 29, 2019

I fix it .. what a mess...

Solution:
With the new NPM and Node versions you get a lot of Warnings from a Pimatic installation because it uses a lot of unsave Products.

"npm notice created a lockfile as package-lock.json. You should commit this file.
....
added 35 packages from 32 contributors and audited 2246 packages in 51.959s
found 77 vulnerabilities (19 low, 39 moderate, 18 high, 1 critical)
run npm audit fix to fix them, or npm audit for details"

Because of this it will create a "package-lock.json" in your Pimatic-App folder.

  1. delete the "package-lock,json"
  2. delete the whole "pimatic-tradfri"-Folder (under node_modules)
  3. Run "npm install --unsafe-perm --production pimatic-tradfri@beta"

Back to Topic,
i can control a Blind over the Beta-Version but i think the GUI-Elements for it not so good.

But frist things frist ... all my Lights are now broken.

Affected are:

  • Single Light-Devices
  • Groups
  • Sences

image

** Update **
After some force-CacheClean Reloads of the Browser the GUI for the Lights looking fine and worked as expected.

GUI for Blinds:

  • Batterie Life in % should be Added to GUI and Device Attributes or Variables (It is there because the Iobroker plugin has it)
  • a Switch with Custom Label "Open / Close" (0% / 100%) should be Added (the same like the Lights but with other Text) - FYI: 0% is fully closed and 100% is fully open ... by the default ..( i hope you also find this strange xD )

Plugin Problems:

  • Presents is not working at moment by blinds, the blinds are perm as "False" listed
  • Groups with Blinds will not work because it seems that plugin things that these are Lights
  • Plugin found the Remotecontrol from the Blinds as "Pimatic-tradfri: RemoteControl: "DEVICENAME" - Tradfri open/close Remote" but will not work, i think the same like the Groups

@treban
Copy link
Owner Author

treban commented Jan 5, 2020

hey, thanks for the effort and feedback. i will check your comments. unfortunately the remotecontroles are not really usable through the tradfri gateway. you can't interact with them except to check the battery or online status.

@tehmilcho
Copy link

Hey, then maybe filter the Remotecontroles out by default?

bytheway that are the Values that the Iobroker Plugin gets from the Blinds.. maybe you can look in to there code to get all you need :)

image

https://github.com/AlCalzone/ioBroker.tradfri

@tehmilcho
Copy link

tehmilcho commented Jan 18, 2020

Hey,
I found a strange bug...added now 4 blinds, all have different tradfri ids but one of the devices controls the wrong one.

Livingroom 1 - works fine
Livingroom 2 - works fine

Sleepingroom 1 - works fine
Sleepingroom 2 - controls livingroom 1

Its wars a bug from the gateway it self... Sorry... Solution wars to remove and add the accu form Sleepingroom 2

@tehmilcho
Copy link

Hey Dude,

I hope you and your family are healthy and well, is there anything new about the blinds?

I have again and again the problem that I am surprised that a battery is empty and notice it only when I want to close the blinds again.

It would be really great if you could get the Pimatic to have the information about the battery level

@treban
Copy link
Owner Author

treban commented Jun 28, 2020

sorry for the late reply. i've been very busy the last months. i'll see if i can find time for the plugin the next days.

@djmvt
Copy link

djmvt commented Dec 8, 2020

It would be great to see blinds support in the tradfri plugin, is this still in development?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants