Pass2PHP

Moderator: leecollings

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 »

Egregius wrote: Monday 12 February 2024 12:39 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.
mmm that is interesting with pass4mqtt only as that one stores '15' indicating the light would be on. ?
Or in combination with pass2php, pretty much lost you at some point so trying to catch up.
Only difference you running proxmox and I trying in Dockers :lol: but result could be the same.
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 »

I see in the logfiles that I get 0, 1 and 10. Didn't test in what condition what enters.
The OS shouldn't make a difference indeed. But pass4mqtt replaces pass2php. The main benefit is that it also links up to HASS.
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 »

Egregius wrote: Monday 12 February 2024 16:16 I see in the logfiles that I get 0, 1 and 10. Didn't test in what condition what enters.
The OS shouldn't make a difference indeed. But pass4mqtt replaces pass2php. The main benefit is that it also links up to HASS.

So I got HASS running... creates a 30GB DB in 10 days... (because I forwarded some devices to domoticz to it...) it is crazy.
Domoticz since 2014 is only 90 MB...

But now, how to manage the way back with what you did with the doorbell ??
You created an 'automation' in HA to publish a specific topic in the mqtt broker and catch that with the 'pass2hass.php' ??
Would that be the 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.
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 »

Data from hass 2 php is still partially done with the rest command. I have this in my config:

Code: Select all

rest_command:
  eufy_doorbell:
    url: "http://192.168.2.2/secure/pass4hass.php"
    method: post
    content_type: "application/x-www-form-urlencoded"
    payload: "d=eufy&a=doorbell"
and in automations:

Code: Select all

- id: '1681975555777'
  alias: Eufy Doorbell
  description: ''
  trigger:
  - type: running
    platform: device
    device_id: c66600b76ab4ab295a4c8423e1263309
    entity_id: binary_sensor.doorbell_ringing
    domain: binary_sensor
  condition: []
  action:
  - service: rest_command.eufy_doorbell
    data: {}
  mode: single
Only started later with mqtt. Probably would be better to have everything in mqtt. I just don't have much interesest in it anymore. Everything works as expected and is 100% stable so why search for trouble ;-)
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 »

Aha, was truly simple to have it al in mqtt, just had to add the binary_sensor line.

Code: Select all

mqtt_statestream:
  base_topic: homeassistant
  include:
    domains:
      - switch
      - sensor
      - binary_sensor
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 26 February 2024 13:51 creates a 30GB DB in 10 days... (because I forwarded some devices to domoticz to it...) it is crazy.
Did you find anything to limit the db size? I'm searching for avoiding disk writes but can't get it lower than 3GB/day for hass. My domoticz server only writes 200MB/day.
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 »

Egregius wrote: Saturday 06 April 2024 9:43
sincze wrote: Monday 26 February 2024 13:51 creates a 30GB DB in 10 days... (because I forwarded some devices to domoticz to it...) it is crazy.
Did you find anything to limit the db size? I'm searching for avoiding disk writes but can't get it lower than 3GB/day for hass. My domoticz server only writes 200MB/day.
I went down from total DB size of 30 GB to 3 GB. Let me share later. Used the exclude in the recorder and a clean up script at 02:22:22
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
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 »

sincze wrote: Saturday 06 April 2024 10:59
Egregius wrote: Saturday 06 April 2024 9:43
sincze wrote: Monday 26 February 2024 13:51 creates a 30GB DB in 10 days... (because I forwarded some devices to domoticz to it...) it is crazy.
Did you find anything to limit the db size? I'm searching for avoiding disk writes but can't get it lower than 3GB/day for hass. My domoticz server only writes 200MB/day.
I went down from total DB size of 30 GB to 3 GB. Let me share later. Used the exclude in the recorder and a clean up script at 02:22:22
The following line was added to the configuration.yaml

Code: Select all

recorder: !include recorder.yaml
After that I created the recorder.yaml, to 'minimize' the DB Size
Spoiler: show

Code: Select all

# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃                                     RECORDER Configuration                                     ┃
# ┃ ---------------------------------------------------------------------------------------------- ┃
# ┃ This file defines settings for the recorder of Home Asistant.                                  ┃
# ┃ ---------------------------------------------------------------------------------------------- ┃
# ┃ File: recorder.yaml                                                                            ┃
# ┃ Created: February 29, 2024                                                                     ┃
# ┃ By: S.Incze                                                                                    ┃
# ┃----------------------------------------------------------------------------------------------- ┃
# ┃ Note: Please be cautious while editing this file to maintain the correct YAML syntax.          ┃
# ┃----------------------------------------------------------------------------------------------- ┃
# ┃ For more information, visit: https://www.home-assistant.io/integrations/recorder/              ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

  purge_keep_days: 3
  commit_interval: 2
  include:
    domains:
      - sensor
      - switch
      - media_player
    entities:
      - sensor.watermeter_dz
      - device_tracker.gsm_boy
      - device_tracker.gsm_girl
      - device_tracker.tk_905_4g
      - device_tracker.luggage_brown
      - device_tracker.luggage_white
      - binary_sensor.alarm
  exclude:
    event_types:
      - call_service
#      - component_loaded
#      - platform_discovered
#      - service_registered
    entities:
#      - sensor.low_tariff_usage
#      - sensor.high_tariff_usage
#      - sensor.low_tariff_return
#      - sensor.high_tariff_return
#      - sensor.actual_consumption
#      - sensor.actual_return
#      - sensor.mqtt_low_tariff_usage
#      - sensor.mqtt_high_tariff_usage
#      - sensor.mqtt_low_tariff_return
#      - sensor.mqtt_high_tariff_return
#      - sensor.mqtt_actual_consumption
#      - sensor.mqtt_actual_return
      - sensor.last_boot
      - camera.front_door
      - sensor.home_assistant_v2_db
      - sensor.memory_free
      - sensor.memory_use
      - sensor.memory_use_percent
      - sensor.processor_use
      - weather.openweathermap
      - sensor.router_upload_dz
    entity_globs:
      - sensor.*_last_seen
      - sensor.*_linkquality
      - sensor.*_temperature
      - sensor.*_consumption_v
      - sensor.*_consumption_w
      - sensor.*_node_status
      - binary_sensor.*
      - sensor.p1_*
      - sensor.date*
      - sensor.weather_*
      - switch.lamp_*
      - switch.xiaomi_*_dz
      - switch.motion_*_dz
      - switch.deur_*_dz
      - sensor.neo_usg_*
      - sensor.plug_kodi_keuken_electric_*
      - sensor.none_tasmota_alarm_energy_*

#  exclude:
#    domains:
#      - device_tracker
#      - media_player
#      - uptime
#      - time_date
#      - worldclock
#    entity_globs:
#      - sensor.clock*
#      - sensor.date*
#      - sensor.glances*
#      - sensor.load_*m
#      - sensor.time*
#      - sensor.uptime*
#    entities:
#      - camera.front_door
#      - sensor.home_assistant_v2_db
#      - sensor.memory_free
#      - sensor.memory_use
#      - sensor.memory_use_percent
#      - sensor.processor_use
#      - weather.openweathermap
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 »

I already guessed it would be the recorder. I disabled default config to disable history and recorder completely. Still 3GB written each day :o
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 »

Egregius wrote: Friday 12 April 2024 4:54 I already guessed it would be the recorder. I disabled default config to disable history and recorder completely. Still 3GB written each day :o
Written a day yes. But mine cleans it back daily at 02:22:22 would that be of interest?? It is an automation task.
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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest