Pass2PHP

Moderator: leecollings

ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

but still a shitload of gas is being used.

like in the morning, i see i'm using around 3m³ already

and i'm setting the temperature of living to 22°C from 4:30 till 6:00
kitchen to 22°C from 4:30 till 6:50
and bathroom to 23°C from 5:00 till 6:40

for me temperatures can be a lot lower, but the wife is complaining its too cold :oops:
Attachments
gasverbruik.jpg
gasverbruik.jpg (35.88 KiB) Viewed 3220 times
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

i also need to mention that the house were we live now is a 'koppelbouw' in Dutch :p
and the other house they are renovating it now, but it's completely open now, no doors, no windows. So i also think/hope, when the renovation from the house beside us is done, we also will have a warmer feeling from that house?
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius »

OMG 10m³ per day? :o
For the last 30 days I have an average of 2,4m³ per day.
The 'biggest' day was 4,37m³.
Don't think the other house has much to do about it. There should be isolation between the two.

@sinze: damn all that logging and graphs :mrgreen:
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: Pass2PHP

Post by sincze »

My GAS usage ;-)
Egregius - GAS.PNG
Egregius - GAS.PNG (124.03 KiB) Viewed 3198 times
And yes GRAPHING gives insight also with help of SPLUNK (free).

I discovered using that monitoring my network was having issues with DNS ;-) so definitely logging does help finding issues.
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.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

@sincze, so it seems you got an average of +-7m³/day now

You also control it with zwave radiator valves?
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: Pass2PHP

Post by sincze »

Ha no, I've floor heating that was manually adjusted per room.
-> By manually adjusting the flowrate (waterzijdig inregelen).

So if the temp in the livingroom is like 20 degrees the bathroom is 21-22 and the other rooms 18/19 or 20.
Floor heating takes a lot of time so I keep the temp 20 during the day / 19 during night time... but if it freezes outside it stays at 20. All done via Opentherm.
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.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

i'm reading a lot times you guys are using influxdb and grafana also?

you guys got an installation tutorial where i can't mess up with? :D

and how do you work with it? insert data ,...

thanks!
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: Pass2PHP

Post by sincze »

Yes Grafana and Influx / telegraf are my friends.
Are you open for dockers ?? ;-)
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.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

what do you mean with dockers?
I'm running now domoticz on an intel nuc with proxmox
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: Pass2PHP

Post by sincze »

ropske wrote: Tuesday 08 December 2020 17:53 what do you mean with dockers?
I'm running now domoticz on an intel nuc with proxmox
VM's sometimes are a bit too heavy. So dockers to the rescue.

https://docs.docker.com/get-docker/
https://runnable.com/docker/install-doc ... windows-10
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: Pass2PHP

Post by Egregius »

A good addition thanks to @Waaren at viewtopic.php?p=264686#p264686
With that lua script a lot less calls are made to the webserver and the pass2php script doens't need to check for them anymore.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

First of all, a Happy newyear to everyone and may everyone have a good health,... yeah same shit like every year :D


A question regarding how you guys store data to influxDB, you do it in the php script?
Or you let Domoticz handle it? (with https://www.domoticz.com/wiki/HttpLink)

Thanks!
kispalsz
Posts: 31
Joined: Friday 13 October 2017 19:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Pass2PHP

Post by kispalsz »

I have a little problem.
I use several Ikea Tradfri remote controls, 5 buttons, 9 functions. https://www.ikea.com/hu/hu/p/tradfri-ta ... -30443124/

All of its buttons work with PASS2PHP, only the up (+) and long up (L +) buttons do not.
When the LUA script runs, it still has a "+" sign, but if I call the PHP file using curl or wget, it will already be there, with an empty character going through. " " character instead of "+" and "L" character instead of "L +".
They lose the + character.

Does anyone use such a remote control?
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius »

@ropske: I don't use influxdb, think you need to be with Sincze for that/
@kispalsz: can you post the code that you're using for the Tradfri? And how do you get that signal in Domoticz?
kispalsz
Posts: 31
Joined: Friday 13 October 2017 19:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Pass2PHP

Post by kispalsz »

Egregius wrote: Monday 04 January 2021 7:09 @ropske: I don't use influxdb, think you need to be with Sincze for that/
@kispalsz: can you post the code that you're using for the Tradfri? And how do you get that signal in Domoticz?

If I put this it in the LUA file before calling pass2php.php it will work properly. I haven't looked at how many ms slowdowns this operation will result :)

if s=="+" then s="%2B" end
if s=="L +" then s="L %2B" end

Code: Select all

for d,s in pairs(devicechanged)                                                                                                                                                                                                             
do                                                                                                                                                                                                                                          
                                                                                                                                                                                                                        
if s=="+" then s="%2B" end                                                                                                                                                                                                                  
if s=="L +" then s="L %2B" end                                                                                                                                                                                                              
                                                                                                                       
os.execute('wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d='..d..'&s='..s..'" &')                                                                                                                            
end                                                                                                                                                                                                                                         
commandArray={}                                                                                                                                                                                                                             
  
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pass2PHP

Post by Egregius »

I would say you need to search either 'url encode' or 'html entities'.
But I doubt that any function or framework will be faster than your solution.
One tiny thing that you can change:

Code: Select all

for d,s in pairs(devicechanged)                                                                                                                                                                                                             
do                                                                                                                                                                                                                                          
                                                                                                                                                                                                                        
if s=="+" then s="%2B" end                                                                                                                                                                                                               
elseif s=="L +" then s="L %2B" end                                                                                                                                                                                                              
                                                                                                                       
os.execute('wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d='..d..'&s='..s..'" &')                                                                                                                            
end                                                                                                                                                                                                                                         
commandArray={}                                                                                                                                                                                                                             
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Pass2PHP

Post by waaren »

Egregius wrote: Monday 04 January 2021 17:24 I would say you need to search either 'url encode' or 'html entities'.
But I doubt that any function or framework will be faster than your solution.
One tiny thing that you can change:

Code: Select all

for d,s in pairs(devicechanged)                                                                                                                                                                                                             
do                                                                                                                                                                                                                                          
                                                                                                                                                                                                                        
if s=="+" then s="%2B" end                                                                                                                                                                                                               
elseif s=="L +" then s="L %2B" end                                                                                                                                                                                                              
                                                                                                                       
os.execute('wget -O /dev/null -o /dev/null "http://127.0.0.1/secure/pass2php.php?d='..d..'&s='..s..'" &')                                                                                                                            
end                                                                                                                                                                                                                                         
commandArray={}                                                                                                                                                                                                                             
There is one end too many in that code

If it is a urlEncode type of issue I would expect the space also to be a problem (and some other chars) but normally this will be handled by wget when using double quotes around your url string.

Below mod might prevent some calls to os.execute

Code: Select all

commandArray = {}

local function isRealSensor(name)
   return otherdevices_idx[name]
end

for d, s in pairs(devicechanged) do
	if isRealSensor(d) then
		if s == '+' then s = '%2B' elseif s == 'L +' then s = 'L %2B' end
		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

Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waltervl
Posts: 5387
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Pass2PHP

Post by waltervl »

ropske wrote: Sunday 03 January 2021 17:25 First of all, a Happy newyear to everyone and may everyone have a good health,... yeah same shit like every year :D


A question regarding how you guys store data to influxDB, you do it in the php script?
Or you let Domoticz handle it? (with https://www.domoticz.com/wiki/HttpLink)

Thanks!
See the Wiki: https://www.domoticz.com/wiki/Influxdb
For influxdb to grafana there are a lot of tutorials online.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Pass2PHP

Post by ropske »

ok, thanks for all the information about InfluxDB.

Now i'm just wondering, Sincze,told about installing InfluxDB into a "docker".

This docker software is something i need to install on my VM?

But why can't i just install InfluxDB then directly in my linux VM where domoticz is running and all other scripts (pass2php ,...)

I have another VM running with windows10 beside it, should i need to install docker then on Windows10 and influx and grafana on there?

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

Re: Pass2PHP

Post by Egregius »

If you should decide to update proxmox to version 7 you'll probably need to make an adjustment in the config file:

in /etc/pve/nodes/proxmox/lxc/100.conf
Change:

Code: Select all

lxc.cgroup.devices.allow: c 166:* rwm
lxc.cgroup.devices.allow: c 188:* rwm
lxc.cgroup.devices.allow: c 189:* rwm
To:

Code: Select all

lxc.cgroup2.devices.allow: c 166:* rwm
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests