(Last Updated: May 13, 2020)

Changing device type for wall controller



  • I have an old Z-wave.me wall controller that I still use for turning the espresso machine on and off. The controller controls an Aeotec Micro Switch that for the moment is still on my Vera.

    The wall controller has always been a bit tricky to work with on Vera. On my old UI5 VeraLite I managed to get it associated to the switch.
    On the UI7 Vera I never got that to work, instead I could use it as a trigger in Reactor to detect when sl_SceneActivated was 1 or 0.

    I have moved the wall controller to Z-way and there it is included as it should.
    a30b06dd-1f3c-4ca6-9966-b0a6f183de04-image.png Compared to when it was connected to the Vera it has proper on/off buttons so that it can be controlled from the Z-way GUI.

    The command classes are the following:
    68a54e6b-b240-40b2-95bb-9696bf7789cf-image.png In OpenLuup it still shows up as it did in the Vera, i.e. only showing battery.
    985acfb7-6af9-4cf0-a426-79d4358baf6e-image.png Is it possible to change device type so that it get the right properties in OpenLuup?

    At the moment it does not have any useful properties except for battery level. It e.g. lacks the sl_SceneActivated variable.

    Another step would then be to move the Aeotec switch to Z-way and to then associate the wall controller to the switch in Z-way. It seems as if this can be done in the ExpertUI.

    //ArcherS



  • Can I see a list of the attributes and variables from the openLuup console for that device?



  • Hi AK,

    Attributes:

    c7f1da1b-f2da-46d5-a4d1-db9ff7f859f7-image.png Variables:

    c9edab80-ef83-4ab6-b0a1-53cc2af0bf96-image.png

    //ArcherS



  • Interesting... using command class 1... I think this is fixable.



  • Yes. @ArcherS, can you confirm that the variable zway_Remote_10-0-1-B_LastUpdate changes when you activate the remote control?



  • Hi,
    Yes the variable "zway_Remote_16-0-1-B_LastUpdate" changes when activating the wall controller.
    In HomeWave using a 3-value control you can also see that it represents date and time for each change correctly.

    Also "zway_Remote_16-0-1-B" changes, it toggles between "on" and "off".

    //ArcherS



  • I had a very long PM conversation with @DesT in the other place discussing how to use controllers like this on ZWay/openLuup.

    Aside from a string to specify what scene to run, what doesn’t it do for you (OK, no switch.)

    A way to use this as it stands is to create an AltUI scene with a device variable watch on either the date or the state variable. But with a bit of code change in the plugin we might be able to do better. The problem is not to compromise other devices which also present in this manner. Given that you’d be writing a scene, there’s no need for the device itself to actually have a switch (because you could run the scene directly.)



  • @akbooer Yes a scene or a Reactor could of course work. This is what I did on the Vera in a Reactor and it worked quite ok. I will give it a go again in OpenLuup. The on/off switches on the controller in the GUI do not really matter that much I think.

    Regards
    //ArcherS



  • Also, a virtual switch wiil work. I have one using http call that I used myself to call two scenes via http. It's on my signature.



  • @therealdb Thank's, I will have a look at that.
    //ArcherS



  • Hmm, when looking at this again after another day of working from home as most of us these days, something strange seems to be going on.

    I created a Reactor to test the two variables and to get them to update as they should I have to restart the Reactor. I tried them both as conditions and as expressions, e.g:

    getstate( 30160, "urn:akbooer-com:serviceId:ZWay1", "zway_Remote_16-0-1-B" )
    

    If I do not restart the Reactor the variables stay not updated. Just to double check I changed the condition in the Reactor to "on/off" for a wall plug that is included in z-way and then it works the way it should.

    The same when looking at the variables via the Variables tab for the wall controller they only update after a ctrl-F5 refresh.

    I tried to create a scene with one of the variables as "watch" with "(old==off)and(new==on)" as expression, but I could not get it to work. Unsure if the expression is correct to be honest.

    So I guess I have to alter my answer to the question if the variables updates, sorry for the confusion. Any ideas on what could be the problem?

    //ArcherS



  • Ah yes, I think know what that is. Those variables are actually set 'silently' so don't (shouldn't) appear in the log. They are, in fact, only there to help with testing the plugin. Actual, Vera-like device variables should, if the device is correctly configured, appear with proper serviceIds and names, from which you can trigger.

    We have two options:

    1. I can try and tweak the device configuration code
    2. I can make those variables trigger.

    I'll take a look.

    I assume that all you need is a variable from which to trigger, but do you have a list of the variables that such a device on Vera creates? By way of comparison, one of my 4-button Aeotec miniMotes shows this:

    Screenshot_2020-05-12 openLuup.png



  • @akbooer sorry, no I do not have a complete list of the variables created in Vera. I forgot to check that before excluding.

    By the looks of the controller I am quite sure it is the one in this old Vesternet guide APNT-44

    In fact if I remember it correctly that guide is what I used on my VeraLite on UI5 many years ago.

    On the UI7 Vera I however used "sl_SceneActivated".
    I also think that "LastSceneTime" was present on it. (These represent the "zway_Remote_16-0-1-B" and "zway_Remote_16-0-1-B_LastUpdate" at present I assume.)

    You are correct that all I would need are those two variables as triggers, because then I can use the on/off as one trigger and the time as a trigger as well. I think I may need the time to capture e.g. if you press the "off" button and the controller already was "off". I tested this and the time is updated.

    Thank you very much for your time and effort.😃

    //ArcherS



  • @ArcherS said in Changing device type for wall controller:

    By the looks of the controller I am quite sure it is the one in this old Vesternet guide APNT-44

    Oh! I’ve got one of those!!



  • Ah, what a coincidence! It has been a bit finicky to work with over the years with Vera, but I managed to include it into Z-way successfully without any problems.



  • @ArcherS said in Changing device type for wall controller:

    It has been a bit finicky to work with over the years with Vera

    It was the very first device I paired with Vera, and, indeed, the reason I got Vera (although I subsequently set a direct association to another switch...!). It was a nightmare to get going, but has served me well for around 7 years. Probably still one of the most-used switches I have.

    The batteries are weird. I have to chop up a small 9V cell to give me six of them.

    Happy days.



  • Yes unusual batteries, AAAA type. They are a bit rare, you can buy them in some places here in Sweden. Creative to chop up 9V cells, I will try that next time they run out. 😃

    It was significantly easier to include into Z-way than into Vera anyway... To be honest most devices so far seem to be.



  • You should find that the latest ZWay plugin development branch v20.5.12 fixes this by giving you a scene controller just like you had in Vera.

    I haven't been able to test it independently (my device of that sort is currently firmly attached to my Vera ZWave network) but it shares code with other scene controllers, so should (might?) be OK.

    You will need to delete that specific ZWay plugin child device so that it is recreated and configured correctly after an openLuup restart. As usual, this should take almost no time at all.

    AFAIK, it should raise no problems with existing device configurations.



  • Now it works!
    I created a Reactor that uses the two variables "zway_Remote_16-0-1-B" (for on/off) and "zway_Remote_16-0-1-B_LastUpdate" (for the time the wall controller is pressed).

    The Reactor has two conditions for triggering "on" and two for triggering "off". This is to handle the case that the wall controller e.g. could be in "off" when I want to turn the Aeotech Switch off (e.g. when I have turned it on from HomeWave directly).
    To make this work I created two expressions "TimeAtOn" and "TimeAtOff" in which I store the time when the controller state changes from on->off and vice versa.

    5c4c201e-614e-4699-8f02-17df2892228f-image.png

    Just as a note, I also checked the variable "LastSceneTime" and it also gets updated with the time stamp. The variable "sl_SceneActivated" however always remains "null" for some reason. I do not know if this is intentional or not.

    95a5f09b-4483-4c9f-a1b7-a98b83b46c99-image.png

    Thank you very much for your time and patience! 😃

    //ArcherS



  • Glad it works!

    I have definitely only done a partial job here. My goal would have been for you not to have to use either of the zway_Remote... variables. The sl_SceneActivated variable is blank because the switch doesn’t present a scale variable. I could set a default of 0 or 1 for example.

    I’m not a Reactor user myself, so that all looks beyonds me. In fact, my normal modus operandi is simply to use scene controller buttons as toggle switches, so on/off state is not an issue.


Log in to reply