Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
DewGew edited this page Dec 28, 2022 · 5 revisions

Checking beta

cd /home/$USER/Domoticz-Google-Assistant
git reset --hard
git pull
git checkout beta

Install pip requirements

cd /home/$USER
source Domoticz-Google-Assistant/env/bin/activate
pip install -r Domoticz-Google-Assistant/requirements/pip-requirements.txt

Last restart Domoticz-Google-Assistant

sudo systemctl restart dzga

Monit

Configuration to check dzga process in monit

Example:

check process dzga  with pidfile /var/run/dzga.pid
  start program = "bin/systemctl start dzga" with timeout 60 seconds
  stop program = "bin/systemctl stop dzga"
  if failed host 127.0.0.1 port 3030 with timeout 30 seconds for 5 cycles then restart
  if 5 restarts within 5 cycles then timeout

DzVents script to sync devices

Simple script to sync your devices from domoticz. Just add a dummy pushbutton then add a dzVents script.
Example:

local idx = 123
local url = '192.168.1.123:3030'
local token = 'YOURCOOLTOKEN'  --You can find your authToken in dzga settings page

return {
	on = {
		devices = {idx}
	},
	execute = function(domoticz, item)
	    
        domoticz.log(dev, domoticz.LOG_INFO)

		if (item.active) then
            domoticz.openURL({
				url = 'http://'..url..'/sync',
				method = 'POST',
				headers = {
				    Authorization = 'Bearer '..token
				    },
				    
			})
			domoticz.log('Syncing devices with dzga.', domoticz.LOG_INFO)
		end

	end
}