Hello,
I’m opening this post because I’ve tried configuring this siren with the MC drivers and the Personal Drivers listed for other models, but I haven’t been able to get it to work. With the help of GPT chat, I’ve tried creating my own driver. I manage to install it on the hub, but when I try to re-pair the siren, it detects me as a Zigbee Thing, and I can’t activate the driver. It seems there’s a problem with the fingerprint, or I don’t know, but any help is welcome.
To create the driver, I installed these files locally, generated from the information I gathered from the siren. The driver structure is as follows.
tuya_solar_siren_driver/
│
├── src/
│ └── init.lua
│
├── config.yml
├── fingerprints.yml
└── profiles/
└── siren-profile.yml
content of config.yml
packageKey: tuya_solar_siren
name: Tuya Solar Siren
description: Driver for Tuya Solar Siren TS0601 (_TZE284_nlrfgpny)
vendorSupportInformation: https://github.com/tuya/zigbee
content of fingerprints.yml
fingerprints:
- id: "tuya/solar-siren"
manufacturer: "_TZE284_nlrfgpny"
model: "TS0601"
deviceProfileName: siren
content of siren-profile.yml
name: siren
components:
- id: main
capabilities:
- id: switch
version: 1
- id: alarm
version: 1
- id: audioVolume
version: 1
categories:
- name: Siren
content of init.lua
-- Tuya Solar Siren Driver (init.lua)
local capabilities = require "st.capabilities"
local function handle_on(driver, device, command)
device:send(capabilities.switch.on())
end
local function handle_off(driver, device, command)
device:send(capabilities.switch.off())
end
local function tuya_siren_handler(driver, device, command)
if command.name == "on" then
handle_on(driver, device, command)
elseif command.name == "off" then
handle_off(driver, device, command)
end
end
local driver_template = {
supported_capabilities = {
capabilities.switch,
capabilities.alarm
},
lifecycle_handlers = {
added = function(driver, device)
device:emit_event(capabilities.switch.off())
end,
infoChanged = function(driver, device)
-- Handle information changes
end
},
capability_handlers = {
[capabilities.switch.id] = tuya_siren_handler,
[capabilities.alarm.id] = tuya_siren_handler
}
}
return driver_template
other files inside /src folder
tuya_siren_handler.lua
-- Tuya Solar Siren Handler (tuya_siren_handler.lua)
local function on_command(driver, device, command)
-- Handle "on" command for Tuya Solar Siren
device:send(capabilities.switch.on())
end
local function off_command(driver, device, command)
-- Handle "off" command for Tuya Solar Siren
device:send(capabilities.switch.off())
end
return {
on_command = on_command,
off_command = off_command
}
tuya_solar_siren_driver.groovy
metadata {
definition (name: "Tuya Solar Siren Zigbee", namespace: "kkossev", author: "Krassimir Kossev", singleThreaded: true ) {
capability "Actuator"
capability "Battery"
capability "Switch"
capability "Alarm" // alarm - ENUM ["strobe", "off", "both", "siren"]; Commands: both() off() siren() strobe()
capability "AudioVolume" //Attributes: mute - ENUM ["unmuted", "muted"] volume - NUMBER, unit:%; Commands: mute() setVolume(volumelevel) volumelevel required (NUMBER) - Volume level (0 to 100) unmute() volumeDown() volumeUp()
capability "TemperatureMeasurement"
capability "RelativeHumidityMeasurement"
capability "Refresh"
attribute 'Status', 'string'
attribute 'alarmState', 'ENUM', ["Alarm Sound", "Alarm Light", "Alarm Sound and Light", "No Alarm"]
attribute 'solarCharging', 'ENUM', ["not charging", "charging"]
attribute 'tamperAlarmSwitch', 'ENUM', ["disabled", "enabled"]
fingerprint profileId:"0104", endpointId:"01", inClusters:"0004,0005,EF00,0000,ED00", outClusters:"0019,000A", model:"TS0601", manufacturer:"_TZE284_nlrfgpny", deviceJoinName: "Tuya Solar Alarm"
}
}
tuya_solar_siren_driver.yaml
packageKey: tuya_solar_siren
name: Tuya Solar Siren
description: Driver for Tuya Solar Siren TS0601 (_TZE284_nlrfgpny)
vendorSupportInformation: https://github.com/tuya/zigbee
Through MC’s Driver Thing, I’ve obtained the following information, which I’ve used to develop the driver.
Is there anything I’m missing?
Here’s a link to the product.
https://es.aliexpress.com/item/1005007022197993.html
Thanks to everyone who reads this, and if you are in my case and want to get this siren working, let’s see if we can all do it together.