FHEM Forum

FHEM - Hausautomations-Systeme => ZWave => Thema gestartet von: cmillsy am 30 August 2016, 16:28:53

Titel: Transfer of Primary controller
Beitrag von: cmillsy am 30 August 2016, 16:28:53
Hi. I'm trying to transfer 'Primary' control to a new Aeotec Gen5 controller from my older Aeotec Z2 stick. I have the Z2 stick running on a raspberry pi with my main Fhem installation.  I set up a second raspberry pi running Fhem and plugged in the Gen5 controller. I included the Gen5 controller into the network and 'learned' the network onto the new stick all ok. Current set up shows Z2 stick as 'PRIMARY' and the gen5 controller as 'OTHER SUC' (i added SUC capability as the help indicated 'createnewprimary' needed to be invoked by a basic SUC).

I cannot seem to pass primary to the Gen5 controller. I've tried 'CreateNewPrimary' from the Gen5 controller and 'ControllerChange' from the Z2 stick but it doesn't seem to pass primary function to it. I've noticed in the help both these commands say 'Add a controller.....'. Do these commands do the inclusion & learn?   Any help would be appreciated
Titel: Antw:Transfer of Primary controller
Beitrag von: krikan am 30 August 2016, 21:26:22
Hello!
I have tried controllerChange today and for me it worked. Please try this:

Gen5-FHEM (factoryReset; become Primary):
set <ZWDongle> factoryReset yes
attr <ZWDongle> verbose 5
shutdown restart
open EventMonitor
set <ZWDongle> learnMode on

Z2-FHEM (is working PRIMARY; become SECONDARY):
attr <ZWDongle> verbose 5
open EventMonitor
set <ZWDongle> controllerChange on

Now please wait; it will take some time: FHEM do the inclusion and transfer controller data (nodes,..)

EventMonitor should show someting like this:

Gen5-FHEM:
Zitat2016-08-30 20:48:44.651 ZWDongle ZWDongle_1 ZW_SET_LEARN_MODE started
2016-08-30 20:48:53.312 ZWDongle ZWDongle_1 ZW_APPLICATION_UPDATE sucId 0
2016-08-30 20:48:53.419 ZWDongle ZWDongle_1 ZW_SET_LEARN_MODE done

Z2-FHEM:
Zitat2016-08-30 20:48:44.513 ZWDongle ZWDongle_0 ZW_CONTROLLER_CHANGE nodeFound
2016-08-30 20:48:44.924 ZWDongle ZWDongle_0 ZW_CONTROLLER_CHANGE controller
2016-08-30 20:48:53.131 ZWDongle ZWDongle_0 addNode off
2016-08-30 20:48:53.131 ZWDongle ZWDongle_0 ZW_CONTROLLER_CHANGE protocolDone
2016-08-30 20:48:53.443 ZWDongle ZWDongle_0 ZW_ADD_NODE_TO_NETWORK done

"done" meens: thats it and everything should be Ok.
Please "shutdown restart" FHEM and
attr <ZWDongle> verbose 3

If you're experiencing any problems show both logs, please.

Regards, Christian
Titel: Antw:Transfer of Primary controller
Beitrag von: cmillsy am 30 August 2016, 22:30:28
Hi Christian,

Thanks for the reply. I managed to solve it. I needed to put the Gen5 controller into learn mode again. (presume before or after 'ControllerChange' on the Z2 works)

Craig
Titel: Antw:Transfer of Primary controller
Beitrag von: cmillsy am 30 August 2016, 22:56:57
This has actually brought about another problem. The reason for adding the Gen5 controller was to completely replace my Z2 stick. So after the inclusion and transfer to primary the Gen5 controller is on node 22 my Z2 stick was node 1. If i then try to replace the Z2 stick with my Gen5 in my main Fhem box i don't get any responses from my devices. I presume they are reporting back to node 1 not 22.

Should i be doing something before the replace. Can the Gen5 stick be forced somehow to node 1 or can i tell all my deviced to replace node 1 with 22?
Titel: Antw:Transfer of Primary controller
Beitrag von: krikan am 30 August 2016, 23:47:51
Hi!

You must delete all associatons to the old controller nodeId (set <device> associationDel <groupId> 1) and associate all devices to the new controller nodeId 22 (set <device> associationAdd <goupId> 22).

Zitat
Can the Gen5 stick be forced somehow to node 1 ?
Sorry, there is no "offical" zwave-api-call, but a here working solution:
https://forum.fhem.de/index.php/topic,53023.msg472541.html#msg472541
I hope you can understand that.

Regards, Christian