Hi!
I bought a Remotec ZXT-120 (Z-wave-to-AC IR Extender) and I am trying to get it to work with my Aeotec Z-Stick Gen5. Like others (Remotec ZXT-120 AC controller issues and Z-wave IR air con extender: hass.io or hassbian?), I’m experiencing problems with setting parameters, which often fail due to a timeout issue. It’s incredibly frustrating to try and work with a device that only occasionally responds to my commands.
Now as pointed out by others (here: Remotec ZXT-120 operational questions + my script - #13 by turbokongen), there is a fix made by jokatar that never got merged. A somewhat uglier version of this fix is ‘simply’ adding one usleep line into cpp/src/Driver.cpp in OpenZWave.
I’m trying to edit Driver.cpp and use it on my Hassbian installation. I found out that Hassbian relies on python_openzwave, so I figured I’d uninstall that, pull openzwave from github, edit the Driver.cpp file, make & install openzwave, and reinstall python_openzwave using the ‘shared’ flavour. I didn’t get errors, but the issues with the Remotec ZXT-120 haven’t disappeared.
So my main question is: how to patch my openzwave installation with Jokatar’s fix such that Hassbian changes its behaviour?
To get there it would already be a huge help if I could confirm that edits I do in the source code end up being applied. For this purpose I tried editing the Message transaction complete log entry
Before:
Log::Write( LogLevel_Detail, _data[3], " Message transaction complete" );
Now:
Log::Write( LogLevel_Detail, _data[3], " Message transaction complete I was here" );
And wrapping the usleep(5000) line in log entries
Log::Write( LogLevel_Detail, GetNodeNumber( m_currentMsg ), "Me: start sleeping" );
usleep(5000);
Log::Write( LogLevel_Detail, GetNodeNumber( m_currentMsg ), "Me: done sleeping" );
So far I’ve seen no evidence of these edits in the zwave log I can pull up in HASSbian , which makes me think that the openzwave that HASSbian relies upon is unaltered…
Who can help me?
Details of how I’ve been editing openZwave so far:
- Login via ssh as user pi
- Stop homeassistant
sudo systemctl stop [email protected]
- switch to home assistant user
sudo su -s /bin/bash homeassistant
- activate virtual environment
source /srv/homeassistant/bin/activate
- uninstall python_openzwave
pip3 uninstall -y python_openzwave
- switch to pi user
ctrl+d
- Clone github openzwave
git clone https://github.com/OpenZWave/open-zwave
- Edit Driver.cpp using nano
nano /home/pi/open-zwave/cpp/src/Driver.cpp
- Go to the resporitory folder
cd /home/pi/open-zwave
- compile and install openzwave from the source you’ve just edited
make && sudo make install && sudo ldconfig
- switch to home assistant user
sudo su -s /bin/bash homeassistant
- activate virtual environment
source /srv/homeassistant/bin/activate
- install with python_openzwave with shared flavour
pip3 install python_openzwave --install-option="--flavor=shared" --no-deps
- switch to pi user
ctrl+d
- start openzwave
sudo systemctl start [email protected]
Hassbian Zwave log results when I try to set a parameter:
2018-04-02 14:56:03.022 Info, Node014, Sending (Send) message (Callback ID=0x1f, Expected Reply=0x04) - ConfigurationCmd_Get (Node=14): 0x01, 0x0a, 0x00, 0x13, 0x0e, 0x03, 0x70, 0x05, 0x1b, 0x25, 0x1f, 0xbf
2018-04-02 14:56:03.031 Detail, Node014, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2018-04-02 14:56:03.031 Detail, Node014, ZW_SEND_DATA delivered to Z-Wave stack
2018-04-02 14:56:03.048 Detail, Node014, Received: 0x01, 0x07, 0x00, 0x13, 0x1f, 0x00, 0x00, 0x03, 0xf7
2018-04-02 14:56:03.048 Detail, Node014, ZW_SEND_DATA Request with callback ID 0x1f received (expected 0x1f)
2018-04-02 14:56:03.048 Info, Node014, Request RTT 25 Average Request RTT 412
2018-04-02 14:56:03.048 Detail, Expected callbackId was received
2018-04-02 14:56:09.180 Detail, Node014, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0e, 0x03, 0x80, 0x03, 0x55, 0x29
2018-04-02 14:56:09.181 Detail,
2018-04-02 14:56:09.181 Info, Node014, Response RTT 6158 Average Response RTT 6553
2018-04-02 14:56:09.181 Info, Node014, Received Battery report from node 14: level=85
2018-04-02 14:56:09.181 Detail, Node014, Refreshed Value: old value=85, new value=85, type=byte
2018-04-02 14:56:09.181 Detail, Node014, Changes to this value are not verified
2018-04-02 14:56:09.181 Detail, Node014, Notification: ValueChanged
2018-04-02 14:56:13.023 Error, Node014, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-04-02 14:56:13.023 Detail, Node014, Removing current message
2018-04-02 14:56:13.023 Detail, Node014, Notification: Notification - TimeOut