KIRA problem with 2-digit channels

HTTP sensors and actuators

KIRA problem with 2-digit channels

Messagepar ivanruban » 21 Juil 2014 11:51

Hi all. I use Keene KIRA to control TV by IR. It works fine when I select a single channel. But when it relates to 2-digit channels I use macro and have a problem here. The example is for "58 Discovery channel" which has two digits "5" and "8".

I tried to use macro with 1 second delay between commands "5" and "8" - and in half of cases I get channel 5 or channel 8 instead of channel 58! :( Then I also tried the macro with 0 seconds delay - the same story.

But on the portal if I press fast "5" and then in 0.5 second I press "8" - then it works more stable. But with the interface of eedomus it is difficult to do that - the list of values hides when user press a button on a device. I also cannot set a macro with 0.5 second delay, the minimum is "1 sec" in eedomus

In Fibaro HC2 for comparison - you can have a set of buttons on the mobile's screen and then pressing of several buttons in a row is much easier. I never tested HC2 with KIRA but with WF2IR it works just perfect. :!:

The problem with 2-digit channels is actually related to how the command is executed in eedomus. I can see on KIRA - it sends first IR-code, then several 2-4 seconds delay :!:, then second IR-code.

    1. Is it a problem in eedomus or KIRA perfomance?
    2. Is there anyone who has similar problems?
    3. Any solutions for that? May be php-script with 0.5 second delay?
    4. Does WF2IR work better than KIRA?
ivanruban
 
Messages : 16
Inscription : 08 Juil 2014

Re: KIRA problem with 2-digit channels

Messagepar ivanruban » 21 Juil 2014 13:03

I have found the solution - php script. I don't know why eedomus makes such big delays between calls (2-4 seconds) - but I guess it is a perfomance issue in eedomus.

Anyway http-queries work MUCH faster in php script, so below is example for channel "12". Works 100%. It is just a test-script. The script should be parametrised and then called from eedomus virtual device with "channel number" parameter.

Code : Tout sélectionner
<?php

// URL to KIRA, adjust according to your buttons
$url = "http://192.168.YOUR.IP/remote2.htm?button";
$ch1 = "002";
$ch2 = "003";
$ch3 = "004";
$ch4 = "005";
$ch5 = "006";
$ch6 = "007";
$ch7 = "008";
$ch8 = "009";
$ch9 = "010";
$ch0 = "011";

// query
httpQuery($url . $ch1);
httpQuery($url . $ch2);

?>
ivanruban
 
Messages : 16
Inscription : 08 Juil 2014

Re: KIRA problem with 2-digit channels

Messagepar Peedjy » 23 Juil 2014 08:31

Hi ivanruban

Can you please post a full script exemple, with more than one button?
For exemple to mange channel 10 to 20 etc...
Did you also manage the simple touch (from 0 to 9) with your script or directly from the eedomus?

Thanks
Peedjy
Suivez toute l'actualité domotique sur le blog domogy. http://blog.domogy.com
Peedjy
 
Messages : 27
Inscription : 10 Août 2012
Localisation : Macon (71)

Re: KIRA problem with 2-digit channels

Messagepar galaksy2001 » 23 Juil 2014 20:10

+1
galaksy2001
 
Messages : 535
Inscription : 06 Jan 2014

Re: KIRA problem with 2-digit channels

Messagepar ivanruban » 24 Juil 2014 08:25

Peedjy a écrit:Can you please post a full script exemple, with more than one button?
For exemple to mange channel 10 to 20 etc...
Did you also manage the simple touch (from 0 to 9) with your script or directly from the eedomus?

As I told that code is just an example to show how it is possible to fix this problem in a script. That script should be parametrized in order to make it universal of course.

Anyway here is the modified version of the script:
Code : Tout sélectionner
<?php
// URL to KIRA
$url = "http://" . getArg('kira_url');

// Channel f.ex. 125 or 48
$channel = getArg('channel');

// Channels definition [Number] => [ID in KIRA]
$kira_channels = array (
    "1" => "002",
    "2" => "003",
    "3" => "004",
   "4" => "005",
   "5" => "006",
   "6" => "007",
   "7" => "008",
   "8" => "009",
   "9" => "010",
   "0" => "011"
);

// Now send HTTP request for channels
$num_requests = strlen($channel);
for ($i = 0; $i < $num_requests; $i++) {
   $ch = $channel[ $i ];
   $kira_ch = $kira_channels[ $ch ];
   echo "Executing request for channel '". $ch ."' on KIRA (". $kira_ch .")<br>\r\n";
   httpQuery($url . $kira_ch); // that does the magic...
}
?>

To use it in eedomus:

0) I assume you saved your IR codes in memory of KIRA128 and know the saved button IDs in KIRA.

1) Save the script as kira_channel.php, edit values of the kira_channels array in the script according to your saved button IDs in KIRA128

2) Upload kira_channel.php to your eedomus box (in http://192.YOUR.EEDOMUS.IP/script/)

3) Create HTTP actuator, set user variables:
    VAR1 = kira_channel.php
    VAR2 = 192.YOUR.KIRA.IP/remote2.htm?button
4) Create value for each channel you need, for example
Now you can execute channel Discovery which will execute '6'+'7' on KIRA

For other channels: URL is always the same. Description and Parameters (&channel=NUMBER) are different for every channel.

Enjoy! :D
ivanruban
 
Messages : 16
Inscription : 08 Juil 2014

Re: KIRA problem with 2-digit channels

Messagepar ivanruban » 14 Déc 2014 19:22

Denisstar a écrit:Зимний праздник на подходе,
Старый год от нас уходит,
В дверь стучится Новый год.
Пусть с метелью и порошею
Принесет он все хорошее:
Детям - радость, как и прежде,
Взрослым - счастье и надежды.
Пусть новогодний Дед Мороз
Подарит счастья целый воз,
Здоровья крепкого в придачу,
Во всем задуманном удачу,
Мира, дружбы, шуток, ласки,
Чтобы жизнь была, как в сказке!
Всех форумчан, с Наступающими!!!))

Вот уж порадовали и удивили! Думал только французы едомусом пользуются.
Взаимно и с наступающим! :D
ivanruban
 
Messages : 16
Inscription : 08 Juil 2014


Retour vers HTTP requests

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité

cron