5/4/2023 0 Comments X10 xcommander and domocitzmath.ceil ( DimstandDelta / 14 * 22 )) commandArray = tostring ( uservariables - DimstandDelta ) end return commandArray math.ceil ( DimstandDelta / 14 * 22 )) commandArray = tostring ( uservariables + DimstandDelta ) elseif ( devicechanged = 'Set Level' and tonumber ( otherdevices_svalues ) < uservariables ) then DimstandDelta = uservariables - otherdevices_svalues os.execute ( 'sudo -u pi /home/pi/heyu-2.10/heyu dim i1 '. ~/domoticz/scripts/lua/script_device_a commandArray = if ( devicechanged = 'On' ) then os.execute ( 'sudo -u pi /home/pi/heyu-2.10/heyu on i1' ) elseif ( devicechanged = 'Off' ) then os.execute ( 'sudo -u pi /home/pi/heyu-2.10/heyu off i1' ) elseif ( devicechanged = 'Set Level' and tonumber ( otherdevices_svalues ) > uservariables ) then DimstandDelta = otherdevices_svalues - uservariables os.execute ( 'sudo -u pi /home/pi/heyu-2.10/heyu bright i1 '. I used this compiler to compile the software. The raspberry installation does not come with a compiler. This website will explain you how that works in more detail. Part 2: Enabling Domoticz to send X10 command using Heyu softwareįirst Heyu software needs to be installed on the computer. If you have multiple USB devices please also read the page for persistent USB devices on this wiki. The serial to USB converter delivered with the CM11a is supported by the raspberry PI already. The connnection to the computer needa to be done with a serial to USB converter. The CM11a was sold under various brand names and with various powerline connections. Like always before doing an installation on a live system make a backup of the domoticz.db and better also a copy of the whole SD card (Image) before starting. I have got it workling together with a Raspberry PI. The CM11a is not supported from Domoticz directly but by following the below explanation it works nicely. The third part enables Domoticz to listen to commands that are send over the powerlines by X10 modules. The second part of this page is to enable Domoticz to send X10 commands over the powerlines with the CM11a module. The purpose of the the first part is to connect the hardware. 5 Part 3: Enabling Domoticz to listen to X10 command using Heyu software.4 Part 2: Enabling Domoticz to send X10 command using Heyu software.Register a sensors to Use binary light for test purposes. Send the sketch version information to the gateway and Controller Irrecv.enableIRIn() // Start the ir receiver So i upload this sketch in ir sensor : // Enable debug prints Have a look at the Wall light sketch for an friend, I'm embarrassed, answer in forum In your sketch you can translate the dimmer values to differenct actions. Now when you press a selector button it switches the dimmer value. I deliberately did not set "level 1", because this translates to "0" and is associated with the off state in my case (room light)įor the copycats (don't forget to include your own values): "Idx" is the dimmer device index from the previous step.Ī maximum of 10 switch values can be assigned You need to put your own domoticz URL/IP and port number in there. The commands here can be pretty much anything but here I used the Domoticz JSON command to set the Dimmer to one of the 16 possible states (Yes, a dimmer can only asume 16 states). "Edit" the newly created Selector switch and for each of the selector states attach a command to be executed.
0 Comments
Leave a Reply. |