ZXT-120

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

User avatar
Ben0it
Posts: 17
Joined: Sunday 31 January 2016 21:22
Target OS: Linux
Domoticz version: 3.6745
Location: France
Contact:

Re: ZXT-120

Post by Ben0it »

I was wondering if the problem could come from a commandGet occuring too fast after the commandSet?

Out of curiosity, I'm doing a test with a dirty « sleep(2) » after a commandSet, will post the result here...

Edit: it didn't help, same bug as before.
-
Benoît.
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

It looks like a problem of protocol. Remotec says that the device answer with a signal of command received to controller before the device do its work. So the next command produce the error.
I've found a solution setting an sleep just after the commandSet message is remove from queue of commands. And it works because the sleep is in the message processor. (multi thread!).
I've added a new parameter to config zwcfg (I named toSleep), this parameter is the number of microseconds to sleep after send command. So for normal devices this value is 0, but for Remotec the value is about 2000 (usleep(us) use microseconds). Then we need define some new functions and add this paremater to zwcfg by hand, yes, i don't like this :( but now is the only way I've found.
If you have a bit of knaoledge about programing you can apply it modifying the following files
Driver.h about line 401

Code: Select all

       uint32 GetNodeMaxBaudRate( uint8 const _nodeId );         // this exist, is for reference
        uint16 GetNodetoSleep(uint8 const _nodeId);                                  //OJO: this is for new param toSleep, it's the sleep time
Dirver.cpp
About line 4545

Code: Select all

//-----------------------------------------------------------------------------
// <Driver::GetNodetoSleep>
// OJO  REad the value of parameter toSleep
//-----------------------------------------------------------------------------
uint16 Driver::GetNodetoSleep
(
        uint8 const _nodeId
)
{
    uint16 tsleep = 0;
    LockGuard LG(m_nodeMutex);
    if( Node* node = GetNode( _nodeId ) )
    {
        tsleep = node->GettoSleep();
    }

    return tsleep;
}
I

About line 1286, inside Driver::RemoveCurrentMsg

Code: Select all

    //OJO: number of node, then read the toSleep for this node.
    uint8 nodeId = GetNodeNumber( m_currentMsg );
    if( Node* node = GetNodeUnsafe( nodeId ) )
    {
       uint16 toSleep = node->GettoSleep();
       if (toSleep > 0)
        {
            usleep(toSleep);
        }

    }
Node.h, about line 322..343

Code: Select all

 bool IsNodeReset();                                             //it exists, for refrence
uint16 GettoSleep()const{ return m_toSleep; }      //OJO: get the value of toSleep.
....
 bool        m_addingNode;           //it exists, for refrence
 uint16      m_toSleep;               //OJO: microseconds for usleep in Drivers::RemoveCurrentMsg
Node.cpp, inside writeXML, about 1281

Code: Select all

    nodeElement->SetAttribute( "max_baud_rate", str );             //it exists, for refrence
    //OJO: property toSleep for include in usleep() . If it's 0 don't store.
    if (m_toSleep > 0){
        snprintf( str, 32, "%d", m_toSleep );
        nodeElement->SetAttribute( "toSleep", str );
    }

    snprintf( str, 32, "%d", m_version );                               //it exists, for refrence
inside ReadXML, about 1014

Code: Select all

    //OJO: give a value to m_toSleep
    m_toSleep = 0;
    if( TIXML_SUCCESS == _node->QueryIntAttribute( "toSleep", &intVal ) )
    {
        m_toSleep = (uint16)intVal;
    }
    m_version = 0;                                                                                     //it exists, for refrence
    if( TIXML_SUCCESS == _node->QueryIntAttribute( "version", &intVal ) )   //it exists, for refrence
I think it's all. The name of parameter is toSleep and must be written in zwcfg in the same area as max_baud_rate.
This works for Linux, I don't check in windows.
User avatar
Ben0it
Posts: 17
Joined: Sunday 31 January 2016 21:22
Target OS: Linux
Domoticz version: 3.6745
Location: France
Contact:

Re: ZXT-120

Post by Ben0it »

Hi Juankar,

First, thanks a lot for your patch. I have applied the modifications you documented to my OpenZWave directory, and it didn't work at the first attempt.

So I added debugging information (calls to Log::Write() ) to see if the call to usleep() was really performed, it was. Then I increased the sleep period from 2,000us to 20,000us and that did it! (OpenZWave debug log file location)

I have gathered the modifications into a single patch file it this can help: (I have just changed 'toSleep' by 'sleep_before_send' and named the methods & members accordingly to better match the variable&function naming in the code of OpenZWave):
remotec-zxt120.7z
(1.65 KiB) Downloaded 129 times
To apply the patch, uncompress (7-zip) the file, and from the open-zwave folder, type:

Code: Select all

git apply < path/to/file/remotec-zxt120.diff
Recompile OpenZWave + Domoticz, edit your Z-Wave config file Config/zwcfg_0x????????.xml in the Domoticz folder to add the field sleep_before_send on your ZXT-120 device, for example:

Code: Select all

<Node id="25" name="ClimEntree" location="" basic="4" generic="8" specific="6" type="General Thermostat V2" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" sleep_after_send="20000" secured="true" query_stage="Complete">
I think you should submit your patch to the OpenZWave team :)

Best Regards,
-
Benoît.
User avatar
Ben0it
Posts: 17
Joined: Sunday 31 January 2016 21:22
Target OS: Linux
Domoticz version: 3.6745
Location: France
Contact:

Re: ZXT-120

Post by Ben0it »

Hello,

By the way, should the checkbox "Enable polling" be checked on the ZWave node for ZXT-120?
domoticz-zxt-120ozw.jpg
domoticz-zxt-120ozw.jpg (162.36 KiB) Viewed 4355 times
I don't know if it has an impact on the stability of the node.

Best Regards,
-
Benoît.
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

Hi
I don't have enabled the polling for this device, although I think it doesn't send temperature readings if it's off, you need refresh node to get temperature. So if you use its temperature sensor for control AC you have to use the polling. But if you use another temperature sensor polling is not necessary.
Regards
whyrywhy
Posts: 1
Joined: Thursday 26 January 2017 0:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ZXT-120

Post by whyrywhy »

Hello,

Long time reader, first time questioner. :D

Maybe I'm missing something simple you fine people could assist with: I can add this device, and apparently even program the codes via Domoticz (I'm leveraging this for AV IR). I send set a location, enter 000, apply, it blinks, then accepts the code I give it.

The problem is - I have no idea what to do with it after. I can't seem to figure out how to send a location I've set. I only see a single utility entry, with none of these options (attached pictures).
Image
Image

This seems like a total issue between the seat and keyboard, but if somebody could point me in the right direction, I'd appreciate it.
bdormael
Posts: 82
Joined: Saturday 13 December 2014 21:20
Target OS: Linux
Domoticz version:
Contact:

Re: ZXT-120

Post by bdormael »

Any news on making this compatible with the gen5 stick ?
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

I sent a pull request to GirHub, and, after a pair of modifications, I'm waiting for aproval.
You can see it in https://github.com/OpenZWave/open-zwave/pull/1090
After commit of this request, I have a modification in OZW control panel related with this modification.
antares
Posts: 48
Joined: Saturday 24 September 2016 9:25
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: ZXT-120

Post by antares »

The device itself seems to work smoothly. I've switched over to openHAB with it to try and I can without any problems run my Mitsubishi Heavy AC with it.
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

Wonderfull! I like to know that this modification is useful for other users!!
I am waiting for GitHub commit my modification, so I'll can send a new pull request for panel OZW. But this process is a very slow one.
yaggii
Posts: 1
Joined: Wednesday 15 March 2017 12:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: ZXT-120

Post by yaggii »

Hi All,

I have the Synology DSM 6.1 version and installed the Domoticz 3.6953 that was here: http://www.jadahl.com/domoticz_beta_6.1 ... =cedarview

When I was using the DSM 6 with the stable version from Jadahl I could see my remotec device and all the configurations, but now I see the remotec, but keeps on not updating it's details. also is I go to the Control Panel and check information for the device I have Library, Protocol and Application version all Unknown.

Did anyone had the same situation? Is there anyone that could help me on this matter?

Thanks
dpons039
Posts: 7
Joined: Monday 10 August 2015 12:38
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: ZXT-120

Post by dpons039 »

Hey there,

I have the same issues with the ZXT-120 and since the Pull request seems to go nowhere. And I would love to have my AC working automatically this summer

Could some1 explain how can I apply the changes of the Pull request?
https://github.com/OpenZWave/open-zwave/pull/1090

Thank you very much :)
Synology NAS 415+ | Raspberry + Aeon Z-Stick Gen5
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

You have the answer 11 posts before this one.
You can also download the modified files from github and recompile your openzwave and domoticz
And you can ask for this modification be commited in github, so If there are many users with the same problem the request would be incorporated to openzwave.

Thanks
Ptje
Posts: 73
Joined: Sunday 06 March 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Schaijk
Contact:

Re: ZXT-120

Post by Ptje »

Hello,

I have the same problem I think. It seems to that the remotec is online in domoticz, but when most of the time I send a command, the domoticz logs tells the remotec is offline (timeout)

Where do I find the open z-wave folder to execute the patch from ?

Greetings,
Peter
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: ZXT-120

Post by juankar »

I sent the patch to GitHub long time ago (last modification about February). You can see the post here: https://github.com/OpenZWave/open-zwave/pull/1090
I don't know why this modification is waiting so long. Perhaps if more users claim for it, the assigned editor (Fishwaldo) publish it in OZW library.
So you need to modify several files and main config file in your net. It's easy and it works fine.

Bye.
Ptje
Posts: 73
Joined: Sunday 06 March 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Schaijk
Contact:

Re: ZXT-120

Post by Ptje »

Best Juankar,

I did leave a message in de github toppic. I did buy the remotec to get my airco working, but I don't have anything on the remotec this way. I did get a new one, because they thought it was maybe defective. That is not true, the new one has the same problem.

I would do it by my self, but I don't know, where I can find the files to modify. Installing the patch is not necessary then ? I did not know where I could find the open z-wave folder to execute the patch from.

Greetings,
Peter
Ptje
Posts: 73
Joined: Sunday 06 March 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Schaijk
Contact:

Re: ZXT-120

Post by Ptje »

Hello,

What I think it's strange, the state of the remotec is never "sleep" when you look at the z-wave devices in domoticz. Even not when I use battery in stat of Usb. When I look at my thermostaat of danfoss, they are even on batteries. They are most of the time in sleep. Domoticz send then a command, when that devices send an update and are not in sleep.

Because domoticz thinks that the remotec is not in sleep, it sends commands and gets time out I think.

Greetings,
Peter
Ptje
Posts: 73
Joined: Sunday 06 March 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Schaijk
Contact:

Re: ZXT-120

Post by Ptje »

Hello,

Where is the folder to execute patch from ? I did what I thought was wright, but thats not good. See te screen shots. Who can help ?

Greetings,
Peter
Attachments
Schermafbeelding 2017-08-03 om 17.55.10.png
Schermafbeelding 2017-08-03 om 17.55.10.png (149.44 KiB) Viewed 3562 times
Schermafbeelding 2017-08-03 om 17.56.49.png
Schermafbeelding 2017-08-03 om 17.56.49.png (148.67 KiB) Viewed 3562 times
miniomar
Posts: 4
Joined: Thursday 06 July 2017 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ZXT-120

Post by miniomar »

Hello to everybody,

It is my first post in this forum.

I have an AEOTEC USB z-stick gen5 with 4 flush 1D relays with domoticz on raspberry pi-3.
I bought a remotec zxt-120, but I can't include it.
To include it I use this procedure, let me know if it is correct:
I disconnect the z-stick from the raspberry, the I push the button and the led starts to blink slowly (only blue color).
Then I push the PROG button on the remotec zxt-120 and I see the red led to blink one time, but the z-stick led doesn't blink quickly as expected when it includes a new devices.
If I insert it in the raspberry and I do again the configuration of the z-stick I don't see any new device.
Le me know if it is right.
Any suggestion ?
Thanks a lot
Marco
miniomar
Posts: 4
Joined: Thursday 06 July 2017 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ZXT-120

Post by miniomar »

juankar wrote: Wednesday 02 August 2017 16:18 I sent the patch to GitHub long time ago (last modification about February). You can see the post here: https://github.com/OpenZWave/open-zwave/pull/1090
I don't know why this modification is waiting so long. Perhaps if more users claim for it, the assigned editor (Fishwaldo) publish it in OZW library.
So you need to modify several files and main config file in your net. It's easy and it works fine.

Bye.
Hi Juankar

I have some update about my test with remotec zxt-120.
As I Wrote in a previous post this is my configuration:
Raspberry pi 3 with raspbian, AEOTEC z-stick gen5, domoticz and remotec zxt-120 (v1.8).
After a factory reset on remotec zxt-120 I was able to include it in the z wave net.
But now I was not able to change the IR code (parameter 27), always settled to 0.
My question are:
1) is it this issue linked to the pull up request opened in OZW (1090) ?
2) is it possible to fix it by compiling it as described above ?
3) do you have a step by step tutorial to compile it ?

Thanks for your feedback
Marco
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest