Closed julianrinaldi closed 1 year ago
You can help us with this issue by providing some information about your device.
To do that, please follow the next steps:
From this debugger, we can get some information that can be useful. From the "Basic Information" tab, please provide:
Next, click on the "Device Debugging" tag. Once on that tab, you will find a small link called "JSON Editing", click on that link. It will now show a text field called JSON_EDITOR
with some code in it. It looks something like this:
Copy and share that code from that text field into this issue.
That will help a lot! Thanks already!
../Frenck
Hi Frenck,
I have this siren I ve been using it via scenes so didn't cross my mind that its unsupported .
Heres the info you require
Product Name 声光报警器 Device ID 32124004ecfabc2051fd Product Category sgbj Device Status Online Activated At 2018-12-13 14:38:50
[ { "code": "Alarmtype", "value": "1" }, { "code": "AlarmPeriod", "value": 60 }, { "code": "AlarmSwitch", "value": false } ]
and the variable to fill the above
Alarmtype | Enum | { "range": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ] } |
---|---|---|
AlarmPeriod | Integer | { "unit": "s", "min": 0, "max": 60, "scale": 0, "step": 1 } |
AlarmSwitch | Boolean | "{true,false}" |
Hello.
I also have this siren and was expecting it to be working, but it's not.
It is recognized by HA integration, but only a mute switch appears in the integration, no siren also:
Here is the info requested by @frenck:
Basic information:
Product Name
BW声光报警器
Product Category
sgbj
Device debugging:
[
{
"code": "muffling",
"value": false
},
{
"code": "alarm_state",
"value": "normal"
}
]
Hey there @tuya, @zlinoliver, @metisu, mind taking a look at this issue as it has been labeled with an integration (tuya
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tuya documentation tuya source (message by IssueLinks)
Good Afternoon.
Just purchased this siren and its not being detected by the Tuya App. Details from the Tuya IoT Platform below:
{ "result": { "active_time": 1646143343, "category": "sgbj", "category_name": "Siren", "create_time": 1646134021, "gateway_id": "", "icon": "smart/icon/15439171994924nu2gz4y_0.png", "model": "H1", "name": "Smart Siren", "online": true, "owner_id": "37706564", "product_id": "fi2xhhvyod93vrnu", "product_name": "Smart Siren", "sub": false, "time_zone": "+02:00", "update_time": 1646143349, "uuid": "37468838ecfabc460f24" }, "success": true, "t": 1646143731108, "tid": "1ee308fe996911ecad853ae38e13e3c8" }
Please advise as to how we can get it integrated? Much appreciated.
Product Name 声光报警器(带温湿度版本) Product Category qt
the json editor is empty
Hi similar problem here.
Siren (unsupported) por Tuya Device was discovered but not entity added.
Attaching information.
Device Information Product Name: 声光报警器 Device ID: 05005003dc4f2248004d Product Category: sgbj Device Status: Online Activated At: 2022-04-13 11:11:18
JSON_EDITOR { "code": "Alarmtype", "value": "3" }, { "code": "AlarmPeriod", "value": 15 }, { "code": "AlarmSwitch", "value": false } ]
Standard Instruction Set Code | Type | Values Alarmtype | Enum | { "range": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ] } AlarmPeriod | Integer | { "unit": "s", "min": 0, "max": 60, "scale": 0, "step": 1 } AlarmSwitch | Boolean | "{true,false}"
Standard Status Set Code | Type | Values Alarmtype | Enum | { "range": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ] } BatteryStatus | Enum | { "range": [ "0", "1", "2", "3", "4" ] } AlarmSwitch | Boolean | "{true,false}" AlarmPeriod | Integer | { "unit": "s", "min": 0, "max": 60, "scale": 0, "step": 1 }
Any help would be appreciated.
Hello, Here is my info, I hope that this helps. My siren is the BW-IS11.
Device Information Product Name BW声光报警器 Device ID ebd56810f12abbafaageei Product Category sgbj
JSON EDITOR INFO [ { "code": "muffling", "value": false }, { "code": "alarm_state", "value": "normal" } ]
Standard Instructions Set
muffling Boolean
"{true,false}"
alarm_state Enum
{
"range": [
"alarm_sound",
"alarm_light",
"alarm_sound_light",
"normal"
]
}
Standard Status Set
{
"range": [
"alarm_sound",
"alarm_light",
"alarm_sound_light",
"normal"
]
}
muffling Boolean
"{true,false}"
fault Bitmap
{
"label": [
"fault"
]
}
@frenck @zlinoliver @METISU
Dear Developers,
Below you can find logs for my Siren as well. Issue was opened in NOV 2021 in Tuya and still no results https://github.com/tuya/tuya-home-assistant/issues/657
No support for Siren at all
Device info (please complete the following information, which can be found in log): like this: { "result": { "active_time": 1600715139, "biz_type": 18, "category": "sgbj", "create_time": 1600715139, "icon": "smart/icon/1528364694thahb9sok2l_0.png", "id": "", "ip": "", "lat": "", "local_key": "", "lon": "", "model": "", "name": "Сигнализация на кухне", "online": true, "owner_id": "16305239", "product_id": "DYgId0sz6zWlmmYu", "product_name": "Siren", "status": [ { "code": "BatteryStatus", "value": "4" }, { "code": "Alarmtype", "value": "9" }, { "code": "AlarmPeriod", "value": 10 }, { "code": "AlarmSwitch", "value": false } ], "sub": false, "time_zone": "+03:00", "uid": "eu1600250372644kZmGd", "update_time": 1626270912, "uuid": "10082541bcddc2981908" }, "success": true, "t": 1626337994973 }
Device specifications (please complete the following information, which can be found in log): Same device's id, like this: { "result": { "category": "sgbj", "functions": [ { "code": "Alarmtype", "type": "Enum", "values": "{"range":["1","2","3","4","5","6","7","8","9","10"]}" }, { "code": "AlarmPeriod", "type": "Integer", "values": "{"unit":"s","min":0,"max":60,"scale":0,"step":1}" }, { "code": "AlarmSwitch", "type": "Boolean", "values": "{}" } ], "status": [ { "code": "Alarmtype", "type": "Enum", "values": "{"range":["1","2","3","4","5","6","7","8","9","10"]}" }, { "code": "BatteryStatus", "type": "Enum", "values": "{"range":["0","1","2","3","4"]}" }, { "code": "AlarmSwitch", "type": "Boolean", "values": "{}" }, { "code": "AlarmPeriod", "type": "Integer", "values": "{"unit":"s","min":0,"max":60,"scale":0,"step":1}" } ] }, "success": true, "t": 1626338094685 }
Kindly check and advise if possible to add support
Regsrds.
ALEX
@alexreddy78 There is no need to mention or tag me and other maintainers. Please, in general, don't do that. Thanks 👍
Issue was opened in NOV 2021 in Tuya and still no results
This is an open-source project, feel free to contribute new features and fixes. If no one provides a solution, it will never be fixed. That is how it works 🤷
Good Afternoon.
Just purchased this siren and its not being detected by the Tuya App. Details from the Tuya IoT Platform below:
{ "result": { "active_time": 1646143343, "category": "sgbj", "category_name": "Siren", "create_time": 1646134021, "gateway_id": "", "icon": "smart/icon/15439171994924nu2gz4y_0.png", "model": "H1", "name": "Smart Siren", "online": true, "owner_id": "37706564", "product_id": "fi2xhhvyod93vrnu", "product_name": "Smart Siren", "sub": false, "time_zone": "+02:00", "update_time": 1646143349, "uuid": "37468838ecfabc460f24" }, "success": true, "t": 1646143731108, "tid": "1ee308fe996911ecad853ae38e13e3c8" }
Please advise as to how we can get it integrated? Much appreciated.
Hello , I have the same problem, did you find any solution? thank you!!!!
Not really, still waiting for help.
On Mon, Nov 21, 2022 at 2:21 PM jcotof @.***> wrote:
Good Afternoon.
Just purchased this siren and its not being detected by the Tuya App. Details from the Tuya IoT Platform below:
{ "result": { "active_time": 1646143343, "category": "sgbj", "category_name": "Siren", "create_time": 1646134021, "gateway_id": "", "icon": "smart/icon/15439171994924nu2gz4y_0.png", "model": "H1", "name": "Smart Siren", "online": true, "owner_id": "37706564", "product_id": "fi2xhhvyod93vrnu", "product_name": "Smart Siren", "sub": false, "time_zone": "+02:00", "update_time": 1646143349, "uuid": "37468838ecfabc460f24" }, "success": true, "t": 1646143731108, "tid": "1ee308fe996911ecad853ae38e13e3c8" }
Please advise as to how we can get it integrated? Much appreciated.
Hello , I have the same problem, did you find any solution? thank you!!!!
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/59898#issuecomment-1322660894, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTOQKZ5HRDEH4V532WW6FDWJPRWRANCNFSM5IJWW7SQ . You are receiving this because you commented.Message ID: @.***>
-- Regards,
Charles Romney
hi devs, so i buy this siren but when i add in tuya integration only show Humidity and Temperature. i acess Tuya IOT and already have support for Switch to activate the siren
could you add this entity in homeassistant core ? <3
I have also a Tuya siren of the type sgbj.
It seems that the API has changed for the sgbj siren type, because instead of alarm_switch of type bool there is an enum alarm_state used to activate and deactivate the siren.
More info about my siren:
Product Name NX-4980 Device ID 8805447524a160270251 Product Category sgbj
If I change the code for the sgbj type, I get the siren working. But my changes break the functionality for the other siren types and maybe also for older sirens of the type "sgbj", so I would need some guidance how to proceed to insert a code fix.
For the moment I think there are two options:
Here are my changes which allow my to toggle / activate / deactivate the siren:
# /usr/src/homeassistant/homeassistant/components/tuya/const.py
class DPCode(StrEnum):
"""Data Point Codes used by Tuya.
https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
"""
AIR_QUALITY = "air_quality"
ALARM_STATE = "alarm_state" # Alarm state
# /usr/src/homeassistant/homeassistant/components/tuya/siren.py
# Siren Alarm
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
"sgbj": (
SirenEntityDescription(
key=DPCode.ALARM_STATE,
name="Siren",
),
),
@property
def is_on(self) -> bool:
"""Return true if siren is on."""
return self.device.status.get(self.entity_description.key, "normal")
def turn_on(self, **kwargs: Any) -> None:
"""Turn the siren on."""
self._send_command([{"code": self.entity_description.key, "value": "alarm_sound_light"}])
def turn_off(self, **kwargs: Any) -> None:
"""Turn the siren off."""
self._send_command([{"code": self.entity_description.key, "value": "normal"}])
So can you give me some guidance how to proceed? I will then change the code and create a corresponding PR.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Adding a siren:
Prerequisites : working HA instance, device added to "Tuya Smart" mobile app, and working localTuya HA integration.
NB: I added the device to "Tuya Smart" app by selecting Security category and choosing Sound and visual alarm. My device is a "sgbj" Tuya Product Category.
Before adding the device, you need to change the Control Instruction mode of the device.
Login into your Tuya dashboard (https://iot.tuya.com/)
Go to Cloud > Select your project > Devices tab
On the device tile above the device list, click on the pencil button "Change Control Instruction Mode"
Select "DP Instruction" > Save Configuration > OK
Back to the device list, click on "Debug device" next to your Siren to list all the valid input values and open the "Device Debugging" tab.
Now, on your HA instance, go to Configuration > Integrations and click on Configure in the Local Tuya integration section
Before adding the device, turn it on to get all active status
Check "Add a new device" and continue. Check the discovered device you want to add and continue.
Choose the device and fill in the required fields. Be sure to choose protocol version 3.1 to reduce compatibility issues. Click on Next:
name: 'Tuya_Sirene01',
id: '6208*********30d1b11',
key: '62a26*****ab6b00e'
protocol version: 3.1
Here, if you get the error message "Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.", you have to manually add the DPS.
To do so :
On the Device Debugging page from iot.tuya.com, indentify all the codes from the "Standard Status Set" tab.
NB: Mines are BatteryStatus, Alarmtype, AlarmPeriod and AlarmSwitch
Fill the field "Manual DPS to add" with number starting from 101 for each code you found, seperated with commas.
NB: Mines are 101,102,103,104
Now, you need to configure each Code with valid platform and values.
Each code needs to be associated with a "platform" in order to control and correctly report the statuses of the device to HA.
NB: Mines are :
BatteryStatus: sensor
Alarmtype: select
AlarmPeriod: number
AlarmSwitch: switch
The problem
Home Assistant 2021.11 supposedly added support for Tuya sirens. The Tuya integration now finds the siren and creates a device, but the model shows as Siren (unsupported), and no entity is created. The siren works fine in the Smart Life app.
This is the siren I'm using: https://us.amazon.com/Monoprice-Wireless-Smart-120dB-Siren/dp/B07N8LCNJ5
What version of Home Assistant Core has the issue?
core-2021.11.0-4
What was the last working version of Home Assistant Core?
None
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Tuya
Link to integration documentation on our website
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response