Pass2PHP

Moderator: leecollings

User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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
rbureel.png (14.68 KiB) Viewed 2758 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
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Pass2PHP

Post 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 :lol:
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: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Pass2PHP

Post 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

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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?
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Pass2PHP

Post 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
pass2nodered.PNG (277.46 KiB) Viewed 2682 times
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
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Pass2PHP

Post 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

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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?
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Pass2PHP

Post 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

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Pass2PHP

Post 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

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Pass2PHP

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Pass2PHP

Post 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

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
NvBgm55
Posts: 14
Joined: Wednesday 15 December 2021 20:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Pass2PHP

Post 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
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post 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.
gimic
Posts: 50
Joined: Thursday 04 January 2018 8:43
Target OS: Linux
Domoticz version: 3.66
Location: Roeselare, Wvl, BE
Contact:

Re: Pass2PHP

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests