Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
Pass2PHP
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
First of all, make a good backup 
Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
-
gimic
- Posts: 50
- Joined: Thursday 04 January 2018 8:43
- Target OS: Linux
- Domoticz version: 3.66
- Location: Roeselare, Wvl, BE
- Contact:
Re: Pass2PHP
The update has gone surprisingly well. Now updated for 3 days and no big issues yet.
issues i got were:
1 Blinds no longer functioning
-> why? because in old version the status was on, off and stop now it is open, closed and stopped
--> solution: change the every php where the status is checked
2 Dashticz was not fuctioning correct for screens, up was down and down was up
-> why? old version of dashticz
--> solution: upgrade to latest version.
issues i got were:
1 Blinds no longer functioning
-> why? because in old version the status was on, off and stop now it is open, closed and stopped
--> solution: change the every php where the status is checked
2 Dashticz was not fuctioning correct for screens, up was down and down was up
-> why? old version of dashticz
--> solution: upgrade to latest version.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
Great to read everything want OK. Do you have dimmers?
-
gimic
- Posts: 50
- Joined: Thursday 04 January 2018 8:43
- Target OS: Linux
- Domoticz version: 3.66
- Location: Roeselare, Wvl, BE
- Contact:
Re: Pass2PHP
No, i don't have dimmers. All lights / roller shutters & blinds are on relay modules.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
Thanks for noticing this.Egregius wrote: Sunday 19 February 2023 3:02 First of all, make a good backup
Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
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.
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.
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Pass2PHP
That is fixed in 2023 beta but a little bit different, it is now in devicechanged_ext, see viewtopic.php?p=299819#p299819sincze wrote: Saturday 29 April 2023 11:44Thanks for noticing this.Egregius wrote: Sunday 19 February 2023 3:02 First of all, make a good backup
Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
@Egregius did you by any chance checked this ?? if we can continue to upgrade ;-0 from 2022.2.waltervl wrote: Saturday 29 April 2023 12:05That is fixed in 2023 beta but a little bit different, it is now in devicechanged_ext, see viewtopic.php?p=299819#p299819sincze wrote: Saturday 29 April 2023 11:44Thanks for noticing this.Egregius wrote: Sunday 19 February 2023 3:02 First of all, make a good backup
Normally shouldn't be a problem. One thing I noticed in 2023.1 is that the S value of a dimmer isn't passed in the devicechanged lua table. Therefor a dimmer arrives as On/Off in php instead of it's level %. Haven't found a fix yet for that so I returned to 2022.2.
I now have again everything up and running with zigbee2mqtt and zwave-js-ui as replacement of OZW.
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
I didn't update anymore. I'm currently working on new cron jobs running in loop instead of single runs and a mqttclient. I was thinking to run zwave-js inside Home assistant as it's easier to update there and then have my php mqtt client receive the zwave signals directly without domoticz.
At this moment I have the new crons operational and the mqtt client. The move to zwave-js will be for after the vacation. I'm not gonna risk to change it now.
At this moment I have the new crons operational and the mqtt client. The move to zwave-js will be for after the vacation. I'm not gonna risk to change it now.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
I can imagine. As it took me 2 weeks to get it stable again. (different post).Egregius wrote: Thursday 22 June 2023 7:57 The move to zwave-js will be for after the vacation. I'm not gonna risk to change it now.
Can you share the new idea on the architecture ?
Interested to see these CRONS as well.
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
I've seen your post 
My idea is to have everything mqtt based. Domoticz publishes updates to mqtt, home assistant does also. In the future il add zwave-js so that's also in mqtt. Then with one mqtt client in php I'll have all data instantly.
Because of this, the lua script isn't used anymore.
The crons are basically the same. Only difference is that it runs in a loop within php instead of being called by cron.sh. Just did that to have things switched at exactly 0,10, 20 seconds etc and not at 2,12,23...
My idea is to have everything mqtt based. Domoticz publishes updates to mqtt, home assistant does also. In the future il add zwave-js so that's also in mqtt. Then with one mqtt client in php I'll have all data instantly.
Because of this, the lua script isn't used anymore.
The crons are basically the same. Only difference is that it runs in a loop within php instead of being called by cron.sh. Just did that to have things switched at exactly 0,10, 20 seconds etc and not at 2,12,23...
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
Is this a Pass2PHP on a few more steroids idea?Egregius wrote: Thursday 22 June 2023 16:03 I've seen your post
My idea is to have everything mqtt based. Domoticz publishes updates to mqtt, home assistant does also. In the future il add zwave-js so that's also in mqtt. Then with one mqtt client in php I'll have all data instantly.
Because of this, the lua script isn't used anymore.
The crons are basically the same. Only difference is that it runs in a loop within php instead of being called by cron.sh. Just did that to have things switched at exactly 0,10, 20 seconds etc and not at 2,12,23...![]()
I currently have a lot of the easy automating moved from Pass2PHP to NodeRED. And the difficult stuff (scraping websites e.g.) by Pass2PHP.
Any reason on the 'why to use Home Assistant'. supports more hardware and pushes it quite well to MQTT ??
Can I have a sneak preview in your GIT repo on how to setup the new idea?
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
Well, where I'm today is always published on https://github.com/Egregius/PHP-Floorpl ... r-Domoticz
More steroids? Perhaps. Everything of my automation is handled by php. Domoticz is barely an interface between php and the hardware.
I started Home Assistant because my Ring doorbell died and I installed an Eufy one instead. Didn't find a good integration for that besides in HA. After that I also bought 10 wifi wall plugs and those are also just working in HA and not in domoticz.
More steroids? Perhaps. Everything of my automation is handled by php. Domoticz is barely an interface between php and the hardware.
I started Home Assistant because my Ring doorbell died and I installed an Eufy one instead. Didn't find a good integration for that besides in HA. After that I also bought 10 wifi wall plugs and those are also just working in HA and not in domoticz.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
That one I have bookmarked an now I understand why it starts with: $d=fetchdata();Egregius wrote: Friday 23 June 2023 10:38 Well, where I'm today is always published on https://github.com/Egregius/PHP-Floorpl ... r-Domoticz
I was looking for instructions on how to keep the cron php in a loop with the php mqtt client.
Maybe i need to dig a little deeper with your idea in mind.
Gotcha, as expected HA has lots of native integrations, but in a docker my Pi is not that happy with it.Egregius wrote: Friday 23 June 2023 10:38 More steroids? Perhaps. Everything of my automation is handled by php. Domoticz is barely an interface between php and the hardware.
I started Home Assistant because my Ring doorbell died and I installed an Eufy one instead. Didn't find a good integration for that besides in HA. After that I also bought 10 wifi wall plugs and those are also just working in HA and not in domoticz.
With the whole MQTT thought it is just a collector and the possibilities are then endless.
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
I have HA running in a Proxmox VM 
On the same Proxmox hypervisor as where domoticz runs so all 'network' traffic stays internal.
On the same Proxmox hypervisor as where domoticz runs so all 'network' traffic stays internal.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
I'm breaking down the code into blocks to understand the working of the CRON & MQTT idea.
As over the years I think the Pass2PHP approach is becoming more difficult to follow for new-enthusiasts and might scare people off.
As over the years I think the Pass2PHP approach is becoming more difficult to follow for new-enthusiasts and might scare people off.
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
It was never the intention to make it simple
Just back in the days the only thing talked about here was lua, lua and lua. Just wanted to prove that other languages could be used as well.
Just back in the days the only thing talked about here was lua, lua and lua. Just wanted to prove that other languages could be used as well.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
Been looping through your Github again 
Also have Domoticz 2023.x in a docker so can have a look at the dimmer issue as well.
How is HA doing?
For me that one is not working pleasantly in a docker. (Could be an issue whilst still using 32bit OS)
Also have Domoticz 2023.x in a docker so can have a look at the dimmer issue as well.
How is HA doing?
For me that one is not working pleasantly in a docker. (Could be an issue whilst still using 32bit OS)
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
HA is running in a Proxmox VM so it runs 100% stable. But, only used for my Eufy doorbell and some Tuya wifi wall plugs.
Already had issues with HA where stuff didn't work anymore after an update. Had to restore from a backup.
Haven't updated anymore since because it does what it needs to do and it does it stable in that version. Some with Domoticz for me. 2023.2 runs very stable and works perfectly with OpenZwave so why would I change that?
I'm getting a bit scared of updates globally. Recently received a FW update for my Sony HT-5000 speaker, still works but doens't startup automatically anymore whenever I put my TV on. So this one waits for another update and will then block internet access for it.
Already had issues with HA where stuff didn't work anymore after an update. Had to restore from a backup.
Haven't updated anymore since because it does what it needs to do and it does it stable in that version. Some with Domoticz for me. 2023.2 runs very stable and works perfectly with OpenZwave so why would I change that?
I'm getting a bit scared of updates globally. Recently received a FW update for my Sony HT-5000 speaker, still works but doens't startup automatically anymore whenever I put my TV on. So this one waits for another update and will then block internet access for it.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Pass2PHP
@egregius, don't know if you moved along with Domoticz 2024 releases 
Currently working on a Docker stack (PHP-FPM + CRON + NGINX ) that handles your pass4mqtt.php idea.
Whilst looking at the code I think this is still pre-2024 Domoticz release.
As for a color switch it now stores '15' (indicating it is a color switch vs nvalue of 0,1 e.g.), however the level (brightness) that is stored in 'svalue1' or "Level" is thrown away,
My assumption correct ?
Currently working on a Docker stack (PHP-FPM + CRON + NGINX ) that handles your pass4mqtt.php idea.
Whilst looking at the code I think this is still pre-2024 Domoticz release.
Code: Select all
elseif ($message['dtype']=='Color Switch') {
$status=$message['nvalue'];
lg(' (MQTT) Colorswitch '.$device.' => '.$status);
store($device, $status,' (MQTT) Color ');
My assumption correct ?
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.
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.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Pass2PHP
I'm on stable 2024.4.
Didn't notice anything yet. I must add that I don't really have color switch besides my Xiaomi hub which I only use for a green or red light.
Didn't notice anything yet. I must add that I don't really have color switch besides my Xiaomi hub which I only use for a green or red light.
Who is online
Users browsing this forum: No registered users and 1 guest