With RPi_utils I found the code of my old KaKu/CoCo transmitter and use these to switch the lights on and off in domoticz with
script://///home/pi//433Utils/RPi_utils//codesend **code**
In domoticz I created 2 switches and a dusk sensor, the switches are working and even with sunset or sunrise, but my dusk sensor seems death in domoticz When I run an py script then I see it switching the GPIO4 between 0 and 1. But my question is how can I use this in domoticz, I tried it with Blocky, (not successfully) and with lua script:
commandArray = {}
if (devicechanged[lichtsensor] == ‘0’) -- also tried 'On'
then
print( ‘het is donker, lampen aan’) -- it’s dark, lights on
commandArray['autoaanuit']= ‘On’
end
if (devicechanged[lichtsensor] == ‘1’) --also tried 'Off'
then
print( ‘het is licht, lampen uit’)
commandArray['autoaanuit']= ‘Off’
end
return commandArray
also tried a lot of other examples from this forum, but nothing seems to work, what do I do wrong??
--lichtsensor = my dusk sensor name
hardware-setup
name: lichtsensor
type: raspberry gpio port
data timeout: disabled
--autoaanuit name of my dusk sensor in switches
Switches-setup:
hardware: lichtsensor
name: autoaanuit
switch type: dusk sensor
type: GPIO
GPIO: gpio4 (GPIO. 7) on pin 7(INPUT)
On script: script://///home/pi//433Utils/RPi_utils//codesend **code*1
Off script: script://///home/pi//433Utils/RPi_utils//codesend **code*0
What is it that i'm doing wrong or forgot in this, who can help me with a working script/blocky example.
this is my sensor: only VCC GND AND DO, no analoge output.

Thanks!!