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

Scenes not working #32

Open
olofsson opened this issue Aug 8, 2021 · 2 comments
Open

Scenes not working #32

olofsson opened this issue Aug 8, 2021 · 2 comments

Comments

@olofsson
Copy link

olofsson commented Aug 8, 2021

I have tried to use scenes in 5.1.0 with node 16
There is no function setScene. the folowing code: tradfri.setScene('Alla av').then((id) => {console.log(id)}).catch((error) => {console.log("Error: ", error)});
generate this error: TypeError: tradfri.setScene is not a function

tradfri.scenes is an empty array even if there is 4 defined scenes according to ikea home smart app.

trying to set a scene with tradfri.scene = "Alla av" results in the following error:
Error: Can't find scene Alla av
at Group.setScene (/home/olofsson/Sync/src/tellstick_node-new/node_modules/ikea-tradfri/lib/Group.js:192:17)
at Tradfri.set (/home/olofsson/Sync/src/tellstick_node-new/node_modules/ikea-tradfri/lib/Tradfri.js:206:55)
at /home/olofsson/Sync/src/tellstick_node-new/testIkea.js:49:23

@olofsson
Copy link
Author

Half the problem is solved. It was my misstake. I used the swedish 'Alla av' for the scene were all ligths was switched off. But the internal name was ALLOFF. The rest of thw defined scenes kept there swedish name.
But still there is no function setScene on the toplevel.

@olofsson
Copy link
Author

If I use this code the function setScene is available.
var superGroup = tradfri.group('SuperGroup');
superGroup.setScene('ALLOFF').then((id) => {console.log(id)}).catch((error) => {console.log("Error: ", error)});

The scene is set and id is the id off the scene.

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

No branches or pull requests

1 participant