freahs / node-red-contrib-node-tradfri

Node-RED node to utilize IKEA Trådfri devices. Fully implemented in Node.js.
GNU General Public License v3.0
7 stars 13 forks source link

Group Support #3

Open thunder-62 opened 6 years ago

thunder-62 commented 6 years ago

Great to get observe functionality with this interface. Thanks a Lot!

Do you plan to add support for groups as well?

freahs commented 6 years ago

Thanks, and you're welcome 😃

Group support is in the pipeline! I'm currently to busy with studies to have time for private projects, but in the middle of March it'll get less hectic and I plan on releasing a new version then. Group support might not make it in the next release, but there will be support for custom groups (i.e. nodes will be configurable to act on any number of trådfri devices, not just one).

flavorplus commented 6 years ago

Hi @thunder-62 I've added group support for this library as well as support for scene's. Pull request is here: #8

thunder-62 commented 6 years ago

Hi @flavorplus how do I switch over to your implementation? npm is still referring to this one...

flavorplus commented 6 years ago

Hi @thunder-62 My pull request is still pending and I don't own the NPM repo so I can not update. What I've done for the time being:

Now restart node-red and the module should be installed. I've been running it with 17 device at my home for the last 4 days.

realjax commented 6 years ago

Thanks @flavorplus . I will install & continue using your version as well.

realjax commented 6 years ago

I installed directy from your repo:

cd ~/.node-red depends where your node-red install directory is. npm install git+https://github.com/flavorplus/node-red-contrib-node-tradfri.git

realjax commented 6 years ago

Unfortunatly your branch is not working for me. Cant get a connection to the hub. Also, how does one create a group?

flavorplus commented 6 years ago

Hi @realjax!! What is the error you get when trying to connect to the hub? You should first place the node, create a new connection using the security code on the gateway. You then click deploy and it should populate the identity and pre-shared key fields using the generated credentials. Also afterwards the group list should be populated with all the groups you defined using the Ikea app on your phone. At the moment, group creation is not supported using Node-Red. Also the scene's list should be updated with all the scenes that belong to that group.

realjax commented 6 years ago

Hi

Thanks for your reply. I tried what you suggested. Several times actually 😊 but, well.. nothing happens really. No errors, no popups, nothing logged.. Just no groups and no devices.

On June 14, 2018 8:20:25 AM GMT+02:00, flavorplus notifications@github.com wrote:

Hi @realjax!! What is the error you get when trying to connect to the hub? You should first place the node, create a new connection using the security code on the gateway. You then click deploy and it should populate the identity and pre-shared key fields using the generated credentials. Also afterwards the group list should be populated with all the groups you defined using the Ikea app on your phone. At the moment, group creation is not supported using Node-Red. Also the scene's list should be updated with all the scenes that belong to that group.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/freahs/node-red-contrib-node-tradfri/issues/3#issuecomment-397184155

-- Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.

realjax commented 6 years ago

Maybe I should create some groups in the app first?

On June 14, 2018 8:20:25 AM GMT+02:00, flavorplus notifications@github.com wrote:

Hi @realjax!! What is the error you get when trying to connect to the hub? You should first place the node, create a new connection using the security code on the gateway. You then click deploy and it should populate the identity and pre-shared key fields using the generated credentials. Also afterwards the group list should be populated with all the groups you defined using the Ikea app on your phone. At the moment, group creation is not supported using Node-Red. Also the scene's list should be updated with all the scenes that belong to that group.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/freahs/node-red-contrib-node-tradfri/issues/3#issuecomment-397184155

-- Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.

flavorplus commented 6 years ago

I think the app automatically creates a group when you add devices but you can check if you go to settings and then mange devices. You should see the groups there. Also if you turn on debugging in node-red you should see loads of info on what is happening in the background.

jtonk commented 5 years ago

I have the same issue, copying identity from node-red-contrib-tradfri also didn't work

flavorplus commented 5 years ago

What version of node-red are you running on?

jtonk commented 5 years ago

What version of node-red are you running on?

I'm running node-red 19.5

flavorplus commented 5 years ago

My code could be updated a bit with some more error handling... Anyway for now you could try to put node-red logging in 'trace' level. That should generate a lot more output. Have a look here: https://nodered.org/docs/user-guide/logging

daviesrv commented 5 years ago

Just been to IKEA, and bought various odds and sods. This node-red-contrib-node-tradfri implementation seems to work pretty well, once you have it set up. I think there a few problems in the basic IKEA setup/reseting , but one can just just about muddle through it and get it working reliably. It's not quite a hands off node yet, and having to reset node-red after a gateway power down explained a few things. ( as per other comments.) Ikea are bring out lots of other devices, sockets/sensors/switches and power supplies (and apparently an automatic curtain puller!!) , which it would also be good to incorporate. Not knowing anything about the node software, but I presume needs more device codes, and functionality added. It would be good to know whether there is a plan to review and upgrade. I don't know how this normally operates, but if there is any assistance or help required..... count me in.
Well done boys, for getting it this far.....I don't know how you find all the info.....impressive.....

SgtZapper commented 5 years ago

You have by mistake put some hardcoded credentials in the .js file that prevents the id and psk from being generated.

node.credentials.identity = "tradfri_1526131982225";
node.credentials.psk = "GTcy1xDnUR4wkwAJ";