Page 62 of 76

Re: Pass2PHP

Posted: Friday 20 March 2020 15:53
by Egregius
Look at the few lines I posted of the pass2php file. You'll have to add your device to that array.
At the moment it'll only take the temperature as I don't care about humidity etc.

Re: Pass2PHP

Posted: Friday 20 March 2020 16:06
by Trigun
ok, the log is stil saying the following

Code: Select all

03-20 16:05:01.759 STATUS ==> Outdoor temperature = 4.3
2020-03-20 16:05:01.759 STATUS ==> Indoor temperature = 20.7 C, 47 %, 1014.6 hPa
2020-03-20 16:05:01.759  (SWITCH)                => Duco-afzuiging => Off ()
I've changed the pass2phpfile file to:

Code: Select all

} elseif (in_array($device, array('Indoor-Temp&Hum'))) {
    $status=explode(';', $status);
    $status=$status[0];
I don't think its working yet

Re: Pass2PHP

Posted: Friday 20 March 2020 22:01
by Egregius
I see now. Yours has a comma as separator, mine has semicolon. Change the ; to , in the explode.

Re: Pass2PHP

Posted: Friday 20 March 2020 22:17
by Trigun
I'm Sorry I must have turned blind as I cannot see what you mean.
I've checked it all but cannot find any differences :?

Re: Pass2PHP

Posted: Saturday 21 March 2020 7:28
by Egregius
Your logfile shows:

Code: Select all

2020-03-20 16:05:01.759 STATUS ==> Indoor temperature = 20.7 C, 47 %, 1014.6 hPa
Which means that the fields in the status of your indoor temperature are separated with a comma.

On line 29 of https://github.com/Egregius/PHP-Floorpl ... ss2php.php
the status of the devices in the array on line 28 are exploded by a semicolon.
That's why your status doesn't get exploded into a array.

Copy lines 28-30 to a new elseif block:

Code: Select all

} elseif (in_array($device, array('badkamer_temp'))) {
    $status=explode(';', $status);
    $status=$status[0];

to

Code: Select all

} elseif (in_array($device, array('badkamer_temp'))) {
    $status=explode(';', $status);
    $status=$status[0];
} elseif (in_array($device, array('Indoor-Temp&Hum'))) {
    $status=explode(',', $status);
    $status=$status[0];
    $humidity=$status[1];
    $baro=$status[2];
It's up to you to decide if you need to add the $humidity and $baro lines and how to handle them. Maybe with a storemode.
Or don't explode them there and only explode them when you need them. That would be something like this:

Code: Select all

$data=explode(',', $d['Indoor-Temp&Hum']['s']);
$indoortemp=$data[0];
$indoorhumidity=$data[1];
$indoorbaro=$data[2];
if ($d['Outdoor-Temp&Hum']['s']>=$indoortemp){
	sw('Duco-afzuiging', 'Off');
}

Re: Pass2PHP

Posted: Thursday 26 March 2020 22:21
by Trigun
hi all,

will pass2php work with mariadb?

since the upgrade to version 2020.1 msql is no longe possible to install.

thnx!

Re: Pass2PHP

Posted: Thursday 26 March 2020 22:23
by Egregius
Of course. Mariadb is the default mysql server in buster.

Re: Pass2PHP

Posted: Friday 27 March 2020 10:10
by sincze
Works like a charm. :lol:
Needed to update the php settings ofcourse to different 7.3 "sock" as that will be upgraded as well.

Pass2PHP

Posted: Friday 27 March 2020 10:12
by Trigun
sincze wrote:Works like a charm. :lol:
Needed to update the php settings ofcourse to different 7.3 "sock" as that will be upgraded as well.
How did you install mcrypt? As it cannot be installed the usual way

Also how did you install the right mariadb?

Sent from my iPhone using Tapatalk

Re: Pass2PHP

Posted: Friday 27 March 2020 10:20
by Egregius
I don't think I have mcrypt installed, don't even know what it's used for :lol:

I have these mariadb packages installed:
mariadb-client-10.3/stable,stable,now 1:10.3.22-0+deb10u1 amd64 [installed,automatic]
mariadb-client-core-10.3/stable,stable,now 1:10.3.22-0+deb10u1 amd64 [installed,automatic]
mariadb-common/stable,stable,now 1:10.3.22-0+deb10u1 all [installed,automatic]
mariadb-server-10.3/stable,stable,now 1:10.3.22-0+deb10u1 amd64 [installed,automatic]
mariadb-server-core-10.3/stable,stable,now 1:10.3.22-0+deb10u1 amd64 [installed,automatic]

Don't know why I have mariadb-server-10.3 instead of mariadb-server

Re: Pass2PHP

Posted: Friday 27 March 2020 13:35
by Trigun
I always thought that php relied on Mcrypt but I guess its not necessary anymore?

Re: Pass2PHP

Posted: Friday 27 March 2020 15:25
by Egregius
If you install php the dependencies will also be installed. No need to worry about that.

Re: Pass2PHP

Posted: Monday 30 March 2020 13:34
by Trigun
Great! I got it all working again! :)

is it me or does is it working faster with OZW 1.6?
anyway, again very happy with pass2php!

Re: Pass2PHP

Posted: Monday 30 March 2020 13:44
by Egregius
Don't know if OZW 1.6 is the cause, been running it for months now.
All I know, it works lighting fast and rock solid :lol:

Re: Pass2PHP

Posted: Wednesday 08 April 2020 10:59
by Egregius
Finally got my Daikin airconditioners installed :D
Of course, these are now also useable directly in pass2php :mrgreen:

Re: Pass2PHP

Posted: Wednesday 08 April 2020 11:01
by Trigun
Egregius wrote:Finally got my Daikin airconditioners installed :D
Of course, these are now also useable directly in pass2php :mrgreen:
Cool!!$ which ones did you purchase. I am looking for an airco as wellImage would be cool to add it to pass2 php.

Also perhaps anyone has some experience with adding a Samsung tv?


Sent from my iPhone using Tapatalk

Re: Pass2PHP

Posted: Wednesday 08 April 2020 11:07
by sincze
I'm Old school ..
LG Airo here since 2012 non-smart here ;-)
Did install a shelly to measure the power usage :lol:

Re: Pass2PHP

Posted: Wednesday 08 April 2020 13:35
by Egregius
I installed the 3MXM52N multi R32 in combination with 1x Perfera FTX-M35 and 2x Perfera FTX-M20.

Re: Pass2PHP

Posted: Tuesday 28 April 2020 21:20
by ropske
Hi guys, well i think of returning back to domoticz lol and this php script.

I changed to Homey to try, but it does not give what i want.
Its very good i think for a user that doesn't know anything about programming.
But if want to switch on a light and switch off after x seconds, lol you need to do a lot.
Even for my heating in my house, djeezes , its to cry what i need to do lol

Now, i had domoticz running before on a raspberry pi. But then some strange things happened (i think Egrerius remembers? i have spoken to you sometimes and you were also out of options :D)

Now, what system do you advice to my to run domoticz on with aeon zwave plus stick?

Thank you!

Re: Pass2PHP

Posted: Wednesday 29 April 2020 7:19
by Egregius
Damn, another few hundred euro in the trash, hope you can resell it.

Any raspberry should run Domoticz perfectly, keeping in mind SD card troubles.

For a truly worry free set up:
Use a Intel Nuc (or something similar). I have the Intel Baby Canyon NUC7i3BNH. I recently added 16GB ram so I'm at 24GB ram and I replaced the SATA SSD to a Samsung 970 EVO PLUS M2.SSD.
I installed ProxMox on it as a hypervisor. That permits to run multiple virtual machines on 1 computer. That's the main reason for the extra memory. I also added a extra network card.
In Proxmox I installed several virtual machines:
- pfSense firewall and add blocker. All my internet traffic passes this router.
- Domoticz with Aeotec Z-Wave and RFXCOM.
- A Windows 10 workstation because I use a Mac mainly but sometimes need Windows.
- Some linux distro's that only run to test some stuff.

One of the greatest advantages of the Proxmox setup is that you can easily take whole system snapshot to a NAS or external HD. If the nuc dies I can quickly run Proxmox from USB on a laptop and restore the snapshots until a new Nuc is delivered. In my home everything is handled from Domoticz. Every light, every roller, music, tv, heating, airco, everything. There are even rooms and outlets that can't be switched on without domoticz. So I cannot afford any downtime.

Agreed, it's quite more expensive than a Raspberry but it gives a lot in return. If you have on old laptop laying around that could also be a good option. You mainly want something that's stable and doesn't consume to much power.