Page 1 of 2

Wrong zwave switch level displayed On, 255 %

Posted: Tuesday 24 November 2015 12:41
by warp
-Raspberry pi2B with Domoticz V2.3678
-RaZberry with OpenZWave V1.3-550-g4a2b2e5
-Qubino ZMNHBA2 Flush 2 Relays
Ok.PNG
Ok.PNG (6.17 KiB) Viewed 3768 times
I have several problems on my Qubino ZMNHBA2 :
The first :
1°) when i click on the 001C01,
  • State reports to "On" for 001C01 -> Good Behaviour
Step2.PNG
Step2.PNG (6.28 KiB) Viewed 3768 times
2°) when i click on the 001C02,
  • State reports to "On" for 001C02 -> Goog Behaviour
    State reports to "On,Level 255%" for 001C01 -> Why, Bad Behaviour ?
    State reports RF Signal Level to "-" -> Why ?
Step3.PNG
Step3.PNG (6.57 KiB) Viewed 3768 times
The second :
- when i click on the 001C02,
  • State reports to "On,Level 255%" for 001C01 -> But the relay of the switch 001C01 is not at "On" !
It seems that other people have the same problem, right?
viewtopic.php?f=6&t=5698
viewtopic.php?f=17&t=7043

help me @gizmocuz..

Re: Wrong zwave switch level displayed On, 255 %

Posted: Tuesday 24 November 2015 13:06
by Egregius
Remove the 'mapping = endpoints' line at the bottom of the Config XML.
Then you'll have 3 switches. 2 & 3 will work properly then.

This isn't a actual problem of Domoticz but from Openzwave.

Re: Wrong zwave switch level displayed On, 255 %

Posted: Tuesday 24 November 2015 20:49
by warp
Egregius wrote:Remove the 'mapping = endpoints' line at the bottom of the Config XML.
Then you'll have 3 switches. 2 & 3 will work properly then.

This isn't a actual problem of Domoticz but from Openzwave.
I have 3 switches now ..
But I still have problems:
When I click on the switch 2, switch State reports to "On"
When I click on the switch 3, switch 2 & 3 State reports to "On", :?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Tuesday 24 November 2015 21:40
by Egregius
And then use the script in viewtopic.php?f=17&t=7043&start=40#p54276
Works fine here :)

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 25 November 2015 12:23
by warp
Thank you you got to answer @Egregius

I have two questions:
  • 1) Or should we set this script ?
    2) Have you opened a ticker in OpenZwave for this problem ?
For information I have a switch "Mcohome MH-S412 Two-load" with the 'mapping =endpoints' line at the bottom of the XML Config, and it Works fine .
Mcohome MH-S412 .jpg
Mcohome MH-S412 .jpg (6.1 KiB) Viewed 3683 times

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 25 November 2015 12:52
by Egregius

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 25 November 2015 13:03
by warp
Where should we set this script php ?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Thursday 26 November 2015 17:42
by Egregius
Doesn't mather.
If you put it in the scripts folder you can call it by script://nameoffile.php
If it's somewhere else you'll need to specify the full path script:///path/nameoffile.php

Re: Wrong zwave switch level displayed On, 255 %

Posted: Friday 27 November 2015 13:02
by warp
Egregius wrote:Doesn't mather.
If you put it in the scripts folder you can call it by script://nameoffile.php
If it's somewhere else you'll need to specify the full path script:///path/nameoffile.php
Sorry but my question was, or should I interfaced the php script ?
- in cron?
- in the actions on-off of the switch?
- or other ?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Friday 27 November 2015 14:10
by Egregius
I have a refreshzwave in my script that runs after every switch update (thru domoticz_main)
If one of those switches is changed in the last 5 seconds I call the refreshzwave function for it.

Code: Select all

//Refresh Zwave node
	if($STTV>$time-5) RefreshZwave(10);
	if($STLichtTerrasGarage>$time-5) RefreshZwave(16);
	if($STLichtHallZolder>$time-5) RefreshZwave(20);
	if($STLichtInkomVoordeur>$time-5) RefreshZwave(23);
	if($STBureel_Tobi>$time-5) RefreshZwave(24);
	if($STSubwoofer>$time-5) RefreshZwave(51);
	if($STLamp_Bureel>$time-5) RefreshZwave(52);
	if($STPluto>$time-5) RefreshZwave(53);
	if($STKeukenZolder>$time-5) RefreshZwave(56);
	
I also have another that just runs by cron every 30 minutes. I like to call it custom polling ;)

Code: Select all

<?php 
file_get_contents('http://127.0.0.1:8080/json.htm?type=openzwavenodes&idx=5'); //Change IDX to IDX of your zwave controller
function RefreshZwave($node) {
	$zwaveurl='http://127.0.0.1:8080/ozwcp/refreshpost.html';
	$zwavedata=array('fun'=>'racp','node'=>$node);
	$zwaveoptions = array('http'=>array('header'=>'Content-Type: application/x-www-form-urlencoded\r\n','method'=>'POST','content'=>http_build_query($zwavedata),),);
	$zwavecontext=stream_context_create($zwaveoptions);
	for ($k=1;$k<=5;$k++){sleep(2);$result=file_get_contents($zwaveurl,false,$zwavecontext);if($result=='OK') break;}
}
RefreshZwave(10);
RefreshZwave(16);
RefreshZwave(20);
RefreshZwave(23);
RefreshZwave(24);
RefreshZwave(51);
RefreshZwave(52);
RefreshZwave(53);
RefreshZwave(56);
RefreshZwave(60);
RefreshZwave(61);
RefreshZwave(62);
RefreshZwave(63);

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 02 December 2015 16:39
by warp
@Egregius
Can you give me the exact code of your domoticz_main ?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 02 December 2015 21:22
by Egregius
Sure ;)

Code: Select all

#!/bin/sh
curl 'http://127.0.0.1/secure/cron.php'
I use curl instead of /usr/bin/php because it allows use of xcache.

Re: Wrong zwave switch level displayed On, 255 %

Posted: Friday 04 December 2015 2:25
by stolle
Hi,
I got the same problem and is wondering if I shall exclude/include the device after removing the mapping=endpoint line?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Friday 04 December 2015 12:31
by warp
@Egregius
Can you give me the exact code of your domoticz_main ?

Re: Wrong zwave switch level displayed On, 255 %

Posted: Friday 04 December 2015 16:24
by Egregius

Re: Wrong zwave switch level displayed On, 255 %

Posted: Monday 07 December 2015 9:39
by warp

Code: Select all

#!/bin/sh
curl 'http://127.0.0.1/secure/cron.php'
@Egregius
Sorry but i could not find "cron.php"

Re: Wrong zwave switch level displayed On, 255 %

Posted: Monday 07 December 2015 14:10
by Egregius
It's on my github, see link in signature below.

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 09 December 2015 19:59
by warp
Egregius wrote:It's on my github, see link in signature below.
Thank you, but your "cron.php" script is too complicated for me, I will have wished to have only the part concerning the problem of QUBINO ZMNHBA2.

Re: Wrong zwave switch level displayed On, 255 %

Posted: Wednesday 09 December 2015 22:07
by Egregius
You only need the refreshzwave function.
There's a complete example in one of the other qubino topics.

Re: Wrong zwave switch level displayed On, 255 %

Posted: Thursday 10 December 2015 11:48
by warp
@Egregius
Thank, for the cron.php and the refreshzwave function.
But if i want refresh after every switch update , how to do ?