Page 74 of 76
Re: Pass2PHP
Posted: Thursday 30 September 2021 11:36
by Egregius
Hmm, since couple of versions a roller doesn't report his correct value anymore, it just sends open, even when at 10% or anything else. Any ideas?
Code: Select all
2021-09-30 11:30:01.561 (AJAX) 192.168.2.200 iMac Guy device=Rbureel command=roller action=10
2021-09-30 11:30:01.562 (SETLEVEL) Guy=>Rbureel=>10 (ajax.php:174)
2021-09-30 11:30:01.561 Status: User: Admin (IP: 127.0.0.1) initiated a switch command (800/Rbureel/Set Level)
2021-09-30 11:30:01.562 ZWAVE: Domoticz has send a Switch command!, Level: 10, NodeID: 81 (0x51)
2021-09-30 11:30:01.562 ZWAVE: Light/Switch (Rbureel)
2021-09-30 11:30:01.565 Status: LUA: wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d=Rbureel&s=Open" &
2021-09-30 11:30:01.572 (STORE) => Rbureel => 0 (Pass2PHP)
2021-09-30 11:30:01.723 ZWAVE: Light/Switch (Rbureel)
2021-09-30 11:30:01.725 Status: LUA: wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d=Rbureel&s=Open" &
2021-09-30 11:30:01.730 (STORE) => Rbureel => 0 (Pass2PHP)
2021-09-30 11:30:03.771 ZWAVE: Light/Switch (Rbureel)
2021-09-30 11:30:03.772 Status: LUA: wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d=Rbureel&s=Open" &
2021-09-30 11:30:03.779 (STORE) => Rbureel => 0 (Pass2PHP)
The GUI reports the correct value.

- rbureel.png (14.68 KiB) Viewed 3168 times
The LUA script in use (just added the print line for debugging):
Code: Select all
commandArray={}
local function isRealSensor(name)
return otherdevices_idx[name]
end
for d, s in pairs(devicechanged) do
if isRealSensor(d) and d ~= 'blocklua' then
print('wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d='..d..'&s='..s..'" &')
os.execute('wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d='..d..'&s='..s..'" &')
end
end
return commandArray
Re: Pass2PHP
Posted: Sunday 09 January 2022 10:10
by sincze
It seems this great topic servicing me with information and a great Domoticz experience for several years now is a bit dead.
Or no more issues

Re: Pass2PHP
Posted: Monday 10 January 2022 16:51
by Egregius
No more issues I guess, certainly not here

Also, because everything in the house got automated couple of years ago there's not much else to do. Sometimes a very small tweak but that's all.
I remember starting with Domoticz almost 7 years ago that I used to 'program' hours a day to enhance the system. Now that's down to maybe couple of minutes a month.
Strangest thing about all of it is when we're on vacation. So strange to actually have to push a button to have light and to push all the buttons everywhere around when you go to sleep.
At almost €7000 it was quite an investment but it was worth every penny of it, couldn't go without it anymore.
The only thing to hope for is that all the Qubino, Fibaro and other stuff won't break soon.
Re: Pass2PHP
Posted: Monday 10 January 2022 17:02
by heggink
VERY recognisable. The occasional switch from OZW to zwavejs but it's nearly getting boring.
Time for new things. Introduce some kind of AI so that the system can start recommending smart stuff by itself


.
Then again, stability is very much appreciated.
Sent from my SM-G980F using Tapatalk
Re: Pass2PHP
Posted: Monday 10 January 2022 17:46
by Egregius
heggink wrote: ↑Monday 10 January 2022 17:02
The occasional switch from OZW to zwavejs but it's nearly getting boring.
Can you explain this some more?
Re: Pass2PHP
Posted: Monday 10 January 2022 18:06
by sincze
Recently the idea popped up to do a Pass2NodeRed using the global variables.
As my system is completely ready and operational with NO issues at all I had no need to migrate.
However my friend was so inspired by the whole concept of Pass2PHP that he developed the NodeRed solution where all devices can also be addressed by their name

in stead of the idx. In addition all states are stored in the global variables.

- pass2nodered.PNG (277.46 KiB) Viewed 3092 times
Re: Pass2PHP
Posted: Monday 10 January 2022 18:47
by heggink
Egregius wrote:heggink wrote: ↑Monday 10 January 2022 17:02
The occasional switch from OZW to zwavejs but it's nearly getting boring.
Can you explain this some more?
OZW was a near disaster for me. Lots of instability issues impacting the WAF so I started to discuss building a zwavejs2mqtt plugin with @moroen . He did most of the heavy lifting and the end result was working so much better.
Then @gizmocuz decided to build native HA autodiscovery into mqtt so now I don't need any further python plugins for either zwave or zigbee. Zwavejs2mqtt and zigbee2mqtt run independently from domoticz making the whole thing really stable.
Sent from my SM-G980F using Tapatalk
Re: Pass2PHP
Posted: Tuesday 11 January 2022 7:15
by Egregius
sincze wrote: ↑Monday 10 January 2022 18:06
where all devices can also be addressed by their name

in stead of the idx.
That's also so in Pass2php. Would be a nightmare to use idx in automations.
Re: Pass2PHP
Posted: Tuesday 11 January 2022 7:17
by Egregius
heggink wrote: ↑Monday 10 January 2022 18:47
Zwavejs2mqtt and zigbee2mqtt run independently from domoticz making the whole thing really stable.
Is it also faster? Not that I'm having real issues at the moment. Sometimes, rather rarely, a light takes a second to respond. Mostly it's instantly.
Is there somewhere a tutorial available that describes the whole setup?
Re: Pass2PHP
Posted: Tuesday 11 January 2022 8:43
by heggink
Egregius wrote:heggink wrote: ↑Monday 10 January 2022 18:47
Zwavejs2mqtt and zigbee2mqtt run independently from domoticz making the whole thing really stable.
Is it also faster? Not that I'm having real issues at the moment. Sometimes, rather rarely, a light takes a second to respond. Mostly it's instantly.
Is there somewhere a tutorial available that describes the whole setup?
Not sure if it's faster but it is instantly for me. There is a wiki for both the beta autodiscovery as well as zwavejs2mqtt I believe but there is a complete autodiscovery section on the forum as well.
Sent from my SM-G980F using Tapatalk
Re: Pass2PHP
Posted: Tuesday 11 January 2022 12:59
by Egregius
Been playing with Zwavejs2mqtt. I see all devices in the ZWaveJS2MQTT controlpanel and they're discoverd by Domoticz as new devices.
Just can't seem to find how the commands from domoticz should arrive at ZWaveJS2MQTT.
Re: Pass2PHP
Posted: Tuesday 11 January 2022 13:47
by heggink
When domoticz gets the autodiscovery message, it describes the mqtt messages needed to control that device. If you switch a zwavejs2mqtt based light from domoticz, it sends a mqtt message to zwavejs2mqtt which triggers the switch.
Mind you, the functionality is still beta although Rob (gizmocuz) indicated a new stable release is imminent. There may still be the odd bug here and there.
Sent from my SM-G980F using Tapatalk
Re: Pass2PHP
Posted: Tuesday 11 January 2022 14:02
by Egregius
I was thinking some further...
What if MQTT could replace Domoticz?
Mosquitto as the core.
ZWaveJS2MQTT to handle zwave stuff
Domoticz to handle RFXCom and Xiaomi etc
And then a script in PHP that subscribes and publishes to MQTT and does all the logic.
I would think that will be the fastest option available.
Re: Pass2PHP
Posted: Tuesday 11 January 2022 14:19
by jvdz
Anything is possible when you put your mind to it, but that is not a trivial task and would take away the low level (lua/dzvents) scripting.
One would need to have a substantial knowledge level of JS & NodeRed to get started.

The thing we do see at the moment is that the HARDWARE handling is partly moving away from the Domoticz core into these ZIGBEE2MQTT, ZWAVEJS2MQTT and other gateways.
Re: Pass2PHP
Posted: Tuesday 11 January 2022 14:53
by heggink
Agreed. Domoticz not being the be all end all thing but rather being the big integrator with effective scripting is what attracts me. HA scripting is not nearly as flexible and effective. It looks nice but I'd rather not look at it and having it very stable in the background.
Sent from my SM-G980F using Tapatalk
Re: Pass2PHP
Posted: Tuesday 11 January 2022 15:24
by Egregius
That's just the thing, I don't use any of the scripting possibilities in Domoticz.
Doing some testing with a php MQTT subscriber know, at this moment subscribed to domoticz/out
If I get that working OK I'll try to subscribe to ZWaveJS2MQTT and only use domoticz for RFXcom and Xiaomi.
Re: Pass2PHP
Posted: Tuesday 11 January 2022 15:36
by Egregius
On the other hand... Why try to invent hot water all over? Just for some milleseconds and a occasional delay?
I'm not gonna bother trying to write it and stay with my current setup of Domoticz and Pass2PHP. It's been running for years stable.
Re: Pass2PHP
Posted: Friday 09 December 2022 19:26
by NvBgm55
Read this thread with attention but I wonder if this is what I'm looking for. I would like my domoticz data in a different database than what I do now Influxdb. And then you can keep the date for a longer period of time. I've also looked at the author's sites, but I'm dizzy with the many scripts for this. Can someone explain how in a simple way. And what scripts/php files I need?
Somewhere I downloaded the following file.
ee5_base64.lua
JSON.lua
pass2php.php
Re: Pass2PHP
Posted: Saturday 10 December 2022 6:41
by Egregius
It all depends on what you'd like to do. Just storing data, doing other logic, ...
I do everything in php, domoticz is just used as a gateway to the hardware.
You should start at
https://github.com/Egregius/PHP-Floorpl ... r-Domoticz
You'll need at least the secure/lua/script_device_pass2php.lua script to have domoticz sends it's data to secure/pass2php.php
Use the Create-Update SQL Database.txt file to create the MySQL database.
Re: Pass2PHP
Posted: Saturday 18 February 2023 18:57
by gimic
Do you have any advice to upgrade from V4.10602
Build Date: 2019-04-04 20:51:02
To latest domoticz 2023.1? What would be the way to go?
i have everything programmed in pass2php and stable for 4 years now but in the need for zigbee2mqtt.
i have a cold spare device (HP thin client with ssd) to install domoticz so i can do a replace of the system without the house being down for a lot of time.
tnx