Getting status updates from TKB Home TZ68G

Discussions about RaZberry - Z-Wave board for Raspberry computer
grelle
Posts: 7
Joined: 19 Aug 2014 15:09

Getting status updates from TKB Home TZ68G

Post by grelle »

Hi all!

I'm using Z-wave server 1.7.2 and have 5 pcs of the switch TKB Home TZ68G which you also can control manually with a button on the device. However, even though the store and the manufacturer tells me it will report its status back to the controller (and so does on their HC2, Vera, Vera lite etc), I can not get it to report back to my Razberry/Z-wave server. I´ve read about groups, associations etc. but have not been able to find out if it is possible to configure this right now on my setup.

The same issue goes for my Duwi ip44 switch...

What can be done ?
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Getting status updates from TKB Home TZ68G

Post by pofs »

Manuals from TKB Home website contain a lot of fancy pictures and nearly zero technical details.
According to the manual from http://manuals.zwaveeurope.com, TZ68G doesn't support associations. But it is dated back 2012, so they might update the firmware since then.

Duwi IP44 (according to the same website) is kinda a dinosaur. It doesn't support associations, and it is based on SDK 5.02, which is now totally outdated.

But again, the information might be outdated, as I can't find any recent manuals.

You can also watch a log file while switching device on and off. Probably it actually sends its status in some weird way, but z-way just can't understand it is a status update.
grelle
Posts: 7
Joined: 19 Aug 2014 15:09

Re: Getting status updates from TKB Home TZ68G

Post by grelle »

Ok, when I bought the T68ZG it specified associations. A couple of questions.

> How can I upgrade these units, if there exists an update of course...(I have tried to communicate with TKBHOME, not yet received a good answer to my questions)

> Where do I go in z-wave server to find the log ?

> Is this possible to solve on a Razberry according to you, the fact that people using HC2 etc. tell me that these units do send their status (at least confirmed that the TKBHOME switch does).
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Getting status updates from TKB Home TZ68G

Post by pofs »

grelle wrote:How can I upgrade these units, if there exists an update of course...(I have tried to communicate with TKBHOME, not yet received a good answer to my questions)
Dunno. Most likely, you cannot do it yourself, even if there was an update. Currently most of devices available on the market can be firmware updated only by sending them back to manufacturer.
grelle wrote:Where do I go in z-wave server to find the log ?
The log is in /var/log/z-way-server.log. You might use tail command to get updates in real-time:

Code: Select all

tail -f /var/log/z-way-server.log
Also I'd look into interview results dialog (in blue ui / expert mode). It tells the list of command classes actually announced by device. If you see Association there, then you're lucky.
grelle wrote:Is this possible to solve on a Razberry according to you, the fact that people using HC2 etc. tell me that these units do send their status (at least confirmed that the TKBHOME switch does).
If it really works on HC2, it is likely possible on RaZberry too. Let's just hope those people are not talking about Z-Wave.me Plug-In Switch (russian modification of TKB TZ68-G which looks exactly the same as original device, but has custom firmware inside), which really supports associations very well.
grelle
Posts: 7
Joined: 19 Aug 2014 15:09

Re: Getting status updates from TKB Home TZ68G

Post by grelle »

The log is in /var/log/z-way-server.log. You might use tail command to get updates in real-time:
This is what I get when I power the switch of manually:

Code: Select all

[2014-08-20 20:58:35.710] RECEIVED: ( 01 0E 00 49 84 0A 08 04 10 01 25 27 70 86 72 AD )
[2014-08-20 20:58:35.711] SENT ACK
[2014-08-20 20:58:35.712] Node info received: 10
[2014-08-20 20:58:35.714] SETDATA devices.10.data.basicType = 4 (0x00000004)
[2014-08-20 20:58:35.715] SETDATA devices.10.data.genericType = 16 (0x00000010)
[2014-08-20 20:58:35.716] SETDATA devices.10.data.specificType = 1 (0x00000001)
[2014-08-20 20:58:35.721] SETDATA devices.10.data.deviceTypeString = "Binary Power Switch"
[2014-08-20 20:58:35.723] SETDATA devices.10.data.nodeInfoFrame = byte[5]
  ( 25 27 70 86 72 )
[2014-08-20 20:58:35.724] SETDATA devices.10.data.lastReceived = 0 (0x00000000)
And this is when I switch it on manually:

Code: Select all

[2014-08-20 21:00:48.533] RECEIVED: ( 01 0E 00 49 84 0A 08 04 10 01 25 27 70 86 72 AD )
[2014-08-20 21:00:48.534] SENT ACK
[2014-08-20 21:00:48.536] Node info received: 10
[2014-08-20 21:00:48.537] SETDATA devices.10.data.basicType = 4 (0x00000004)
[2014-08-20 21:00:48.538] SETDATA devices.10.data.genericType = 16 (0x00000010)
[2014-08-20 21:00:48.540] SETDATA devices.10.data.specificType = 1 (0x00000001)
[2014-08-20 21:00:48.545] SETDATA devices.10.data.deviceTypeString = "Binary Power Switch"
[2014-08-20 21:00:48.546] SETDATA devices.10.data.nodeInfoFrame = byte[5]
  ( 25 27 70 86 72 )
[2014-08-20 21:00:48.547] SETDATA devices.10.data.lastReceived = 0 (0x00000000)
Here is a screenshot of "show interview results":
Skärmavbild 2014-08-20 kl. 21.03.58.png
Skärmavbild 2014-08-20 kl. 21.03.58.png (26.86 KiB) Viewed 15442 times
And yes, even the manufacturer TKBHOME tells me via email that it indeed should report it's status and they tell me that is likely my controller that is not configured the right way.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Getting status updates from TKB Home TZ68G

Post by pofs »

Your device is sending NIF instead of a status report (BASIC_REPORT / SWITCH_BINARY_REPORT). It is not really speicification-compliant, but you can do a workaround at least:

Code: Select all

var dev = zway.devices[10];
dev.data.nodeInfoFrame.bind(function(type) {
    if (type == 0x41 /* Updated | PhantomUpdate */) {
        dev.SwitchBinary.Get();
    }
});
This will request device status each time it sends its NIF.
grelle
Posts: 7
Joined: 19 Aug 2014 15:09

Re: Getting status updates from TKB Home TZ68G

Post by grelle »

Alright, now we are getting somewhere :) Where Do I put the code ?

Can this NIF sending behavior be changed you think ?
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Getting status updates from TKB Home TZ68G

Post by pofs »

For testing, put it in the end of automation/main.js. Maybe you'll want to write a module for that later (because main.js will be overwritten in case you update z-way-server version), but that will do for now.
Don't forget to restart z-way-server after that.

I doubt that behavior can be changed. You better ask TKB :)
grelle
Posts: 7
Joined: 19 Aug 2014 15:09

Re: Getting status updates from TKB Home TZ68G

Post by grelle »

Nice work pofs! Your script works. Where Do you live so I can buy you a beer :)

But how in .. are HC2, Vera, Vera light and so on able to receive the status ? Are they programmed like your script ?
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Getting status updates from TKB Home TZ68G

Post by pofs »

Vera certainly contains a lot of hacks and workarounds for different devices. Probably the same for HC2.

On the other hand, we decided not to make hacks in Z-Way, encouraging users to use certified and up-to-date devices. But workarounds can still be made on JS level.
Post Reply