Skip to content

3. Configuration

DewGew edited this page Feb 12, 2024 · 13 revisions

Configuration

You can access the user interface via http://dzga-ip-no:8181. The default username is admin and the default password is smarthome. Configuration and Actions on Google must be modified properly.

Since Domoticz has improved its security, you have to enable Allow Basic Authentication over plain HTTP in menu Security .
Its recomended to add a new user in Domoticz dedicated for DZGA and add devices to this user. See User Management.

Device Configuraton

You can add nicknames, place devices in a room in your Google Assistant. The function hide ,hides devices from Google Assistant but you can still see this in UI as type '_Hidden'.

Device configuration is availible in UI in devices tab. Just click on blue device type link. This setting only applies to logged in user.

You can also put the device configuration in the device description, in a section between 'voicecontrol' tags. This applies to all users.

Example:

<voicecontrol>
   nicknames = Kitchen Blind One, Left Blind, Blue Blind
   room = Kitchen
   ack = True
   devicetype = oven
   minThreehold = -10
   maxThreehold = 10
   hide = True
   camurl = http://livefeed.mycam.com:8080
   actual_temp_idx = 345
   selector_modes_idx = 346
</voicecontrol>

Other parts of the description are ignored, so you can still leave other useful descriptions. Every variable should be on a separate line.

Ack
When set this to true, the user have to acknowledge turning on/off the device

Device Type
Function to change device type, icon and some behavior depending on the device (e.g open/close instead of on/off).

<voicecontrol>
  devicetype = oven
</voicecontrol>

Light or Switch devices can choose types from:

'light', 'ac_unit', 'bathtub', 'coffeemaker', 'doorbell', 'dishwasher', 'dryer', 'fan', 'airfreshener', 'airpurifier', 'blender', 'heater', 'kettle', 'media', 'microwave', 'outlet', 'oven', 'speaker', 'switch', 'vacuum', 'boiler', 'cooktop', 'humidfier', 'washer', 'waterheater', 'window', 'door', 'gate', 'garage', 'radiator', 'shutter', 'TV'.

Temperature Control
An OnOff device with devicetype Heater, Waterheater, Kettle or Oven its possible to merge a setpoint(Thermostat) device to control temperature.

<voicecontrol>
  merge_thermo_idx = 123
<voicecontrol>

For thermostat devices only.
Function to merge actual temperature from another temp device or modes from selector device to thermostat. Supports levelnames: off, heat, cool, auto, fan-only, purifier, eco and dry

<voicecontrol>
  actual_temp_idx = 123
  selector_modes_idx = 234
</voicecontrol>

To set max and min threehold for thermostats:

<voicecontrol>
   minThreehold = -10
   maxThreehold = 10
</voicecontrol>

For Doorbell and Cameras.
Add camera url to show on chromecast or Nesthub

<voicecontrol>
  camurl = http://livefeed.mycam.com:8080
</voicecontrol>

Timer.
Needs to add a dzVents script in Domoticz to act like a timer. Example:

return {
	on = {
            customEvents = { 'TIMER' },
	},
	logging = {
            level = domoticz.LOG_INFO,
            marker = "Timer"
        },
	execute = function(dzga, item)
	    if (item.isJSON) then
    	        local device = dzga.devices(item.json.idx)
    	    
    	    if (device.active and item.json.cancel) then
    	        dzga.log('Stop timer for ' .. device.name)
    	        device.cancelQueuedCommands()
            else
                dzga.log('No timer is running for' .. device.name)
            end
            if  item.json.on == true then
                device.cancelQueuedCommands()
                device.switchOn()
                dzga.log('Switch ' .. device.name .. ' On for: ' .. item.json.time .. ' sec')
                device.switchOff().afterSec(item.json.time)
            end
        end
    end
}

Use like this:

User: Turn on living room light for 5 minutes.
Google Assistant: Turning on living room light for 5 minutes?
User: Stop timer for living room light.
Google Assistant: Updating living room timer? (Turn off light/switch manually)

Clone this wiki locally