This is an unofficial integration of the Grenton system with the Home Assistant.
If you like what I do, buy me a coffee
!
- Copy the folder
grenton_objects
to thecustom_components
folder in your Home Assistant. Create the folder if you don't have it. You can use the Visual Studio Code add-on to create the folder and copy the files.
- Create a
HTTPListener
virtual object on GateHTTP namedHA_Listener_Integration
and configure it as follows:
- Create a script named
HA_Integration_Script
and attach it to the OnRequest event of the virtual object.
local reqJson = GATE_HTTP->HA_Listener_Integration->RequestBody
local code = 400
local resp = { g_status = "Grenton script ERROR" }
if reqJson.command or reqJson.status then
local results = {}
for key, value in pairs(reqJson) do
logDebug("HA integration command >> " .. value)
results[key] = load(value)()
end
resp = { g_status = "OK" }
for key, result in pairs(results) do
resp[key] = result
end
code = 200
end
GATE_HTTP->HA_Listener_Integration->SetStatusCode(code)
GATE_HTTP->HA_Listener_Integration->SetResponseBody(resp)
GATE_HTTP->HA_Listener_Integration->SendResponse()
NOTE! Pay attention to the name of the GATE and the Object.
- Add your Grenton objects to the Home Assistant. Example:
light:
- platform: grenton_objects
name: "Bedroom Lamp"
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ZWA8272
- platform: grenton_objects
name: "Kitchen Lamp"
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ZWA8272
where:
-
api_endpoint
- is your GateHTTP IP and HTTPListener patch -
grenton_id
is copied from the Id section in the Grenton object properties window
- Send configuration to the Grenton Gate HTTP, restart HomeAssistant, and test your new objects in your Dashboard!
The data update in Home Assistant occurs automatically every 30 seconds.
Add your objects to the configuration.yaml
file.
- IO MODULE 8/8 DIN
- IO MODULE 2/2 FM
- RELAY X2 DIN
- RELAY X4 DIN
- RELAY Z-WAVE
- RELAY WI-FI
switch:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->DOU8272
name: "Kitchen Radio Switch"
- IO MODULE 8/8 DIN
- IO MODULE 2/2 FM
- RELAY X2 DIN
- RELAY X4 DIN
- RELAY Z-WAVE
- RELAY WI-FI
light:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->DOU8272
name: "Bedroom Lamp"
- DIMMER DIN
- DIMMER FM
light:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->DIM8272
name: "Bedroom Dimmer"
- LED RGBW Z-WAVE (SINGLE ZWAVE_LED OBJECT)
light:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ZWA8272
grenton_type: "DIMMER"
name: "Bedroom Dimmer"
- LED RGBW DIN
- LED RGBW FM
light:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->LED8272
name: "Bedroom Led"
- LED RGBW Z-WAVE
light:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ZWA8272
grenton_type: "RGB"
name: "Bedroom Led"
- ROLLER SHUTTER DIN
- ROLLER SHUTTER X3 DIN
- ROLLER SHUTTER FM
- ROLLER SHUTTER Z-WAVE
cover:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ROL5664
name: "Kichen Blinds"
If ReversePosition
is set to Yes
:
cover:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->ROL5664
reversed: True
name: "Kichen Blinds"
- THERMOSTAT - Virtual Object
climate:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->THE9334
name: "Bedroom Thermostat"
- ONE_WIRE
- TEMPERATURE_SENSOR (MULTISENSOR)
- PANELSENSTEMP (SMART PANEL / TOUCH PANEL)
sensor:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->TEM5469
name: "Bedroom Temperature"
- ANALOG IN/OUT DIN
sensor:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->TEM5469
unit_of_measurement: "%" # your unit
name: "Power Measurement"
- CLU User Feature
sensor:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->my_user_feature # NOTE! if your user feature is on this GATE HTTP, just type "my_user_feature"
unit_of_measurement: "m/s" # your unit
name: "Wind Power"
- MODBUS, MODBUS_VALUE, MODBUS_RTU, MODBUS_CLIENT, MODBUS_SERVER, MODBUS_SLAVE_RTU
sensor:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->TEM5469
grenton_type: "MODBUS_RTU" # MODBUS, MODBUS_VALUE, MODBUS_RTU, MODBUS_CLIENT, MODBUS_SERVER, MODBUS_SLAVE_RTU
unit_of_measurement: "W" # your unit
name: "Power Measurement"
- Any Digital Value (e.g. DIN, ZWAVE_DIN)
binary_sensor:
- platform: grenton_objects
api_endpoint: http://192.168.0.4/HAlistener
grenton_id: CLU221001090->TEM5469
name: "Kitchen Window Sensor"
By default, Home Assistant automatically refreshes entities every 30 seconds. If you want to accelerate the object update, go to the Settings->Automations & Scenes
and set up the automation:
Trigger
->Time and location
->Time pattern
-> e.g./10
(every 10 seconds)
Action
->Other action
->Call service
->Home Assistant Core Integration: Update entity
- Select objects (
+Choose entity
) to be updated at specified intervals.
- Save and restart Home Assistant.