- -30%

Smart EVSE module to make DIY EV charging station (wallbox) that also works with Domoticz home automation system
Full support: most products are designed by us!
Orders are shipped within 1 working day, by post or express courier
24 months warranty, easy return/refund in case of problem
Creasol DomBusEVSE is a fully tested DIN rail module, designed for Domoticz home automation system, to charge electric vehicles using the standard IEC 62196-2 Mode3 (AC charge, up to 22kW power).
It works as stand-alone (without any domotic controller) or in managed mode (charging current controlled by Domoticz).
In stand-alone mode it works only as single-phase charger, because it's able to read only DDS238-2 ZN/S energy meter (single phase); using Domoticz home automation, it's able to manage three-phase charging by getting the current grid power value from Domoticz (e.g. SDM630 or other power meter already installed in Domoticz). The power value from the electricity grid is needed by DomBusEVSE to regulate the charging current preventing overloads/disconnections, and also to keep the max power set by the user: more info below.
Although this is a fully tested product, it may be used by technical engineers only for development or demostration. Creasol declines all responsibility for damage to things or people.
Mains power supply (230V single-phase, 400V three-phase) is connected to the vehicle through a 2P or 4P contactor (relays) to assure that no power is applied when charging session is OFF.
Only the Control Pilot wire + earth/ground are connected to the EVSE module: control pilot is protected by transient voltage suppression device.
A smart EVSE module:
With Domoticz, it's also possible to connect the vehicle cloud to get other informations about battery state of charge, odometer, location, speed, ...
The following diagram shows the connection of the EVSE module to energy meter, contactor, RCD to get a complete smart wallbox, single-phase 230V, sensing the grid power to get the best charging speed preventing overloads and disconnections. Block diagram is available also in PDF format.
It's possible to make a three phase charger by replacing the contactor with a 4P version and using an three-phase energy meter connected to Domoticz so the current power drained from the electricity grid is fed by Domoticz to the DomBusEVSE module.
This device was designed for technical engineers only, for developing purpose. Creasol declines any responsibility for damage to things or people.
Make all wirings as indicated in the diagram above (click to get the PDF schematic with higher resolution), but connect only the energy meter that measures energy to the electric vehicle.
We suggest to put the wallbox modules in a indoor switchbox, possibly near the point where you'll park your car, but also near the main switchbox or solar inverter, if exists, to minimize cable length: use 6mm² (or 10mm²) wires for the mains power supply. Then place a small 10x10cm box where the electric car is parked, indoor or outdoor, connected by 3x 6mm² (or 10mm²) wires (L,N,PE) plus a shielded 2x0.22mm² cable (standard cable for alarm systems): one wire is connected to the CP terminal block (control pilot), and other wire + shield are connected to PE/GND. The Type-2 or Type-1 cable (with only plug connector to the vehicle) will be connected to the small box.
In case that device is used as stand-alone, without attached domotic controller, energy meters must be already configured with Modbus address=2 (to EV) and address=3 (to Grid): they can be purchased from Creasol Store asking to get address already programmed. Also it's possible to ask that EVSE module is preprogrammed with the right value of MAXPOWER (max power from grid), MAXCURRENT (max current supported by the EV cable).
The next instructions are relative to Domoticz controller, a free open-source home automation controller that let a full control of the wallbox and is highly recommended: it works in cheap hardware like Rock PI-S or Raspberry PI4, as like Linux computers, windows and Mac.
It's recommended to install Domoticz Beta, which is up-to-date, Python Plugin Manager (not available in Windows), then it's possible to install the Creasol DomBus plugin from Python Plugin Manager: in this way it's possible to get notifications about future updates of the DomBus plugin, and auto upgrade.
DomBusEVSE can be connected to the domotic controller / PC by a USB/RS485 adapter: a device will be automatically added to Domoticz -> Switches panel, with factory-default address ffe3.1: click on Edit button and add to the Description ,HWADDR=0x0001 or other unique address, then click Save button: click on Dashboard and then on Switches again to see, in the bottom, the EVSE devices: EVSE On, RL2, EVSE Supply, EVSE Mode, EVSE State, EVSE Current. Click on EVSE Mode, and edit the MAXPOWER and MAXCURRENT parameters, then save.
Create a new room to group all EVSE device: Setup -> More Options -> Plans -> Room Plan, add a new room Wallbox or something else, and add all devices with address corresponding with the HWADDR set before. Then, click on Dashboard and select the Wallbox room.
As energy meters are factory programmed with Modbus address 1, first connect the energy meter between Type-B RCCB and contactor, and assign address = 2 in this way: select Domoticz -> Utility -> M1 Addr device, click on Edit button and write in the Description field ,ADDR=2 then save. Then connect the main energy meter (that measure the power exchanged with the grid) and assign address=2: select Domoticz -> Utility -> M1 Addr device, click on Edit button and write in the Description field ,ADDR=3 then save.
If a energy meter connected to the electricity grid is already available, it's sufficient to install a simple script that, when the power from grid changes, update the value of the "virtual device" Grid Power that is automatically created
Finally, DomBusEVSE has additional support for:
* SPST relay output RL2, with 250V 5A capability, that can be used for any purpose
* up to 4 energy meters, so 2 additionally energy meters (with address=4 and 5) can be connected to get power statistics for the heat pump, kitchen, ....
All parts should be available in the Creasol Store, but not the Type-2 or Type-1 cable.
The following picture shows the integration in Domoticz of the EV (Kia Niro car, using the plugin available with Python Plugin Manager) and DomBusEVSE module; it shows a trip to Garda Lake, Northern of Italy, with a short charging session at a 11kW station, and then a long charging session using DomBusEVSE wallbox in SOLAR mode (only energy from photovoltic).
During the charging session at home, in SOLAR mode, both the washer machine and the oven were switched on: in this cases the EVSE module reduced the charging current to the minimum and after 90 seconds ended the session until available power returned above the STARTPOWER parameter. As displayed in the charts below, the module assure that no power comes from the grid, in SOLAR mode.
When DomBusEVSE module is configured in managed mode, Domoticz is responsible to set the charging current as preferred. Obviously, all protections regarding max current, min current and any alarms from the car are correctly managed by the EVSE module.
In managed mode it's easy to:
1. easily set the minimum and maximum battery level
2. easily set the maximum charging current
3. when battery level is below minimum, charge at the max power permitted by the electricity meter (in Italy, alternates 90 minutes at maximum power + 27% and 90 minutes at maximum power + 10%, it's not possible to charge faster! The electrical system must be checked carefully when using maximum power, to avoid overheating and fires!!)
4. when battery level is between minimum and maximum, charge using only power from renewable energy from photovoltaic
Also, the max grid power can be adjusted to get the maximum from the grid. The chart below shows the case of Italy, where the max available power is P+10% forever, and P+27% for max 90 minutes every 180 minutes: charging power will be the highest as possible, regulating the charging power to get the maximum available power preventing disconnections. Charging power is updated every 6 seconds to take care about other building appliances.
{youtube}fyDtGO6S1UI{/youtube}
In case that a stationary accumulator is installed in the building, two cases are possible:
1. the DomBusEVSE grid energy meter is installed before the stationary accumulator/inverter sensor (mains power supply -> DomBusEVSE energy meter -> battery sensor)
2. the DomBusEVSE grid energy meter is installed after the stationary accumulator/inverter sensor (mains power supply -> battery sensor -> DomBusEVSE energy meter)
To explain these two cases, let assume that photovoltaic is producing 3kW, house is consuming 1kW, max power from battery is 5kW, max power from grid is 6kW
EVSE Mode | OFF | SOLAR | 25% | 50% | 75% | 100% |
Case #1 charging power (EVSE meter, then battery meter) |
0 | 3-1=2kW | 3-1+1.5=3.5kW | 3-1+3=5kW | 3-1+4.5=6.5kW | 3-1+6=8kW |
Case #2 charging power (battery meter, then EVSE meter) |
0 | 3-1+5=7kW | 3-1+5+1.5=8.5kW | 3-1+5+3=10kW | 3-1+5+4.5=11.5kW | 3-1+5+6=13kW |
Obviously, a parameter set the max current supported by the cable, that usually is 32A, so the charging power is limited to 7-8kW in single phase.
Modbus address | Modbus value | DomBus parameter | Function |
---|---|---|---|
8192 | 1-247 | HWADDR=0xNNNN | This command sets a new address for the DomBus module. Be sure to assign to each module a unique address, to avoid conflicting modules. DomBus protocol and Domoticz: choose a device associated to the module, edit and add in the description field the text ,HWADDR=0x0001 for example, to assign address 1 to the module. Reload the Switches panel to see the new devices associated to the new module address. NNNN must be a number in exadecimal format, from 0x0001 to 0xff00, so 65280 combinations are available. Keep note of address assegnated to each dombus device, because in case of conflicting addresses it's needed to switch off one of the conflicting device and program the remaining one to another address, or make a factory reset as explained below. Domoticz example: ID=ff23.1,OUT_RELAY_LP,HWADDR=0x2301 to change address from ff23 to 2301 Modbus example using the program mbpoll: mbpoll -v -b115200 -Pnone -mrtu -a227 -0 -1 -r8192 /dev/ttyUSB0 12 to change address from 227 to 12 |
8193 | 0-7 | Not available | Set the serial bitrate to: 0 → 115200 bps (default) 1 → 57600 bps 2 → 38400 bps 3 → 19200 bps 4 → 9600 bps 5 → 4800 bps 6 → 2400 bps 7 → 1200 bps |
8194 | 0-2 | Not available | Set the serial parity to: 0 → none (default) 1 → even 2 → odd |
512+Port#-1 | 0 | NORMAL | Used the standard logic state for an input or output: for a digital input, On correspond to high voltage (normally 3.3V) and Off with low voltage (input shorted to GND); for an output, On corresponds to relay or open-drain mosfet active, while Off corresponds to relay/mosfet disabled. Can be used inverted with the INVERTED option (below). Domoticz example: ID=2301.1,OUT_RELAY_LP,NORMAL to get relay active when ON, and deasserted when OFF (normal behaviour). To invert, write INVERTED instead of NORMAL. |
512+Port#-1 | 1 | INVERTED | Used to invert the logic state of an input or output. Can be used in conjuction with OUT_DIGITAL, OUT_RELAY_LP, IN_DIGITAL, DIMMER. For digital inputs, On corresponds with input shorted to GND, while Off corresponds to input open (with internal pullup to 3V3). For outputs, On means that relay/mosfet output is OFF and OFF means that relay/mosfet output is ON. Domoticz example: ID=2301.1,OUT_RELAY_LP,INVERTED to get relay normally active (when domoticz device is Off). To negate this condition, write NORMAL instead of INVERTED. |
512+Port#-1 | 2 | PULLUP | Used to force the microcontroller internal pullup. Domoticz example: ID=2301.6,IN_DIGITAL,PULLUP to have the pullup active on port 6 (default behaviour) |
512+Port#-1 | 4 | PULLDOWN | Used to force the microcontroller internal pulldown. Can be used on inputs that should be normally at logic level 0, and should go to level 1 when a positive voltage is applied to the port. Domoticz example: ID=2301.6,IN_DIGITAL,PULLDOWN to have the internal pulldown active on port 6. To restore to the default behaviour, write PULLUP instead of PULLDOWN. |
256+Port#-1 | 1 | OUT_DIGITAL | Digital output, open-drain or relay output. For this kind of port it's possible to set the port value to 0 → OFF 1 or 0xff00 → ON forever From 2 to 1920 → N*31.25ms (1920=60s) From 1921 (61s) to 3540 (3600s=1h) → 1s resolution From 5461 (61m), 6840 (1440m=24h) → 1m resolution From 6841 (25h) to 65535 → 1h resolution Domoticz example: ID=2301.1,OUT_DIGITAL to configure the port 1 as a digital output |
256+Port#-1 | 2 | OUT_RELAY_LP | Can be used with relay outputs and open-drain outputs connected to relay coil, to reduce power consumption As for OUT_DIGITAL mode, it's possible to specify a port value to get OFF and ON state, and ON including a timeout (monostable) Domoticz example: ID=2301.1,OUT_RELAY_LP to configure the port 1 as a relay output optimized for low power consumption. |
256+Port#-1 | 4 | OUT_DIMMER | Set the output as DIMMER, from 0 to 100% using 5% step, 500Hz frequency. Suitable to control LED strip lights Domoticz example: ID=2301.7,OUT_DIMMER to configure IO7 as output with dimmer function. |
256+Port#-1 | 5 | OUT_BUZZER or OUT_FLASH (same behaviour) | In case the port supports OUT_BUZZER mode, it's possible to connect a piezo buzzer (without the oscillator inside!!) between this port and the next one (push-pull, 3.3V, 6.6V peak-to-peak) to get a 5KHz signal on buzzer. In case the port does not support OUT_BUZZER mode (Led, I/O, open-drain or relay output), the I/O can be used to supply a LED or a blinker. The Domoticz switch should be configured as Selector Switch: in this case the port will output 1 more short alerts to notify a status, followed by a 2s pause. Using Modbus version, the Port#-1 register value can be set to: 0 → buzzer/led/blinker OFF 1 → buzzer/led/blinker ON 2 → buzzer/led/blinker ON for 250ms 3 → buzzer/led/blinker ON for 500ms 4 → buzzer/led/blinker ON for 750ms ... 9 → buzzer/led/blinker ON for 2s 10 → 1 beep/flash, then 2s pause, forever 11 → 1 beep/flash, 2s pause, then OFF 12 → 1 beep/flash, 2s pause, for 2 times 13 → 1 beep/flash, 2s pause, for 3 times ... 19 → 1 beep/flash, 2s pause, for 9 times 20 → 2 beeps/flash, 2s pause, forever 21 → 2 beeps/flash, 2s pause, then OFF and so on... The same behaviour when using DCMD command to control a buzzer/led/blinker output. Please note that some I/O may need to have the INVERTED option set, to work as expected. Domoticz example: ID=2301.6,OUT_FLASH to configure port as Led/Buzzer sending pulses to notify a status. |
256+Port#-1 | 24 | OUT_BLIND |
Port configured to control a blind, in close direction. Next port will be automatically configured as blind in open direction. Ports OUT1 and OUT2 can directly be connected to 12V relay coils (if Vbus is 12-14V, or 24V relay coils if Vbus is 24V). Ports IN1..IN3 can be configured as OUT_BLIND, but in this case should be connected to relayboard that already have a transitors/optocouplers to drive relays. Domoticz example: ID=2301.1,OUT_BLIND to configure output as Motor DOWN/UP (next port will be used to supply the UP coil of the motor). |
256+Port#-1 | 3 | OUT_LEDSTATUS | Configure a LED port to show the device status (flashes when a frame is transmit to the RS485 bus) Domoticz example: ID=5101.a,OUT_LEDSTATUS to configure port 10 (0x0a in hex correspond to 10 in decimal) as LED status which flashes when a frame is transmitted. |
256+Port#-1 | 25 | OUT_ANALOG | Set output as analog, with 0-10V linear output. It can be used to control another electronic board with 0-10V or 1-10V input (light dimmer, heat pump power, linear valve, ....). The domotic controller will display a device with a slider, like dimmer, with values from 0 (=0V) to 100 (=10V). Using Domoticz, it's possible to create LUA or dzEvent automations that automatically change the output voltage according to some inputs (brightness, temperature, renewable power availability, ...): the DAC value can be set using the syntax commandArray['DEVICE_NAME']='Set Level 74'
to set the output voltage to 7.4V.Domoticz example: ID=2301.4,OUT_ANALOG to configure port as 0-10V analog output |
256+Port#-1 | 7 | IN_DIGITAL | Digital input, is On when the corresponding input is at high voltage level (open), and Off when the corresponding input is at GND (shorted). To inverted the logic (On when input is shorted to GND and Off when it's open) set the INVERTED option. Domoticz example: ID=2301.6,IN_DIGITAL,INVERTED to configure port 6 as digital input, inverted logig so the logic status is ON when port voltage is 0V and OFF when port voltage is high. |
256+Port#-1 | 11 | IN_DIGITAL_PULLDOWN | Digital input with microcontroller pulldown enabled: if no external pullup are enabled, the input is normally at 0V (logic 0) and goes to logic 1 when a positive voltage is applied (up to 30V for DomBus37, but should be no more than 5V with other modules). It's possible to invert the logic by setting the INVERTED option. Domoticz example: ID=3701.12,IN_DIGITAL_PULLDOWN to configure port 12 as digital input, ON when a positive voltage is applied to the port. |
256+Port#-1 | 8 | IN_ANALOG | Port configured as IN_ANALOG can be used to measure DC voltage, like battery voltage, bus voltage, thermistors and temperature sensors, .... The voltage is sampled every 15 seconds. On DomBusTH, one or more of the 4 input wires can be configured as analog inputs, 0-3V range, but please note that an internal 10k pullup resistor is connected to each input. Also, external resistive divider should be added to measure higher voltages, so the voltage at the input terminal block must be less or equal than 3.3V. On DomBus12 it's possible to use IO7, IO8 and IO9 ports as analog inputs. Also, it's possible to use IO1, IO2, IO3, IO4 ports as analog inputs, but in this case it's needed to open, using a cutter, the corresponding PCB jumper PU1-PU4 (that internally connect the input line with a 10k pullup resistor): for example, to use IO1 as analog input, the PU1 PCB jumper must be open. Analog voltage must not exceed the 0-3V range: if voltage range is higher, a resistive divider must be applied externally. On DomBus23 only IO1 and IO2 ports can be configured as analog inputs: only 0-3V range is supported, and a resistive divider must be externally connected to measure higher voltages. Other DomBus modules have ANALOG inputs: check the specification on the product page. Domoticz example: ID=2301.6,IN_ANALOG,A=0.000611393 to set port as analog input (with output value in the range 0-65535 corrisponding to 0V-3.3V) with the linear conversion using the specified A coefficient. |
256+Port#-1 | 9 | IN_TWINBUTTON | This is a method to connect two pushbuttons/switches to a single input, to get a UP/DOWN/STOP select switch. The two switches are connected together by a 10kOhm resistor, using the schema indicated in the application notes below. Ports on DomBus module must have an internal 10k pullup (always enabled, or enabled by a PCB jumper), and output value are: 0 → OFF (buttons not pushed) 10 → DOWN button 20 → UP button Domoticz example: ID=2301.6,IN_TWINBUTTON to configure the port as double pushbutton switch OFF/DOWN/UP. |
IN_COUNTER | Used to count pulses, max 16 pulses/second (57kW max using 1000pulses/kWh meter, or 28kW max using 2000pulses/kWh meter). This solution is perfect to count energy, gas, water, ...If TYPENAME=kWh is also specified in Description, a device with both energy and power will be created. Other options that can be set for this kind of device is OPPOSITE=dev to set the device counting energy in the opposite direction (import vs export), and DIVIDER=nnnn where nnnn is the number of pulses/kWh (default 1000, but can be 1666, 2000 or any reasonable value). Domoticz example: ID=2301.6,IN_COUNTER,typename=kWh,DIVIDER=1666,OPPOSITE=99 to configure the port as a energy meter (kWh), incremented every time one or more pulses are received; it goes to 0W when device with Unit=99 send one or more pulses. |
||
256+Port#-1 | 13 | DISTANCE | Used to connect the port to a ultrasonic distance sensor like JSN-SR04T, to get the distance in millimeters. DomBus modules support more than one distance sensor, with the trigger inputs connected together to a specific port. Each module has an echo output that should be connected to an input port of the module: 1 port for each module. Both trigger and echo ports should be configured as DISTANCE. Domoticz example: ID=1202.1,DISTANCE to configure the port as DISTANCE sensor. More information in the application notes and FAQ. |
A | For analog and distance sensors: used to compute the real value using the formula REAL_VALUE=A * VALUE_FROM_DOMBUS + B. Domoticz example: ID=2301.6,IN_ANALOG,A=0.00123,B=-10 to set port as analog input, and get an output value as 0.00123*VALUE-10 where VALUE=0-65535 corresponding to 0V-3.3V. |
||
B | For analog and distance sensors: used to compute the real value using the formula REAL_VALUE=A * VALUE_FROM_DOMBUS + B For temperature, used to calibrate the value using the formula REAL_TEMPERATURE=MEASURED_TEMPERATURE + B Domoticz example: ID=0101.3,DISTANCE,A=-0.1,B=165 to set the analog/distance port to get an output value computed as 165-0.1*VALUE. |
||
CAL | Used to calibrate the temperature and relative humidity sensors inside the DomBusTH module CAL=0 remove any calibration value. CAL=0.2 increase the temperature or humidity value by 0.2. CAL=-0.2 reduce the temperature and humidity value by 0.2 The calibration value is stored into non-volatile memory. Domoticz example: ID=5101.b,HUMIDITY,CAL=-2 to calibrate the sensor to get outputValue=measuredValue-2 |
||
FUNCTION | For analog input with internal 10k pullup (I/Os that can be configured as IN_TWINBUTTON) connected to a NTC thermistor, to convert the read analog value to a temperature. Supported types: FUNCTION=3950 for NTC with Bcoeff=3950 Example: IN_ANALOG,FUNCTION=3950,B=-0.3 to use 3950 type NTC 10k@25°C, and calibrate offset -0.3°C. First configure device as IN_ANALOG and then as IN_ANALOG,FUNCTION=3950 As FUNCTION parameter enable a conversion performed by the domotic controller (not inside the DomBus module), DCMD(Value:min:max) command can be added but min and max value should be the analog values in the range 0 (corresponding to input at 0V) and 65535 (corresponding to 3.3V) Domoticz example: ID=2301.6,IN_ANALOG,FUNCTION=3950 to set port as a NTC temperature sensor. |
||
DIVIDER | Used with IN_COUNTER ports to set how many pulses per unit of measure. For example, using energy meter with 2000 pulses/kWh, the option DIVIDER=2000 should be set; in case of water meter with 20000 pulses/m³, DIVIDER=20000 should be set. Domoticz example: ID=2301.6,IN_COUNTER,DIVIDER=1000 to get outputValue incremented every 1000 pulses. |
||
TYPENAME | Option to force the creation of a the specified Domoticz. For example, IN_COUNTER,TYPENAME=kWh to create a energy/power meter instead of a normal incremental counter, or IN_ANALOG,TYPENAME=Temperature,A=0.123,B=-50 to get an analog input that return a temperature using the linear equation Temperature=A*x+B where x is the analog value read Domoticz example: ID=2301.6,IN_COUNTER,TYPENAME=kWh to create a device type kWh. |
||
OPPOSITE | Used for kWh devices, measuring electric power and energy. Suppose to have a PowerMeter Import device, with Unit=98 (see Setup → Devices), measuring the power/energy from grid, and PowerMeter Export, with Unit=99, measuring the power/energy produced and fed to the grid. If these devices are connected to the pulse output of an energy meter, when a pulse is received from the Import device it means that exported power is 0, and vice-versa. This parameter is used to set what is the Unit number associated to the opposite counter. So, PowerMeter Import description must have IN_COUNTER,TYPENAME=kWh,OPPOSITE=99 and PowerMeter Export description IN_COUNTER,TYPENAME=kWh,OPPOSITE=98 Domoticz example: ID=2301.6,IN_COUNTER,TYPENAME=kWh,OPPOSITE=123 to get a energy meter with power goes to 0W when device with Unit=123 transmits a pulse. |
||
ADDR | EVSE: used to set the Modbus address of a DDS238-2 ZN/S energy meter. By default DDS238 has address=1 and baud rate 9600. Setting ADDR=2 to set the Modbus to the specified value. On DomBusEVSE module, address 2 is used to measure charging power/energy, and address 3 to measure grid power/energy. Valid range from 2 to 5. This parameter can be set only for the energy meter devices (EV Power, EV PF, Mx Import Energy, ... to change the Modbus address of energy meters that have address in the 2-5 range to another value) and for M1 Addr device (to change the address of energy meters with factory default address=1) Domoticz example: ID=e301.c,CUSTOM,TypeName=Text,ADDR=2 to set Modbus address of the energy meter to 2 |
||
EVMAXCURRENT | EVSE: set the max charging current, that normally is limited by the cable used to connect the vehicle to the charging station. Valid range from 6 to 36, default value is 16 Ampere. This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32 to set the max current (limited by EV cable and wirings) |
||
EVMAXPOWER | EVSE: maximum power that can be drained from the grid without any time limit (available power). Valid range from 1000 to 25000, default value 3300 Watt. This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600 to set the max contractual power from grid. |
||
EVMAXPOWER2 | EVSE: the highest power that can be drained from the grid, but only for a limited time. Valid range from 1000 to 25000, default value 0 (disabled). This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVMAXPOWER2=7620 to set the absolutely max power that must never be exceeded. |
||
EVMAXPOWERTIME | EVSE: time in second to charge the electric vehicle using EVMAXPOWER Watt from grid, before increasing power to EVMAXPOWER2. Valid range from 60 to 43200 seconds, default value 0 (disabled). This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVMAXPOWER2=7620,EVMAXPOWERTIME=1800,EVMAXPOWERTIME2=1800 to set time that EVSE module can keep the MAXPOWER and MAXPOWER2 |
||
EVMAXPOWERTIME2 | EVSE: time in second to charge the electric vehicle using EVMAXPOWER2 Watt from grid, before decreasing power to EVMAXPOWER. Valid range from 60 to 43200 seconds, default value 0 (disabled). This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVMAXPOWER2=7620,EVMAXPOWERTIME=1800,EVMAXPOWERTIME2=1800 to set time that EVSE module can keep the MAXPOWER and MAXPOWER2 |
||
EVSTARTPOWER | EVSE: minimum available power to start charging: the minimum current is 6A, but usually the On-Board Charger charges less current than what is set, so maybe 900W is sufficient. Please note that charging at a low current lead to a poor efficiency (e.g. 30% power loss). Valid range above 800, default value 1200 Watt. This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVSTARTPOWER=1500 to start charging only when at least 1500W are available |
||
EVSTOPTIME | EVSE: time in seconds after which the charging process is stopped if the available power is less than what is drained by the car with the minimum current (6A). This parameter is used to prevent that, expecially in SOLAR mode, the charging is ended if no power is available for a short time. Valid range from 5 to 600, default is 90 seconds. Time is internally reduced /5 in case that imported power from grid exceed the MAXPOWER parameter, to prevent disconnections. This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVSTARTPOWER=1500,EVSTOPTIME=150 to stop charging after 150s with no enough power available. |
||
EVAUTOSTART | EVSE: can be set to 0 or 1. 0 means that this function is disabled. 1 means that this function is enabled, and permit to restart automatically the last charging mode when the vehicle is plugged again to the wallbox. Default value is 1. This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVSTARTPOWER=1500,EVSTOPTIME=150,EVAUTOSTART=1 to start charging automatically when the vehicle is plugged. |
||
EVWAITTIME | EVSE: time to wait, in seconds, before updating the EV charge current again. By default this time is set in 7 seconds, because the SAE J1772 and IEC Standards state that On Board Charger have to adjust the power according to the value set by EVSE within 6 seconds. In case that an external grid power meter is used, with a long refresh time (more than 6 seconds), this parameter have to be set to the grid power refresh time + 1 or 2 seconds (to cover domotic controller delays). This parameter can be set only for the device named EV Mode Domoticz example: ID=e301.4,EVMAXCURRENT=32,EVMAXPOWER=6600,EVSTARTPOWER=1500,EVSTOPTIME=150,EVAUTOSTART=1,EVWAITTIME=12 to update charging current only after 12s since last update. |
||
DISABLE | Used to disable one or more ports: it can be usedful with large buses with more than 255 ports (devices), because Domoticz has a limit of max 255 devices for each bus. In this case it's possible to disable unused module ports by writing, in the Description of port 1, the list of disabled ports separated by colon, for example DISABLE=2:5:6:7:11 to disable ports 2,5,6,7,11:16 (11 corresponds with port .b in hex and 16 with port .10 in hex) of the current module. Port 1 can be never disabled. To enable a previosly disabled port, just edit the port 1 description for that module, removing the port from the list of DISABLE command: that port will be enabled again in 60 seconds (wait for 1 minute and reload the Domoticz panel). Domoticz example: ID=2301.1,OUT_RELAY_LP,DISABLE=8:9:10 to disable ports 8,9,10. |
||
DCMD | Dombus Command: through this keyword it's possible to set a command to send to the same or another module, when an event occurs. In this way, when an event occurs, the module send a command to a dombus module to execute an operation, and this work without the need of a Domoticz controller and without the need to configure Domoticz to manage this kind of actions. See the DCMD section below. Domoticz example: ID=e301.1,OUT_DIGITAL,DCMD(On)=3101.4:On,DCMD(Off)=3101.4:Off,DCMD(On)=0.12:On,DCMD(Off)=0.12:Off to enable a relay on DomBus module with hwaddr=3101 when charging is ON, and also enabling a scene on Domoticz during charging. |
||
DESCR | This is used in Domoticz to add a description or comment to the device. Please note that the comment cannot contain the comma character "," because commas are used to separate commands. For example the Domoticz description field of a ANALOG port can be something like: 12.7,IN_ANALOG,A=0.000553902,DESCR=description of the analog port without any comma; A is the conversion factor from 16bit value to voltage (36.3V max) |
This is an experimental function, undergoing testing and development, available on all DomBus modules, expept DomBus1
For each port it's possible to configure, through the Domoticz Description field, one or more DCMD commands.
DCMD is a command that is sent to the module itself or to another DomBus module, in response to an event, and more DCMD commands can be specified for the same event and port.
Also it's possible to send DCMD command to the domotica controller to activate, deactivate or toggle a scene/group; to get this feature please assure that:
The syntax is DCMD(Event:ValueLow:ValueHigh)=ModuleAddress.ModulePort:Command:Value
where ValueLow, ValueHigh, Value are optional parameters.
When ModuleAddress corresponds to the same module that we're editing, the command is executed locally, by the same module.
When ModuleAddress corresponds to another Dombus module, the command is sent by bus to that module. When ModuleAddress is 0, the command is sent to the controller to activate the scene/group with idx=ModulePort : please note that ModulePort should be in hex format, so if ModulePort=11 the scene/group with idx=17 will be activated.
Event | Description | Example |
---|---|---|
OFF | This even occurs when input goes OFF | DCMD(OFF)=13.1:OFF When input goes off, turns OFF also port 1 of module 13 |
ON | This even occurs when input goes ON |
DCMD(ON)=13.2:ON:90s |
PULSE | Input is pulsed ON for less than 0.5s | DCMD(Pulse)=13.3:TOGGLE When input is pulsed shortly, send command to module 13 port 3 to toggle it's output OFF->ON or vice versa |
PULSE1 | Input is pulsed ON for about 1s |
DCMD(Pulse1)=13.3:ON |
PULSE2 | Input is pulsed ON for about 2s |
DCMD(Pulse2)=13.3:OFF |
PULSE4 | Input is pulsed ON for about 4s |
DCMD(Pulse4)=13.4:ON:2h |
DIMMER | ||
VALUE | Sensor value is ≥ ValueLow and < ValueHigh Command is repeated every 30s if the comparison matches. |
DCMD(Value:0:20.5)=13.5:ON DCMD(Value:0:12.2)=31.7:ON DCMD(Value:0:100)=31.8:OFF |
Command | Description | Example |
---|---|---|
OFF | Turns output OFF. If the optional Value is specified, output will be OFF for the specified time, then returns ON | |
ON | Turns output ON. If the optional Value is specified, output will be ON for the specified time, then returns OFF | |
TOGGLE | Change state to the selected output. If the optional Value is specified, wait the specified time before toggling output | |
DIMMER |
Command | Description | Example |
---|---|---|
number | A number without any suffix should be multiplied by 31.25ms (seconds/32) | 1=31.25ms 3=93.75ms 16=500ms |
numberS | Number of seconds, from 1 to 3600 |
1s=1 second |
numberM |
Number of minutes, from 1 to 1440 | 1m=1 minute 10m=10 minutes 180m=3 hours |
numberH | Number of hours, from 1 to 43824 | 1h=1 hour 6h= 6 hours 72h=3 days |
numberD | Number of days, from 1 to 1826 |
1d=1 day |
IN_DIGITAL,INVERTED,
DCMD(Pulse)=0101.1:TOGGLE,
DCMD(Pulse1)=0101.2:ON:30m,
DCMD(Pulse2)=0101.2:OFF
IN_DIGITAL,INVERTED, DCMD(Pulse)=0.1:Toggle, DCMD(Pulse2)=0.2:On
In the description field of the temperature sensor we'll write
DCMD(Value:0:20.5)=0101.3:ON, (if temperature between 0 and 20.5°C, turns ON heater on output 3 of module 0x0101)
DCMD(Value:0:20.5)=0102.1:ON, (if temperature between 0 and 20.5°C, turns ON valve output 1 of module 0x0102)
DCMD(Value:20.8:50)=0101.3:OFF (turn OFF heater when temperature above 20.8°C)
DCMD(Value:20.8:50)=0102.1:OFF (turn OFF valve when temperature above 20.8°C)
Domoticz temperature sensor Description will be:
TEMPERATURE,
DCMD(Value:0:20.5)=0101.3:ON,
DCMD(Value:0:20.5)=0102.1:ON,
DCMD(Value:20.8:50)=0101.3:OFF,
DCMD(Value:20.8:50)=0102.1:OFF
A piezo buzzer (without oscillator) should be connected to IN3 and IN4, and IN3 should be configured as OUT_BUZZER.
Toggle ON/OFF group with idx=17 (0x11 in hex) with a short pulse, less than 0.5s: DCMD(Pulse)=0.11:Toggle
Create a short 500ms buzzer feedback...module address is 5101 and IN3 port is 5: DCMD(Pulse)=5101.5:On:2 where 2=2*250ms and can be increased up to 9*250ms. Then, specifying 10, 20, 30, and other multiple of 10, instead of emitting a short or long beep the buzzer produces N beeps. For example, if value is 20, 2 beeps are emitted, followed by 4s of pause, then other 2 beeps and so on.
Activate the scene with idx=16 (0x10 in hex) when the touch sensor is ON for 2s: DCMD(Pulse2)=0.10:On
In this case, also transmits a long buzzer alert, 1.5s: DCMD(Pulse2)=5101.5:On:6
Using RS485 specific cables it's possible to get almost 1km linear bus with several devices attached. Alternatively, it's possible to use 2 twisted pairs of cheap Cat6 UTP or STP cable, one twisted pair for data (A and B) and one for 12-24V power supply. Ideally, all devices should be connected using a linear bus topology, to get the lowest reflection/noise, and connect 100-150 Ohm resistor on the two ends, as illustrated in the Fig. 2. In practice, this is not important for common buildings.
At Raspberry/PC side, it's possible to use a cheap USB-RS485 adapter, if a serial port with RS485 driver is not already available.
Using DomBus modules it's possible to:
Click here if you need to write a microSD card with a clean updated Raspbian+Domoticz image optimized to extend SD life (minimizing writings), and with some addons (firewall, backup, libraries).
This procedure is not needed in case of a new Domoticz installation writing the SD as written above.
If Domoticz does not already include the DomBus plugin, type the following commands (from Linux root shell: type sudo su - to become root):
#install git, if not already installed
which git
if [ $? -ne 0 ]; then sudo apt install git; fi
#change to the domoticz directory / plugins
cd /home/pi/domoticz/plugins
#fetch the Python Plugin Manager (that can be used to install/upgrade other plugins, including Creasol DomBus)
git clone https://github.com/ycahome/pp-manager
#fetch Creasol Plugin
git clone https://github.com/CreasolTech/CreasolDomBus
#restart Domoticz daemon
service domoticz restart
After plugins installation and Domoticz restart, it's possible to add the Creasol DomBus hardware (Setup->Hardware , add new "dombus" hardware type "Creasol DomBus" and specify the serial device, normally /dev/ttyUSB0) and connect the DomBus device to the RS485 bus.
DomBus module is factory programmed with a default address indicated above, and only one port will be automatically added to the Switches panel of Domoticz. Enter the Switches panel, find the new device with the DomBus default address, click on Edit and add in the description ,HWADDR=0x0001 to set the new address to 0001, or specify another address of your choice. Reload the Switches panel to see all input/output/led ports of DomBusTH active.
With Domoticz, each DomBus port can be configured via the Domoticz device description: for example a port IN_DIGITAL normally is On when it's left unconnected, and Off when it's shorted to GND, but it's possible to invert this function specifying in the device description the parameter INVERTED, separated by a comma (,): IN_DIGITAL,INVERTED . Relay outputs can be configured writing in the description field OUT_DIGITAL or OUT_RELAY_LP: in the latter case, relay are internally managed to assure a low power consumption.
Please check the sections Ports capabilities and Ports parameters.
Ports that are not used can be disabled in Domoticz Setup → Devices clicking on the blue arrow of each useless port (device), but in case of a bus with almost 255 ports, it's suggested to disable the unused ports by using the DISABLE command:
1. suppose that DomBus module 0x0001 has ports 3,4,5,6,8 not used
2. in Domoticz Switches panel select port1 of that module ([0001.1] RL1)
3. click on Edit, and add in the Description field DISABLE=3:4:5:6:8 and click on Save.
In this way, the selected ports will be disabled and removed from the Devices list. With this solution it's possible to add more DomBus modules to the same bus, with up to 255 enabled ports.
In large buildings, it's a good practice to have more than one bus, to divide floors or areas.
cd /tmp
git clone https://github.com/CreasolTech/home-assistant-creasol-dombus.git
cp -a home-assistant-creasol-dombus/custom_components HADIR/config/
ha core restart
where HADIR is the Home Assistant root dir: in case of Hassio, use the command cp -a home-assistant-creasol-dombus/custom_components /config/ATTRS{devpath}=="1.5" ATTRS{idProduct}=="7523" ATTRS{idVendor}=="1a86"
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{devpath}=="1.5", SYMLINK+="ttyUSBdombus1"to set that the USB/RS485 adapter plugged to the USB port 1.5 should be named /dev/ttyUSBdombus1
-- script_time_example.lua : simple example script that write a message to Telegram channel/group if temperature is less than 5 commandArray={} dofile "script/lua/globalvariables.lua" -- read a file with some variables, including Telegram API key and ChatID dofile "script/lua/globalfunctions.lua" -- read a file with some functions if (tonumber(otherdevices['Temp_outdoor']) < 5) then telegramNotify("Low temperature: bring flowers inside") -- send message by Telegram end return commandArray
0 ⇒ OFF 1 ⇒ solid ON 2 ⇒ ON for 250ms 3 ⇒ ON for 500ms 4 ⇒ ON for 750ms ... 9 ⇒ ON for 2000ms 10 ⇒ 1 beep/flash followed by 2s pause, forever 11 ⇒ 1 beep/flash followed by 2s pause, only once 12 ⇒ 1 beep/flash followed by 2s pause, only twice 13 ⇒ 1 beep/flash followed by 2s pause, 3 times ... 19 ⇒ 1 beep/flash followed by 2s pause, 9 times 20 ⇒ 2 beeps/flashes followed by 2s pause, forever 21 ⇒ 2 beeps/flashes followed by 2s pause, only once 22 ⇒ 2 beeps/flashes followed by 2s pause, only twice and so on...
in Italy, if contractual power is 6kW, it's possible to drain 6kW+27% for max 90 minutes, then power must decrease below 6kW+10% for at least 90 minutes MaxPower2 (e.g. 7600 Watt) #################### ######### MaxPower (e.g. 6600 Watt) ##################################################################### ^ ^ ^ ^ Time start MaxPowerTime MaxPower2Time MaxPowerTime
Need help? join the DomBus channel on Telegram!
Esiste anche il Canale Telegram in Italiano DomBus_it!
You might also like