Alarm mode - 2 questions

Make these changes in the « Change » nodes,

image

zigbee2mqtt/sirene_1/set
{"warning": {"duration": 1, "mode": "off", "level": "low", "strobe": true, "strobe_duty_cycle": 5}}

image

zigbee2mqtt/sirene_1/set
{"warning": {"duration": 1, "mode": "emergency", "level": "low", "strobe": false, "strobe_duty_cycle": 5}}

deploy and test what this produces by clicking on the « Inject » nodes please

image

A JSON format is better! I’ve modified it in the message above
image

I enabled debugging for the inject nodes
image

oops sorry I took an ambiguous screenshot! :woozy_face:

I therefore switched back to a character string

OFF

ON

Yes, but did you set it exactly like in the screenshots for OFF and ON?

I had forgotten a JSON snippet

Debug

Are the « topic » values in plain text and the « payload » values in JSON?
Please expand the warning :wink:

Are the « topic » in text format and the « payload » in JSON format? => YES
expand on the warning please => the warning?

In your screenshot it says (second-to-last line):

> warning: object

Click the arrow to expand the content and copy it here

Also, screenshots are not practical at all; I recommend next time using this little button:

You’ll see it when you hover over the different elements of the debug window.
Once copied, you’ll paste the content on the forum using the code tag (called Preformatted Text); you’ll find it here:

That way we’ll be able to read the debug logs front to back without asking you each time to expand a section :wink:

Here’s an example of what that can look like:

{"before":{"id":"1699467085.824686-88mhx6","camera":"CAM2","frame_time":1699467085.824686,"snapshot_time":0,"label":"person","sub_label":null,"top_score":0,"false_positive":true,"start_time":1699467085.824686,"end_time":null,"score":0.83984375,"box":[1407,621,1893,1538],"area":445662,"ratio":0.529989094874591,"region":[888,335,2400,1847],"stationary":false,"motionless_count":0,"position_changes":0,"current_zones":[],"entered_zones":[],"has_clip":false,"has_snapshot":false},"after":{"id":"1699467085.824686-88mhx6","camera":"CAM2","frame_time":1699467086.050961,"snapshot_time":1699467086.050961,"label":"person","sub_label":null,"top_score":0.82421875,"false_positive":false,"start_time":1699467085.824686,"end_time":null,"score":0.82421875,"box":[1411,624,1883,1526],"area":425744,"ratio":0.5232815964523282,"region":[1089,517,2213,1641],"stationary":false,"motionless_count":0,"position_changes":1,"current_zones":["parking"],"entered_zones":["parking"],"has_clip":true,"has_snapshot":true},"type":"new"}

OFF

{"_msgid":"f1d63716e4a8244b","payload":{"warning":{"duration":1,"mode":"off","level":"low","strobe":true,"strobe_duty_cycle":5}},"topic":"zigbee2mqtt/sirene_1/set"}

ON

{"_msgid":"3910a301039ef0d0","payload":{"warning":{"duration":1,"mode":"emergency","level":"low","strobe":false,"strobe_duty_cycle":5}},"topic":"zigbee2mqtt/sirene_1/set"}

Is that OK?

It’s perfect :+1: (however I can’t help you with your issues, you need to see @cce66 )

Next time don’t hesitate to copy/paste the entire debug message. That way we have everything!

@guim31

Good catch — I have to say this copy icon is so tiny that I’d never seen it, so I’d never used it!!! :+1: Are you on a 43"? :thinking: :smile:

Let’s try removing the set from the topic as shown below in both ON and OFF, leaving only zigbee2mqtt/sirene_1

Thank you @guim31 for your availability and your patience:

1 Like

Hi @cce66

OFF

{"_msgid":"4ce258749a62a09a","payload":{"warning":{"duration":1,"mode":"off","level":"low","strobe":true,"strobe_duty_cycle":5}},"topic":"zigbee2mqtt/sirene_1/set"}

ON

{"_msgid":"fa129b301ebd1d76","payload":{"warning":{"duration":1,"mode":"emergency","level":"low","strobe":false,"strobe_duty_cycle":5}},"topic":"zigbee2mqtt/sirene_1/set"}

Have you tried removing the « set » at the end of the topics?

You can try setting the following for ON

pour le topic : zigbee2mqtt/sirene_1/set_message
pour le  payload : '{"warning": {"duration": 10, "mode": "emergency", "strobe": false}}'

for OFF

pour le topic : zigbee2mqtt/sirene_1/set_message
pour le payload : '{"warning": {"duration": 10, "mode": "stop", "strobe": false}}'

Yes
The debug I sent above corresponds to this operation.

with these new values?