Pass2PHP

Moderator: leecollings

User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: RE: Re: LUA Pass2php

Post by sincze »

Egregius wrote:For me it's not only the speed up of my script, it's the freedom of using a well documented code.
Just for the fun, type in Google lua and php and see the difference.
129000000 vs 10930000000 results!
When I started with Domoticz I googled a lot for lua but found that the userbase is so small and specific that it wasn't easy. PHP on the other hand has such a great userbase that for every issue you have already tons of people posted about it.
Plus, I've seen stuff here in lua of wich I think WTF, really?
A yes. Freedom. I forgot to mention that. Let me try tonight and see if I can become a wizer man.

All my devices have names like 'Lamp Staand Voor' .. 'Motion Keuken' hopefully that will not be an issue with the php. I think

Array... 123->motion_keuken
With
function motion_Keuken() should at least be able to switch idx of 'lamp staand voor' on and off.

I did not know lua as well but mastered the necessary skills to obtain full functionality. Now it is time to do the same with php :)


Sent from my SM-G925F using Tapatalk
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

Since version 2.2 you can have spaces in your switch names.
Only thing is that you need to replace them by underscores in the name of your function.
So for you that should be something like:

Code: Select all

function Motion_Keuken()
{
  if( $s['Motion Keuken']=='On' && $s['Lamp Staand Voor']=='Off' )
    sw($si['Lamp Staand Voor'],'On');
}
 
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Just a quick check with your version 2.2

Your 2.2 script_device_pass2php.lua says:

Code: Select all

os.execute('curl -s --data "c='..c..'&s='..s..'&i='..i..'&t='..t..'" http://127.0.0.1/secure/pass2php.php &')
As my file is stored not on a website but locally, can I change this safely to the old:

Code: Select all

os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..changed..'" "'..devices..'" "'..idx..'" "'..lastupdate..'" &')
Or do I need to modify it to:

Code: Select all

os.execute('curl -s --data "c='..c..'&s='..s..'&i='..i..'&t='..t..'" /home/pi/domoticz/scripts/php/pass2php.php &')
Don't know what works. I can try fooling around or just ask :D
Just 2 be sure.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

Yes, shouldn't be a problem as pass2php handles it as 1st, 2nd parameter etc.
You can use os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..changed..'" "'..devices..'" "'..idx..'" "'..lastupdate..'" &')
At least, if you didn't change the lua script.
Otherwise, that would be
os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: LUA Pass2php

Post by Westcott »

Hi Lvsigo,

Yes, this does work quite quickly -
http://easydomoticz.com/forum/viewtopic ... 55b841a5ce

I need to see how using curl compares with io.popen(url) and using a socket.

On FOR x will be useful as well.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Egregius wrote:Yes, shouldn't be a problem as pass2php handles it as 1st, 2nd parameter etc.
You can use os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..changed..'" "'..devices..'" "'..idx..'" "'..lastupdate..'" &')
At least, if you didn't change the lua script.
Otherwise, that would be
os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')
A yes I created this as well.

Code: Select all

JSON=loadfile('/home/pi/domoticz/scripts/lua/JSON.lua')()
base64=loadfile('/home/pi/domoticz/scripts/lua/ee5_base64.lua')()
c=base64.encode(JSON:encode(devicechanged))
s=base64.encode(JSON:encode(otherdevices))
i=base64.encode(JSON:encode(otherdevices_idx))
t=base64.encode(JSON:encode(otherdevices_lastupdate))
os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')
commandArray={}
return commandArray
So that file should be functioning.
If I add "bla" to the code I will see an error in the domoticz log.
If I add a print statement between

Code: Select all

commandArray={}
print "test"
return commandArray
This will show up in the log. Now would there by any chance be something so that I can really check if the command:

Code: Select all

os.execute( '/home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')
Is executed correctly?

In my pass2php.php script I created the following function:

Code: Select all

function Motion_Kastenkamer()
{
        global $s,$i,$t;
        if($s['Motion Kastenkamer'=="On" && $s['Lamp (CV Ruimte)']=='Off')
        {
        sw($i['Lamp (CV Ruimte)'],'On');
        lg('test='.$s['write motion in the logfile']);
        }
}
However Lamp (CV Ruimte) is not turned on if I move my hand over the Motion sensor. :?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

You can add print or lg statements, see some posts back. Like before the if in the function.
In the first if there's a ] missing.
Dont know if $i['Lamp (CV Ruimte)'] will work, you can avoid that (and for test) by replacing that with the idx of your switch: sw(123,'On')
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

I modified the first part of pass2php.php as shown in a few posts back. However NOTHING shows up in my domoticz log when I trigger for example the ZonweringAuto virtual switch. I guess something else is going wrong. pass2php.php has the following permissions:
-rwxrwxrwx.

I just guess os.execute is not executing anything as the log function does not work.

Code: Select all

<?php
error_reporting(E_ALL);
ini_set("display_errors","on");
date_default_timezone_set('Europe/Brussels');
define('time',$_SERVER['REQUEST_TIME']);
$c=json_decode(base64_decode($_REQUEST['c']),true);
$s=json_decode(base64_decode($_REQUEST['s']),true);
$i=json_decode(base64_decode($_REQUEST['i']),true);
$t=json_decode(base64_decode($_REQUEST['t']),true);
$r=str_replace(" ","_",key($c));
lg('Pass2PHP triggered by '.key($c));
if(function_exists(key($c)))
        key($c)();
elseif(function_exists($r))
        $r();
//START USER FUNCTIONS

function Motion_Kastenkamer()
{
        lg('Executing function Mmotion_Kastenkamer');
        global $s,$i,$t;
        if($s['Motion Kastenkamer']=="On" && $s['Lamp (CV Ruimte)']=='Off')
        {
        sw($i['Lamp (CV Ruimte)'],'On');
        lg('Switching on the light now');
        sw(192,'On');
        }
}

function ZonweringAuto()
{
        lg('Executing function Mmotion_Kastenkamer');
        global $s,$i,$t;
        if($s['ZonweringAuto']=="On")
        {
        lg('Switching on the light now');
        sw(192,'On');
        }
}
Sending a manual curl

Code: Select all

curl "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello'"
sends a hello to the domoticz log. :D

What am i missing here, :(
just an easy

Code: Select all

php /home/pi/domoticz/scripts/php/pass2php.php ZonweringAuto

would be nice :D , however that results into a

Code: Select all

PHP Parse error:  syntax error, unexpected '(' in /home/pi/domoticz/scripts/php/pass2php.php on line 13
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

Think I see something...
You didn't specify that the script has to be executed by a PHP interpreter.
Either you put #!/usr/bin/php at the beginning of the PHP file, or you put /usr/bin/php before the path to the script.
I still would consider using curl and place the script on a PHP enabled web server. If you use PHP7 and OpCache the response time will be half of when executed with PHP CLI.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Maybe move the production environment of my Domoticz to a Synology then :D
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

It's running smoothly here on a DS1513+ with Jumbotrolls packacke, webstation, PHP7 and MemCached :)
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Damn....

Code: Select all

sudo apt-get install php5-curl
And now at least my pass2.php is being executed ;-) when any device changes in Domoticz. :D
The log is flooding with "hello" messages.

Code: Select all

<?php
// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello'");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);
?>
Now let's see if that solves the rest as well ;-)


Mmm.. if I modify the php like this:

Code: Select all

<?php
// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello'");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);

curl "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello2'"
?>


Nothing ends up in my domoticz log as if the file is not executed at all.
The command executed from shell

Code: Select all

curl "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello2'"
Gives me:

Code: Select all

{
   "status" : "OK",
   "title" : "AddLogMessage"
}
As it seems your script builds the curl scripts like that this might give a clue why the pass2php is not executed.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Damn....

Code: Select all

sudo apt-get install php5-curl
And now at least my pass2.php is being executed ;-) when any device changes in Domoticz. :D
The log is flooding with "hello" messages.

Code: Select all

<?php
// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello'");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);
?>
However still no luck with flipping the virtual switch... and adding some log lines.

Code: Select all

<?php
lg('Executing something what ... i don't know');

error_reporting(E_ALL);
ini_set("display_errors","on");
date_default_timezone_set('Europe/Brussels');
define('time',$_SERVER['REQUEST_TIME']);
$c=json_decode(base64_decode($_REQUEST['c']),true);
$s=json_decode(base64_decode($_REQUEST['s']),true);
$i=json_decode(base64_decode($_REQUEST['i']),true);
$t=json_decode(base64_decode($_REQUEST['t']),true);
$r=str_replace(" ","_",key($c));
lg('Pass2PHP triggered by '.key($c));
if(function_exists(key($c)))
        key($c)();
elseif(function_exists($r))
        $r();
//START USER FUNCTIONS

function ZonweringAuto()
{
        lg('Executing function ZonweringAuto');
        global $s,$i,$t;
        if($s['ZonweringAuto']=="On")
        {
        lg('Switching on the light now');
        sw(192,'On');
        }

I would at least aspect "Executing something what ... i don't know" and "Pass2PHP triggered by" in my domoticz log.

Ow and I moved to a webserver as well.. :D , that one is working.

Code: Select all

os.execute('curl -s --data "c='..c..'&s='..s..'&i='..i..'&t='..t..'" http://192.168.2.10/php/pass2php.php &')
Just a question.. I see your script starts with <?php should there be a closure of ?> :D that I am missing?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

No, no closing tag.
But it's not because you installed php5-curl that you can curl a php page.

Use
os.execute( '/usr/bin/php /home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')

If you want to curl the page you'll need a php enabled webserver.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Egregius wrote:No, no closing tag.
But it's not because you installed php5-curl that you can curl a php page.

Use
os.execute( '/usr/bin/php /home/pi/domoticz/scripts/php/pass2php.php "'..c..'" "'..s..'" "'..i..'" "'..t..'" &')

If you want to curl the page you'll need a php enabled webserver.
Tnx for feedback. I did the following
- create web server with php.
hello.png
hello.png (4.53 KiB) Viewed 2748 times
- webserver and php seem to be working.

Then I did the following:
- script_device_pass2.lua

Code: Select all

JSON=loadfile('/home/linaro/domoticz/scripts/lua/JSON.lua')()
base64=loadfile('/home/linaro/domoticz/scripts/lua/ee5_base64.lua')()

c=base64.encode(JSON:encode(devicechanged))
s=base64.encode(JSON:encode(otherdevices))
i=base64.encode(JSON:encode(otherdevices_idx))
t=base64.encode(JSON:encode(otherdevices_lastupdate))

os.execute('curl -s --data "c='..c..'&s='..s..'&i='..i..'&t='..t..'" http://192.168.2.10/php/pass3.php &')
commandArray={}
return commandArray
So this should call pass3.php from the webserver in case a device changes.

- pass3.php

Code: Select all

// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://192.168.2.10:8080/json.htm?type=command&param=addlogmessage&message='hello'");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);

?>
As a result my domoticz log is filling with "hello".
hello-domoticz.JPG
hello-domoticz.JPG (24.71 KiB) Viewed 2745 times
But when I change " http://192.168.2.10/php/pass3.php" to " http://192.168.2.10/php/pass2php.php" ... nothing happens anymore.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Did some more debugging

Code: Select all

 if(function_exists(key($c)))
      key($c)();
 elseif(function_exists($r))
      $r();
If I comment out this function.. the lg() function does it's job well and fills my domoticz log with messages like:
"Pass2PHP triggered by <device name>"

i must be doing something wrong with function names then...
Continue debugging :D we will get to the starting point .....
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

I wanted to know the contents of the other variables $s,$i,$t, this contents seems to be static. :o

Code: Select all

2016-12-08 21:11:04.682 => Pass2PHP triggered by ZonweringAuto
2016-12-08 21:11:04.684 => Pass2PHP Var s is: AV control
2016-12-08 21:11:04.686 => Pass2PHP Var i is: AV control
2016-12-08 21:11:04.689 => Pass2PHP Var t is: AV control
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

Those are arrays, you need print_r($s) to see them.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: LUA Pass2php

Post by sincze »

Okay. I got it working now. :D
Need to make a slight modification to the code.

Code: Select all

<?php
error_reporting(E_ALL);
ini_set("display_errors","on");
date_default_timezone_set('Europe/Brussels');
define('time',$_SERVER['REQUEST_TIME']);
$c=json_decode(base64_decode($_REQUEST['c']),true);
$s=json_decode(base64_decode($_REQUEST['s']),true);
$i=json_decode(base64_decode($_REQUEST['i']),true);
$t=json_decode(base64_decode($_REQUEST['t']),true);
$r=str_replace(" ","_",key($c));
$c2=key($c);										// Added this one....

 if(function_exists(key($c)))
        {
         lg('Pass2PHP de functie bestaat: '.key($c));
         lg('Pass2PHP echo functie is: '.$c2);
//       key($c)();									// Removed this one as function was not executed
        $c2();										// Added this... function is now executed.
        }
  elseif(function_exists($r))
        {
         lg('Pass2PHP de functie reversed: '.$r);
         $r();
        }

//START USER FUNCTIONS

function ZonweringAuto()
 {
   global $s,$i,$t;
        if($s['ZonweringAuto']=="On")
        {
        sw($i['Lamp (CV Ruimte)'],'On');
        lg('Event triggered');
        }
        else
        lg('Dont know what to do... tell me..');
}

Don't know why I had add the conversion: $c2=key($c);
And accordingly replace key($c)(); with $c2(); to get it working. But now I have a working executing setup and I can move on. :D

Starting to speed up those scenarios
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: LUA Pass2php

Post by Egregius »

Maybe a difference between php5 & php7. Don't know.
$r is spaces in name replaced by underscores ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest