Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.48 KB

Domoticz.md

File metadata and controls

50 lines (38 loc) · 1.48 KB

Connect Domoticz

I. Add stop hour control

In this example we will add the possibility to stop the charge at 6 o'clock.

  1. Add new selector switch: selector

  2. Edit it like this edit selector Selector action:

  3. Save

II. Add charge threshold control

You can do the same thing that we did in part one. You just have to change url to :

If you want more precise control :

  1. Add a virtual switch

add sensor 2. Edit the new switch 3. Get the idx get idx

  1. Open event configuration : configuration -> devices -> Event event

  2. Add new python script add_python_script

  3. Add this code and change the vin in the url

import domoticz
import DomoticzEvents as DE
import urllib.request



for name, value in DE.user_variables.items():
  domoticz.log("var"+ str(name)+ "has value"+ str(value))


domoticz.log("The device that got changed is: "+DE.changed_device_name)
# changed_device.name is the same string
if DE.changed_device_name== "Seuil de charge":
    urllib.request.urlopen('http://localhost:5000/charge_control?vin=YOURVIN&percentage='+str(DE.changed_device.s_value))
  1. Save