
Qubino ZMNHBA2 2 relays doesn't report status?
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Use the PHP script and it'll work 

-
- Posts: 221
- Joined: Saturday 30 August 2014 20:20
- Target OS: Linux
- Domoticz version: 4.
- Location: Spain
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Are you sure?
How set Domoticz server to accept php execution? If you call a php page the server considers php as a text file and show its content.
Even if you use curl it doesn't update the device.
At least, that's my experience.
How set Domoticz server to accept php execution? If you call a php page the server considers php as a text file and show its content.
Even if you use curl it doesn't update the device.
At least, that's my experience.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
I run apache on the rpi and call the page by url.
Another option could be
/usr/bin/php /path/zwavexx.php
Another option could be
/usr/bin/php /path/zwavexx.php
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Dear experts,
I'm a newby to linux, so forgive me for asking stupid questions
I came down to the point that I need to use the refresh to get device statuses correct for my 2relay Qubino modules.
I do have some trouble how to use the offered script.
I've installed apache2 and php5 (apt-get update, install apache2, php5), but still not able to execute the script.
when I try to run it from CLI (./script.php) it echos:
./script.php: line1: ?php: No such file or directory
(and some more...but until first line isn't accepted); which seems to indicate php is not recognized...
how do I verify/use the php correctly?
thx for suggestions, rgds.
_________________________________________________________________________________________________________________
Domiticz 2.2563 on R-PI B+, RFXCOM-E, Aeon Z-stick; Qubino 2-relay, Qubino shutter, Qubino dimmer, Somfy, SolarEdge, X10
I'm a newby to linux, so forgive me for asking stupid questions

I came down to the point that I need to use the refresh to get device statuses correct for my 2relay Qubino modules.
I do have some trouble how to use the offered script.
I've installed apache2 and php5 (apt-get update, install apache2, php5), but still not able to execute the script.
when I try to run it from CLI (./script.php) it echos:
./script.php: line1: ?php: No such file or directory
(and some more...but until first line isn't accepted); which seems to indicate php is not recognized...
how do I verify/use the php correctly?
thx for suggestions, rgds.
_________________________________________________________________________________________________________________
Domiticz 2.2563 on R-PI B+, RFXCOM-E, Aeon Z-stick; Qubino 2-relay, Qubino shutter, Qubino dimmer, Somfy, SolarEdge, X10
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
-
- Posts: 1
- Joined: Monday 13 July 2015 10:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Im using the workaround with PHP - works great.
Here is what I did:
1. Install php
apt-get install php5-cli
2. Create script in domoticz scripts directory (/home/<username>/domoticz/scripts/)
Make sure script starts with: #!/usr/bin/php See below for script (thanks Egregius)
The number of the switch is visible on the device list in domoticz. Look at the ID column - use the first 5 digits and remove any leading 0's. Example: 0000601 -> 6
Also make sure that you are using the right port # on http://127.0.0.1:8080/ozwcp/refreshpost.html (default is 8080)
3. Make script executable
chmod +x <scriptname.php>
try to execute it with: ./<scriptname.php>
This should return <pre>OK</pre>
4. Add script to domoticz
Add this to the ON and OFF action on the switch (this will be ID01)
script:///home/<username>/domoticz/scripts/<script name>.php
<username> will be pi or the user that you installed domoticz for
Script:
#!/usr/bin/php
<?php
sleep(2);
$zwaveurl = 'http://127.0.0.1:8080/ozwcp/refreshpost.html';
$zwavedata = array('fun' => 'racp', 'node' => '<enter the number of the switch here>');
$zwaveoptions = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($zwavedata),
),
);
$zwavecontext = stream_context_create($zwaveoptions);
$zwaveresult = file_get_contents($zwaveurl, false, $zwavecontext);
echo '<pre>'.$zwaveresult.'</pre>';
?>
Here is what I did:
1. Install php
apt-get install php5-cli
2. Create script in domoticz scripts directory (/home/<username>/domoticz/scripts/)
Make sure script starts with: #!/usr/bin/php See below for script (thanks Egregius)
The number of the switch is visible on the device list in domoticz. Look at the ID column - use the first 5 digits and remove any leading 0's. Example: 0000601 -> 6
Also make sure that you are using the right port # on http://127.0.0.1:8080/ozwcp/refreshpost.html (default is 8080)
3. Make script executable
chmod +x <scriptname.php>
try to execute it with: ./<scriptname.php>
This should return <pre>OK</pre>
4. Add script to domoticz
Add this to the ON and OFF action on the switch (this will be ID01)
script:///home/<username>/domoticz/scripts/<script name>.php
<username> will be pi or the user that you installed domoticz for
Script:
#!/usr/bin/php
<?php
sleep(2);
$zwaveurl = 'http://127.0.0.1:8080/ozwcp/refreshpost.html';
$zwavedata = array('fun' => 'racp', 'node' => '<enter the number of the switch here>');
$zwaveoptions = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($zwavedata),
),
);
$zwavecontext = stream_context_create($zwaveoptions);
$zwaveresult = file_get_contents($zwaveurl, false, $zwavecontext);
echo '<pre>'.$zwaveresult.'</pre>';
?>
-
- Posts: 221
- Joined: Saturday 30 August 2014 20:20
- Target OS: Linux
- Domoticz version: 4.
- Location: Spain
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Ok, now it's working with my Philio doublé relay!!!
And I wonder if Domoticz or Zwave could do this operation automatically, with¡out any script or so.
Thanks
And I wonder if Domoticz or Zwave could do this operation automatically, with¡out any script or so.
Thanks
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Dear Kriss/All
your instruction #2: 'Make sure script starts with: #!/usr/bin/php'
made me advance a step, thx for that!
But now I get another error-indication; it now seems the php to be called succesfully, however, my new problem is with permission to run the script.
I've set the scripts to allow execution by anybody, but when I try to run a script(eg ./extract.php) I get :
-bash: ./extract.php: /usr/bin/php: bad interpreter: Permission denied
I've set permissions wide open, changed owner, etc :
-rwxrwxrwx 1 pi root 327 Jul 18 01:53 extract.php
(just a test script, not the one I'm looking to run eventually)
any idea/hint/suggestion what this particular error indicates, how should I progress/attack?
thx in advance
your instruction #2: 'Make sure script starts with: #!/usr/bin/php'
made me advance a step, thx for that!
But now I get another error-indication; it now seems the php to be called succesfully, however, my new problem is with permission to run the script.
I've set the scripts to allow execution by anybody, but when I try to run a script(eg ./extract.php) I get :
-bash: ./extract.php: /usr/bin/php: bad interpreter: Permission denied
I've set permissions wide open, changed owner, etc :
-rwxrwxrwx 1 pi root 327 Jul 18 01:53 extract.php
(just a test script, not the one I'm looking to run eventually)
any idea/hint/suggestion what this particular error indicates, how should I progress/attack?
thx in advance
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
-
- Posts: 221
- Joined: Saturday 30 August 2014 20:20
- Target OS: Linux
- Domoticz version: 4.
- Location: Spain
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Hello
Give the right permission to /usr/bin/php (the interpreter).
chmod 755 /usr/bin/php
Bye
Give the right permission to /usr/bin/php (the interpreter).
chmod 755 /usr/bin/php
Bye
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
pi@domoticzpi /usr/bin/php $ chmod 755 /usr/bin/php
pi@domoticzpi /usr/bin/php $ ls -l
total 12
-rwxrwxrwx 1 pi root 327 Jul 18 01:53 extract.php
-rwxrwxrwx 1 root root 415 Jul 14 00:47 Q2_14.php
-rwxrwxrwx 1 root root 400 Jul 9 00:12 Q2_xx.php
pi@domoticzpi /usr/bin/php $ ./extract.php
-bash: ./extract.php: /usr/bin/php: bad interpreter: Permission denied
pi@domoticzpi /usr/bin/php $
???
pi@domoticzpi /usr/bin/php $ ls -l
total 12
-rwxrwxrwx 1 pi root 327 Jul 18 01:53 extract.php
-rwxrwxrwx 1 root root 415 Jul 14 00:47 Q2_14.php
-rwxrwxrwx 1 root root 400 Jul 9 00:12 Q2_xx.php
pi@domoticzpi /usr/bin/php $ ./extract.php
-bash: ./extract.php: /usr/bin/php: bad interpreter: Permission denied
pi@domoticzpi /usr/bin/php $
???
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
1st line in my script needs to be:
#!/usr/bin/php5
now scripts execute.
Node state doesn't refresh yet...perhaps node identification not right.
the 3 available switches on the 2relay-qubino are in device list with following ID's:
0000E01, 0000E02, 0000E03
tried node 'E', 'E0', 'E01', '14' no result
what should it be?
thx so far for help
#!/usr/bin/php5
now scripts execute.
Node state doesn't refresh yet...perhaps node identification not right.
the 3 available switches on the 2relay-qubino are in device list with following ID's:
0000E01, 0000E02, 0000E03
tried node 'E', 'E0', 'E01', '14' no result
what should it be?
thx so far for help

Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
You need the ID of the node in the zwave hardware panel.
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Finally!!!
(the 14 should have worked...maybe was not patient enough when testing)
so for others: the decimal node ID on the ZWavew hardware panel, e.g.: 014 (0x0e)
It seems working now, I'm so relieved!
Now status is updated correctly (not instantly, but within acceptable time-frame; few secs on the website, so maybe even quicker in the actual DB)
I've purchased multiple 2-relay modules, which I could not commision until now;
Next thing for me on the Qubino's: KWh readings...anybody any meaningfull results?
Again, thx all for hints/tips, I wouldn't have gotten where I am now without you!
Have a good weekend
(the 14 should have worked...maybe was not patient enough when testing)
so for others: the decimal node ID on the ZWavew hardware panel, e.g.: 014 (0x0e)
It seems working now, I'm so relieved!
Now status is updated correctly (not instantly, but within acceptable time-frame; few secs on the website, so maybe even quicker in the actual DB)
I've purchased multiple 2-relay modules, which I could not commision until now;

Next thing for me on the Qubino's: KWh readings...anybody any meaningfull results?
Again, thx all for hints/tips, I wouldn't have gotten where I am now without you!
Have a good weekend
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
I've tried to 'fool-prove' this script, just by clicking around like a madman
When the script is attached to the general input only (i1), I found it still possible to get 'unsynched'.
I've not been able sofar to get unsynched when I insert script in on/off actions for both the switches separately (i2,i3) (and no script for i1)
....experience sofar.
regards

When the script is attached to the general input only (i1), I found it still possible to get 'unsynched'.
I've not been able sofar to get unsynched when I insert script in on/off actions for both the switches separately (i2,i3) (and no script for i1)
....experience sofar.
regards
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Never sayed it was fool-proof :p
But also noticed that it didn't always worked. I gues the timings got to do with it.
So I did a small change to update more quickly and do it twice:
But also noticed that it didn't always worked. I gues the timings got to do with it.
So I did a small change to update more quickly and do it twice:
Code: Select all
for ($k = 1 ; $k <= 2; $k++){
sleep(1);
$zwaveurl = 'http://ip:port/ozwcp/refreshpost.html';
$zwavedata = array('fun' => 'racp', 'node' => '23');
$zwaveoptions = array(
'http' => array(
'method' => 'POST',
'content' => http_build_query($zwavedata),
),
);
$zwavecontext = stream_context_create($zwaveoptions);
$zwaveresult = file_get_contents($zwaveurl, false, $zwavecontext);
echo '<pre>'.$zwaveresult.'</pre>';
sleep(1);
}
-
- Posts: 13
- Joined: Saturday 31 January 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
@Egregius:
do you run your script from the general(S1) switch only?
As mentioned before, I activate script on both S2,S3. I observe in the log that a command on either switch triggers the script, then probably the script re-confirmes the command on the other switch, which is seen as a devicechange, script is triggered again (I always get script 2 entries for a single comamnd in the log). In effect maybe same as you are doing...?
@Forum
some more observations:
I've connected temp-sensor to the units, temp updates only on events. (polling disabled until now, don't want to flood zwave until i see urgent reason to get frequent updates)
Still not getting proper usage readings as well...
One unit (with 1 user attached) the individual usage goes to 0W after 5min, the general keeps indicating the usage value 'correctly' (not yet validated actual W's)
The other one (which has 2 appliances connected) seems to work ok, as long as both appliances are on. when switching off 1, same : only the general usage stays indicating. These values get corrected (temporarely) when the refresh script triggers...
The accumulated energy...too early to tell. I'm runnig LED off these units until now, so it will take a while to get something that comes in the KWh range...
if the individual channels depend on their usage as is reported, they will only accumulate when both on...
any similar experiences(/solutions!) to get it right?
It seems OZW issues to me? (not taking energy into account, let's see what comes from that)
rgds&thx to al for ideas/suggestionsl!
do you run your script from the general(S1) switch only?
As mentioned before, I activate script on both S2,S3. I observe in the log that a command on either switch triggers the script, then probably the script re-confirmes the command on the other switch, which is seen as a devicechange, script is triggered again (I always get script 2 entries for a single comamnd in the log). In effect maybe same as you are doing...?
@Forum
some more observations:
I've connected temp-sensor to the units, temp updates only on events. (polling disabled until now, don't want to flood zwave until i see urgent reason to get frequent updates)
Still not getting proper usage readings as well...
One unit (with 1 user attached) the individual usage goes to 0W after 5min, the general keeps indicating the usage value 'correctly' (not yet validated actual W's)
The other one (which has 2 appliances connected) seems to work ok, as long as both appliances are on. when switching off 1, same : only the general usage stays indicating. These values get corrected (temporarely) when the refresh script triggers...
The accumulated energy...too early to tell. I'm runnig LED off these units until now, so it will take a while to get something that comes in the KWh range...
if the individual channels depend on their usage as is reported, they will only accumulate when both on...
any similar experiences(/solutions!) to get it right?
It seems OZW issues to me? (not taking energy into account, let's see what comes from that)
rgds&thx to al for ideas/suggestionsl!
Domiticz 3.8153 on R-PI B+, Aeon Z-stick; RFX433-E, RFX868, Qubino, Aeon, Fibaro, Somfy, SolarEdge, X10, Visionic, NodeMCU, HarmonyHUB, MiLight
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Yes, the script is only called for the general switch with ID1.
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Seems like the OZW config is not quite right. Egregius (or any one that has a ZMNHBA2) could you test the following please?
Add the following to Config/qubino/ZMNHBA2.xml
Remove the zwcfg_0x???.xml file, start domoticz. This should remove the 3rd switch you see. And status updates should start working without extra help.
Note, if removing your zwcfg_0x???.xml file is not an option, you can also only remove/invalidate the node in question by changing the node id to a not existing nodeid.
Add the following to Config/qubino/ZMNHBA2.xml
Code: Select all
<!-- Map endpoints to instances -->
<CommandClass id="96" mapping="endpoints" />
Remove the zwcfg_0x???.xml file, start domoticz. This should remove the 3rd switch you see. And status updates should start working without extra help.
Note, if removing your zwcfg_0x???.xml file is not an option, you can also only remove/invalidate the node in question by changing the node id to a not existing nodeid.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Seems to work perfect at first sight!
Hint: you need to change names and remove the switch with id3 after this change.
@xs4me: thank you!
@gizmocuz: can you add this to the code please?
Hint: you need to change names and remove the switch with id3 after this change.
@xs4me: thank you!
@gizmocuz: can you add this to the code please?
Re: Qubino ZMNHBA2 2 relays doesn't report status?
Thanks for testing. I have submitted the change to OpenZwave. Once accepted it will find its way back into Domoticz.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Qubino ZMNHBA2 2 relays doesn't report status?
It seems to me that it went fine when only one external switch connected on I1.
When I2 was switched both relays reporter 'on' while only Q2 was actually switched.
Can someone else confirm this? I reverted back to my old settings because I have to much on my mind right now...
When I2 was switched both relays reporter 'on' while only Q2 was actually switched.
Can someone else confirm this? I reverted back to my old settings because I have to much on my mind right now...
Who is online
Users browsing this forum: No registered users and 1 guest