Creasol DomBus12 is a compact module, 40x30x11mm, with 9 configurable inputs/outputs.
It can be connected to the Domoticz controller by a RS485 serial bus (4 wires, 2 for 12/24V power supply, and 2 for data at 115200bps).

As other DomBus devices, DomBus12 is designed to consume low power, be reliable, fully configurable and easy to use. Each port is fully configurable, e.g. as analog or digital input, twinbutton (double button), counter, buzzer,  NTC 10k, ... 2 ports may be used as open-drain output, to activate 2 external relays or LEDs.

 

Creasol DomBus12 module for domoticz home automation system, with 9 configurable GPIOCreasol DomBus12 - Input module for Domoticz home automation system

 

Input module for Domoticz, with 13 wires disconnectable cable

Features

  • 4 configurable I/Os, each one can be set as analog/digital input, twinbutton input, counter, digital output (can be connected to external relay board within relay driver), distance sensor
  • 2 configurable I/Os, each one can be set as open-drain output (to be connected to external relay), blind output (to be connected to external relay), low power LED dimmer, analog/digital input/distance sensor: to set IO5 and/or IO6 as input the PCB jumper ROx must be opened (using a cutter) and RIx must be shorted (with a solder ball).
  • 3 configurable I/Os, each one can be set as analog/digital inputs, counter, buzzer outputs, blind outputs (to be connected to external relay board), LED strip dimmer (to be connected to external mosfet)
  • 7.5-35Vdc power supply (internally regulated by a switching mode power supply circuitry that minimize power consumption and dissipation)
  • low power consumption: 0.7mA stand-by current at 12V (10mW)
  • 115200 bps RS485 bus (max length: 1km)

Warnings

  • Do not connect high voltage sources or loads to the DomBus12 wires: this device is designed to work with low voltage I/Os.
  • Use a 4 wires shielded cable for the bus, using two lines to feed power supply (12 or 24Vdc) protected by a fuse.
  • To reduce noise and reflections on the bus, enable the termination resistor (shorting Rbus PCB jumper) on the two furthest ends of the bus.

DomBus12 Ports capabilities

Default address: 0xff12

Port# Name Capabilities Default configuration Description
1 IO1 IN_DIGITAL, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER, OUT_DIGITAL,DISTANCE IN_TWINBUTTON Input, with optional pullup (pcb jumper). Can be used also for NTC thermistor. If connected to a single pushbutton switch or an alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).
2 IO2 IN_DIGITAL, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER, OUT_DIGITAL,DISTANCE IN_TWINBUTTON Input, with optional pullup (pcb jumper). Can be used also for NTC thermistor. If connected to a single pushbutton switch or an alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).
3 IO3 IN_DIGITAL, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER, OUT_DIGITAL,DISTANCE IN_TWINBUTTON Input, with optional pullup (pcb jumper). Can be used also for NTC thermistor. If connected to a single pushbutton switch or an alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).
4 IO4 IN_DIGITAL, IN_ANALOG, IN_TWINBUTTON, IN_COUNTER, OUT_DIGITAL,DISTANCE IN_TWINBUTTON

Input, with optional pullup (pcb jumper). Can be used also for NTC thermistor. If connected to a single pushbutton switch or an alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).

5 IO5 IN_DIGITAL, IN_ANALOG, OUT_DIGITAL, OUT_RELAY_LP, OUT_BLIND, OUT_DIMMER, DISTANCE OUT_DIGITAL Open-drain output, 40V 100mA capability, suitable to be connected to an external relay coil, small led strip, other electronic device inputs that are active when shorted to GND, ... This kind of port is able only to pull down the output, to GND, and have a varistor protecting output from going above 38-40V.
It's designed to be connected to the DomRelay2 module (2 relay outputs)
With 2 pcb jumpers it's possibile to bypass mosfet and use this port as normal input/output.
6 IO6 IN_DIGITAL, IN_ANALOG, OUT_DIGITAL, OUT_RELAY_LP, OUT_BLIND, OUT_DIMMER, DISTANCE OUT_DIGITAL Open-drain output, 40V 100mA capability, suitable to be connected to an external relay coil, small led strip, other electronic device inputs that are active when shorted to GND, ... This kind of port is able only to pull down the output, to GND, and have a varistor protecting output from going above 38-40V.
It's designed to be connected to the DomRelay2 module (2 relay outputs)
With 2 pcb jumpers it's possibile to bypass mosfet and use this port as normal input/output.
7 IO7 IN_DIGITAL, IN_ANALOG, IN_COUNTER, OUT_DIGITAL,  OUT_BLIND, OUT_DIMMER, DISTANCE IN_DIGITAL Input, with optional 150 ohm resistor that can be enabled by pcb jumper to drive external buzzer or relay board within relay driver. If connected to a single pushbutton switch or alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).
If configured as DISTANCE, this port acts as a signal for the trigger inputs of every distance sensor connected.
8 IO8 IN_DIGITAL, IN_ANALOG, IN_COUNTER, OUT_DIGITAL,  OUT_BLIND, OUT_DIMMER, OUT_BUZZER IN_DIGITAL Input, with optional 150 ohm resistor that can be enabled by pcb jumper to drive external buzzer or relay board within relay driver. If connected to a single pushbutton switch or alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).
9 IO9 IN_DIGITAL, IN_ANALOG, IN_COUNTER, OUT_DIGITAL,  OUT_BLIND, OUT_DIMMER, OUT_BUZZER IN_DIGITAL Input, with optional 150 ohm resistor that can be enabled by pcb jumper to drive external buzzer or relay board within relay driver. If connected to a single pushbutton switch or alarm sensor, the common is GND (when switch is ON, it have to short the port to GND).

(1): can be used as BLIND output, to open a blind/curtain, but only the previous port can be configured in Domoticz as OUT_BLIND because, when configured as OUT_BLIND, DomBus device automatically configure the next port to drive a relay in open direction.

DomBus12 Modbus RTU capabilities (for the Modbus version)

At power-on, the module shows on red LED the current Modbus slave address (register address=8192) in decimal format, on green LED the serial baudrate (reg. 8193), and finally on red LED the serial parity (reg. 8194).
If a value is zero, a long flash is emitted.

For example, if reg(8192)=18, reg(8193)=0, reg(8194)=0, at power the following led flashes will be shown:
1 red flashes, pause, 8 red flashes (slave address= 0x12 = 18), pause, 1 long green flash (reg(8193)=0 => baudrate=115200bps), pause, 1 long red flash (reg(8194)=0 => parity=None).

Device will be operative only when address/baudrate/parity parameters have been shown: then module will accept commands by Modbus RTU, and periodically shows output status for all ports, from 1 to max port: green flash means that port status is Off, red flash means that port is On.

Default slave address: 18 (0x12)

Addr Name Values Description
0 IO1 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, distance sensor.
1 IO2 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, distance sensor.
2 IO3 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, distance sensor.
3 IO4 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, distance sensor.
4 IO5 0=OFF (floating), 1=ON (output internally connected to GND), 2-65279=ON for the specified time (see below). OpenDrain output that sink current (to GND): can be connected to a 5-24V relay coil, or to a led strip with 100mA max current.
Can be configured as DIMMER output (0-100% with 5% step), or as input. See DomBus Ports capabilities table above, distance sensor.
5 IO6 0=OFF (floating), 1=ON (output internally connected to GND), 2-65279=ON for the specified time (see below). OpenDrain output that sink current (to GND): can be connected to a 5-24V relay coil, or to a led strip with 100mA max current.
Can be configured as DIMMER output (0-100% with 5% step), or as input. See DomBus Ports capabilities table above, distance sensor.
6 IO7 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, flash, buzzer, distance sensor (trigger output to all distance sensors).
7 IO8 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, flash, buzzer.
8 IO9 0=OFF (input externally pulled/shorted to GND), 1=ON (input externally disconnected, with internal pullup to 3.3V). Logic can be inverted with the INVERTED option (to be set on address 512+port) Digital input, with internal pullup. Can be configured as analog input, twinbutton, digital output, flash, buzzer.
255 All ports bitmask: 1=> IO1, 2=>IO2, 3=>IO3 ...

This address is used to set ON or OFF (no timer function) all outputs using a short command, by accumulating the bitmask for each output that should be ON: for example
if Value=0 all outputs will be OFF
if Value=48 (0b00110000, in binary), IO5 and IO6 will be activated.

256-267 Port config 1=OUT_DIGITAL, 2=OUT_RELAY_LP, ...
Command used to configure port 1 (256), port 2 (257), ... as OUT_DIGITAL or OUT_RELAY_LP (low power consumption relay) or other value (see table below)
512-523 Port option 0=NORMAL, 1=INVERTED (output normally ON, or input is ON when port voltage is 0V) Set port option. If set to 1, output stays ON after boot until the port is asserted (then relays goes OFF). For inputs, setting INVERTED the port value is ON (1) when input voltage is 0V, OFF when input is left open with internal pullhigh enabled.
8192 Slave Address 1-247 Permits to change the slave address of the module, so it's possible to add other modules to the same bus
8193 Serial bitrate 0=115200bps, 1=57600, 2=38400, 3=19200, 4=9600, 5=4800, 6=2400, 7=1200bps Serial speed, default 115200 bps 8,n,1
8194 Serial parity 0=None, 1=Even, 2=Odd Serial parity, default none (115200 bps 8,n,1)
8198 Revision, major Read only Get firmware version, major number. For example "02" means that revision is "02XX" where XX defined by parameter 8199
8199 Revision, minor Read only Get firmware version, minor number. For example "h1" means that revision is "XXh1" where XX defined by parameter 8198

It's possible to activate one or more outputs for a certain amount of time (monostable/timer output) as indicated in the table. The parameter corresponding to the needed time can be computed using the following rules:

From 0 to 60s => 31.25ms resolution 2=62.5ms, 3=93.75ms, ... 1920=60s => value=time_in_milliseconds/31.5
From 1m to 1h with 1s resolution 1921=61s, 3540+1920=5460=1h => value=(time_in_seconds-60)+1920
From 1h to 1d with 1m resolution 5461=1h+1m, 1380+5460=6840=24h => value=(time_in_minutes-60)+5460
From 1d to 1500 days with 1h resolution 6841=25h, 6842=26h, and so on => value=(time_in_hours-24)+6840

The following tables show some Modbus commands examples.

Slave Addr Func. Code Reg.Addr Reg.Value Frame Description
54 06 8192 1 [36][06][20][00][00][01][xx][xx] Change slave address from 54 (0x36) to 1
01 06 8193 4 [01][06][20][01][00][04][D2][09] Set serial speed to 9600bps
01 06 8194 1 [01][06][20][02][00][01][E2][0A] Set even parity
49 10 8192 1,4,1 [31][10][20][00][00][03][06][00][01][00][04][00][01][B1][71] With a single command, set slave address to 1, serial speed to 9600bps, even parity. Original modules address was 49 (0x31) in this example.
01 06 0 65280 [01][06][00][00][FF][00][C8][3A] Activate RL1 output forever (65280=0xff00)
01 06 1 960 [01][06][00][01][03][C0][D8][AA] Activate RL2 for 960/32=30s
01 06 255 0 [01][06][00][FF][00][00][B9][FA] Disable all outputs (Reg.Addr=255)
01 10 0 32,0,0,65280 [31][10][00][00][00][04][08][00][20][00][00][00][00][FF][00][E6][5C] Set RL1 On for 1s (32), RL2 Off, RL3 Off, RL4 On - Max 10 registers can be set in one command
01 03 255 1 [01][03][00][FF][00][01][B4][3A] Read a 16bit value with ports status. For example if returned value is 0xd1 (0b11010001), output status is:
RL8=On, RL7=On, RL6=Off, RL5=On, RL4=Off, RL3=Off, RL2=Off, RL1=On
01 03 8198 2 [01][03][20][06][00][02][2F][CA] Read 4 bytes within module version. For example, if returned value is <30><32><68><31> (in hex format), the corresponding ASCII value is "02h1" (Firmware 02h1)
01 0F 0 8,1,0xd1 [01][0F][00][00][00][08][01][D1][3E][C9] Set coil status to 0xd1 (0b11010001), activating RL8, RL7, RL5, RL1 and disabling other relays
01 01 0 8 [01][01][00][00][00][08][3D][CC] Read coil status. If returned value is 0xd1 (0b11010001), it means that RL8, RL7, RL5 and RL1 are On

Modbus protocol can be tested easily using a modbus program, like mbpoll for Linux:

mbpoll -v -m rtu -0 -1 -a1 -b115200 -Pnone -r 0 /dev/ttyUSB0 32 0 64 128 0 0 0 65280

to activate RL1 for 1s, R3 for 2s, RL4 for 4s and RL8 forever.

mbpoll -v -m rtu -0 -1 -a1 -b115200 -Pnone -r 255 -c 1 /dev/ttyUSB0

to read all port states.

Configuring IO5 and/or IO6 as input

IO5 and IO6 by default are configured as open-drain outputs: to configure those ports as input (to connect for example an external switch, a magnetic contact sensor or PIR, ...) a simple hardware modification have to be made, by opening the corresponding ROx pcb jumper (using a cutter to cut the small trace between the jumper pads) and shorting the corresponding RIx pcb jumper (using a solder iron with a small quantity of solder wire to make a short circuit).
For example, to set IO5 as input, open RO5 using a cutter, and make a short circuit on RI5 pads. Then, that port can be configured by software as digital or analog input by writing, in the Domoticz description, IN_DIGITAL or IN_ANALOG.

Using input ports to read external DC voltages

Voltages applied to a DomBus module input must be in the range 0-3.3Vdc, so an external resistive partition should be applied to measure higher voltage.
For example, to monitor a 12V voltage, a resistive partition with 100k and 22k can be used: in this case max applied voltage = 3.3 / 22k * (100k + 22k) = 18.3V and the A constant used in the domotic controller to get the real voltage is calculated as 18.3/65535=0.00027924
Please note that analog voltage can be applied only to module ports without the 10k pullup resistor: in DomBus12 IO7-IO9 can be used without any modification, IO1-IO4 can be used opening with a cutter the corresponding PCB jumper, and IO5-IO6 can be used configuring their jumpers in input mode (opening ROn and shorting RIn with the solder iron).
Take care to measure voltages only on devices that share the same ground (GND) of the DomBus network!

Using input ports to read temperatures

DomBus modules have the ability to read temperature by using NTC sensors with 10k resistance @25°C and B=3950 coefficient.
NTC should be connected to inputs that already have the internal 10k pullup resistor, otherwise an external 10k resistor must be applied. Connect NTC sensor between input and GND.

Setting IN_ANALOG,FUNCTION=3950 the module port is configured in analog mode, and DomBus driver will convert the read value to the temperature value in °C.

Waterproof ultrasonic distance sensors

Up to 6 ultrasonic distance sensors, like JSN-SR04T, can be connected to DomBus12: echo output should be connected to one of the ports IO1, IO2, IO3, IO4, IO5, IO6 , and trigger input of all sensors should be connected to IO7 port.
Please check the specific page about using ultrasonic distance sensor with DomBus domotic modules.

Application notes

DomBus12 + DomRelay2 used to check the rainwater tank level, measure temperature by a waterproof NTC, start irrigation pump and lights, check garage alarm sensors

In this example the Home Assistant controller is used to control the versatile DomBus12 module placed inside a garage to control both garage and vegetable garden.
Another waterproof NTC sensor can also be added to measure the rainwater temperature (in the tank).

More info on the DomBus + Home Assistant page

DomBus12 used with Home Assistant to manage irrigation and garage, including rainwater tank level measuring

Using DomBus12 to control two 230V devices, using the additiona module DomRelay2  (with 2 relays)

Just connect the two open-drain outputs to the 2-relays module by any type of cable (for example a standard 4x0.22mm²).

These outputs can be configured as OUT_DIGITAL or, better, as OUT_RELAY_LP: in this case the relay power consumption will be 1/3 or less.

Using DomRelay2 relays module with DomBus12 to activate 230V loads

 

Connecting Eastron SDM230 to DomBus12 to measure import and export energy/power on Domoticz, or DDS238-2 to measure imported power/energy

Many energy meters, like Eastron SDM230, provide 2 pulse outputs to count the import and export energy, 1 pulse every Wh (1000 pulses per kWh). More info in the Energy Meter page.

S0 or modbus power and energy meters with domoticz

powerMetersUsing DomBus12, DomBus23, DomBusTH, DomBus32 or DomBus37 it's very easy to read the pulses from energy meters, compute the instant power and get two devices in Domoticz that show the usage and return power, usage and return total energy and graphs. Below the instructions that refer to Eastron SDM230 energy meter: similar procedure for any other energy meter with pulse outputs, like DDS238 energy meter.

  1. connect the pulse outputs to any available I/O, for example IO8 and IO9 for DomBus12, IO1 and IO2 for DomBusTH or DomBus23 or DomBus32 or DomBus37.  The SDM230 common terminal block should be connected to GND (0V). Other energy meters may have output S0+ that should be connected to the DomBus I/O and S0- to GND.
  2. configure Pulse1 output, on SDM230, as EXP kWh (check the manual to know how to do that); Pulse2 is pre-configured as IMP kWh (measure the energy imported from grid)
  3. configure the Domoticz device connected to Pulse2: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON (the default value) with IN_COUNTER,TYPENAME=kWh  and save. Please note that kWh is CASE SENSITIVE!
    Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Import), and select Usage type.
  4. if pEnergy Power Meter Devices in Domoticzroduced energy should be measured, configure the Domoticz device connected to Pulse1 as before: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON with IN_COUNTER,TYPENAME=kWh and save.
    Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Export), and select Return type.
  5. In case of both import and export devices are created, it's needed to specify on Import device the Unit number of the Export device, and vice versa. So, select Setup -> Devices and write down the Unit number corresponding to Import (for example 98), and Export device (for example 99), then go to Utility panel, edit Import device and add to the description ,OPPOSITE=99 (Unit of the Export device) and save; edit Export device and add to the description ,OPPOSITE=98 (Unit of the Import device) and save. In this way, when a pulse is received on Import device, the power on Export device will be immediately set to 0, and vice versa, when a pulse is received on Export device, the power on Import device will be set to 0.

In case that power should be measured in a single way (unidirectional), DDS238-2 can be used (it's cheaper than SDM230!) and it's S0 output (pulsed) should be connected to a DomBus module input. As DDS238-2 generates 2000 pulses/kWh, the DomBus device should be configured writing in the Description field IN_COUNTER,TYPENAME=kWh,DIVIDER=2000

Domoticz needs up to 5 minutes before updating the energy counter correctly.

Domoticz import and export devices using DomBus modules

Domoticz script the script_device_power

Installing the files script_device_power.lua  and config_power.lua provided on GitHub into the scripts/lua directory of Domoticz, it's possible to add the following functions to Domoticz:

  1. power outage detect => turns on Leds (and other devices) in case of blackout (power failure)
  2. import and export power displaying, through red/green leds on DomBusTH (red led flashes 1 time if import power <1kW, 2 times if <2kW, ... green led flashes 1 time if export power <1kW, 2 times if power < 2kW, ....)
  3. in case of high power usage, program heat pump to work at lower level, or disconnect loads to prevent power disconnect. In case there are not any load that can be disconnect, send alert through leds/buzzer/siren, and send alert by Telegram
  4. automatically enable loads in case of extra power from renewable sources, to increase the own-consuming: for example activate an electric heater if temperature is below a level and available power is greater than heater power

Some functions that can be activated with the domoticz script_device_power.lua and DomBus modules

#from linux shell, type the following commands (copy and paste): lines starting with # are comments, and can be ignored
#become root
sudo su -
#enter domoticz directory /scripts/lua
cd ~pi/Domoticz/scripts/lua
if [ -d domoticz_lua_scripts ]; then
cd domoticz_lua_scripts
#update domoticz_lua_script local repository
git pull
cd ..
else
which git
if [ $? -ne 0 ]; then
#install git
apt install git
fi
#download domoticz_lua_scripts repository with all scripts
git clone https://github.com/CreasolTech/domoticz_lua_scripts.git
fi
cp -i domoticz_lua_scripts/script_device_power.lua domoticz_lua_scripts/config_power.lua .
if [ ! -r globalvariables.lua ]; then cp domoticz_lua_scripts/globalvariables.lua . ; fi
if [ ! -r globalfunctions.lua ]; then cp domoticz_lua_scripts/globalfunctions.lua . ; fi
#now edit config file
nano config_power.lu

and adjust the information in the configuration file to match your home automation system.

Connecting a water meter or gas meter to Domoticz

Water and gas meter usually have an optoinsulated output that generate a pulse every 0.NNN m³.

Connecting that output to an I/O input of DomBus12, or DomBus23 or DomBusTH, and common output to GND, it's possible to get an incremental counter in Domoticz measuring water, gas, and anything else: counter divider, meter offset and unity of measure can be specified in Domoticz.

The I/O device connected to the meter should be configured in this way: click Edit on the domoticz device, write the appropriate name (for example Water_Meter), replace the current device type (e.g. IN_DIGITAL) in the Description field with IN_COUNTER and save: the device will be moved to the Utility panel and is ready to count pulses.

Using DomBus12 module to control 2x 230V loads by using 2 buttons, 4 magnetic contact sensors and 1 PIR

The following schema shows how to use this home automation module to control some alarm sensors (PIR, to detect movements inside a room, and 4 magnetic contact sensors applied to windows, doors and blinds, to detect the open state and transition), and also command 2 loads (light and dehumidifier, for example) by using the additional DomRelay2 board (within 2 relays) placed near the loads and connected to DomBus12 by a small wire cable.

Creasol DomBus12 domoticz module that control 2 loads (220V) by 2 buttons and 5 alarm sensors

Both DomBus12 and DomRelay2 are very small modules that can fit everywhere.

The two buttons are connected together by a 4k7 resistor and connected to a single input wire: this configuration is called "twinbutton" and permits to use 2 buttons for each module input, and is normally used by double buttons with the function UP/DOWN (applied to roller shutters, for example) or ON/OFF.

DomBus12, DomBus23, DomBus31 and DomBusTH have also the possibility to send command directly to other devices of the same family (and also to itsself), with the following gains:

  1. very easy configuration (don't need to configure the controller); for example it's possible to configure a button to activate a load, writing the command on the device description like shown below
  2. up to 8 commands are supported for each input/sensor
  3. these commands are received and managed by DomBus modules without any latency introduced by the controller
  4. commands work also in the case that the controller is down

Example: module address = 1201, with 2 buttons connected to port 1 and configured as IN_TWINBUTTON, with the following functions:

Short pulse on DOWN button to get light (connected to port 6 of module 1201) ON for 120s: DCMD(Pulse)=1201.6:ON:120s

2s pulse on DOWN button to toggle the same light ON/OFF without any timer: DCMD(Pulse2)=1201.6:TOGGLE

Short pulse on UP button to swith the dehumidifier (connected to port 5 of module 1201) ON for 2 hours: DCMD(Pulse)=1201.5:ON:2h

1s pulse to switch dehumidifer OFF: DCMD(Pulse1)=1201.5:OFF

To configure the port 1 of module 1201 in this way it's sufficient to edit the port 1 device in Domoticz, and write in the description all commands above:

IN_TWINBUTTON,DCMD(Pulse)=1201.6:ON:120s,DCMD(Pulse2)=1201.6:TOGGLE,DCMD(Pulse)=1201.5:ON:2h,DCMD(Pulse1)=1201.5:OFF

Then light and dehumidifier will work even if Domoticz is offline.

DomBus12 connected to one or more temperature sensors, in a greenhouse

DomBus12, as like as other DomBus modules with analog inputs and 10k pullup resistors, can be connected to NTC thermistors to measure temperature, using NTC 10k 3950 type sensor that are very common and cheap. Also, they are available in sealed/waterproof version, with 2 wires cable that can be extended for 50-100m distance using common alarm cable 2x0.22mm² + shield; using a single 4x0.22mm²+shield cable it's possible to connect 4 different temperature sensors.

The diagram below shows DomBus12 module with 4 temperature sensors connected on IO1-4, a remote double relay module DomRelay2 connected to IO5-6, and 2 pushbuttons to IO8-9.
I/O device connected to the NTC temperature sensor should be configured, in Domoticz, as IN_ANALOG,FUNCTION=3950 and also it's possible to add an offset to compensate any temperature error, for example IN_ANALOG,FUNCTION=3950,B=0.2 if the real temperature is 0.2°C over the measured temperature.

DomBus12 domotic module used in a green house to measure temperature and activate ventilation and/or heater.

 

Connecting DomBus12 to 9 NTC thermistors

Connecting up to 9 NTC temperature sensors to DomBus12

DomBus12 has 4 inputs that can be configured as IN_DIGITAL,FUNCTION=3950 and connected to NTC thermistors, 10k @25°C with 3950 constant: in this way it's possible to measure up to 4 fluid or air temperatures.
If more NTC sensors should be connected, it's possible to do an hardware modification to get up to 9 NTC temperature sensors connected:

  1. a wire should be soldered to the pad indicated by the red arrow, to carry 3.3V outside
  2. connect 10k 3950 NTC thermistor between IOx and GND, and a 10k resistor between IOx and 3.3V wire, where x=7-9
  3. if 7 NTC thermistors are not sufficient, open ROx PCB jumpers, short RIx PCB jumpers by a soldering a tin ball, and connect 10k 3950 NTC thermistor between IOx and GND, and a 10k resistor between IOx and 3.3V wire, where x=5-6