I'm Jerome from Belgium.
I have a "Niko Home Control" (NHC) system in my home but the possibilities are limited...

I would like to control shutters with "Niko Home Control" and "Daikin altherma Heatpump" with RPi GPIO to limit overheat of my home. But the sun heat the home most of days and it'snt interesting to close the shutters always...
In my project I see the oportunities to use Domoticz to control the temperature part of the home (not possible easily with Niko Home Control)
But...
I would like to show the "Niko Home control" device like Hardware/devices in Domoticz.
I already do some code in Python to control one or more output easily. I can use "dummies" hardware to control them but It'll be better to add them like hardware.
I'm newbies in Domoticz, I look at source code but I don't find hardware to use like a base to do it.
The example here above turn off the light with id=7
The NHC system are "easily" controlable by sending the command by TCP in JSON format.
I already have PHP code to list (return JSON) the peripherals present on the NHC system.
Python 3.x code example
Code: Select all
import socket
TCP_IP = '192.168.0.26'
TCP_PORT = 8000
BUFFER_SIZE = 1024
MESSAGE = '{"cmd":"executeactions","id":"7","value1":"0"}'
//print (MESSAGE)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send(MESSAGE.encode('utf-8'))
data = s.recv(BUFFER_SIZE)
s.close()
print ("received data:", data.decode('utf-8'))
Some ideas, hardware use like base for starting script ?
Thanks in advance and sorry for my approximate english !
Jerome