Smoke-detector, status change domoticz doesn't work

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Smoke-detector, status change domoticz doesn't work

Post by hoeby »

Today i connected a smoke-detector, it is added to the devices list.
Next i actived it to the switch list.

I made a smoke-alarm whit it. The detector made the sound and also the gateway made a sound and light.
But looking in domoticz, nothing happend.
When i move a xiaomi motion detector, than i see a status change in domoticz. The same idea doesn't work on the smoke-detector?

When there is no alarm and looking in the switch page, it looks like undernead.
When i make a smoke-alarm, it stays the same. It doens't make a differance when i go to an other page and return to the switch-page (or push F5)
Image

It is possible to do a mouse click on the grey fire picto.
Than it gets a colour and the word changes from "off" to "on" (in the picture from "uit" to "aan" (dutch))
Than the picutre looks like this. Again a smoke-alarm test. Again i can't find a status change in domoticz.
Image

How can i find the status change in domoticz, so i can make an event whit is?
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
SweetPants

Re: Smoke-detector, status change domoticz doesn't work

Post by SweetPants »

Tried the log file?
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

When looking to the log-file. I only see the manual switch functions i do. But not the smoke-alarms which i tested.

i am running Version: 3.8153
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

i made a step today whit my problem.

I put the alarm "ON" in switch-page of domoticz.
After that i made an alarm. Domoticz switched the alarm to "OFF". No event switched.
Again i made an alarm, on the switch-page there is nothing to see. This is because the alarm switch to "on" and "off" in a second (saw this in de log).
I can make an event whit it and that works.

Only thing to work on, how to keep de alarm longer active in domoticz instead of a second.
This can be usefull when looking in the app, otherwise i don't know where the alarm is made, unless looking in the log files (which i don't prefer).
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
SweetPants

Re: Smoke-detector, status change domoticz doesn't work

Post by SweetPants »

Have you tried the "Off delay"?
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

The delay OFF function doesn't work.
First i need to change the type from smokedetector to switch, because the smokedetector doesn't have delay.
After that i programmerd 60sec. off delay.
Made an alarm. Looking in the log file, the alarm went to ON but in the same second to OFF.
60 seconds later there is again an OFF message. The picto stays grey in this time, also when pushing F5 (refresh)
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
schurgan
Posts: 9
Joined: Monday 20 March 2017 15:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by schurgan »

I have the same problem. No status change at Domoticz at the smoke detectors. Does not anyone have a solution?

I think we have to offer corbin to change that.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

i have noticed that the smoke detectors give a pulse. when alarm of is ON and OFF in the same second. i made a virtual switch to extend the alarm.
look in the log file of the device, there i noticed it
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Marzmarz
Posts: 3
Joined: Friday 27 November 2015 8:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by Marzmarz »

hoeby wrote: Saturday 02 June 2018 11:23 Today i connected a smoke-detector, it is added to the devices list.
Next i actived it to the switch list.

I made a smoke-alarm whit it. The detector made the sound and also the gateway made a sound and light.
But looking in domoticz, nothing happend.
When i move a xiaomi motion detector, than i see a status change in domoticz. The same idea doesn't work on the smoke-detector?

When there is no alarm and looking in the switch page, it looks like undernead.
When i make a smoke-alarm, it stays the same. It doens't make a differance when i go to an other page and return to the switch-page (or push F5)
Image

It is possible to do a mouse click on the grey fire picto.
Than it gets a colour and the word changes from "off" to "on" (in the picture from "uit" to "aan" (dutch))
Than the picutre looks like this. Again a smoke-alarm test. Again i can't find a status change in domoticz.
Image

How can i find the status change in domoticz, so i can make an event whit is?
Hello,
Today I've tried to add the xiaomi smoke detector in Domoticz. How did you do this? When I pressed the test button on the smoke alarm within the time-window to receive new sensors (within domoticz), i see the following text in the log file:

2018-11-16 15:22:37.482 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.482 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"density\":\"3\"}"}
2018-11-16 15:22:37.495 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.495 {"cmd":"heartbeat","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"voltage\":3215,\"alarm\":\"0\"}"}
2018-11-16 15:22:37.684 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.684 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"alarm\":\"0\"}"}
2018-11-16 15:22:37.717 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.718 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"density\":\"3\"}"}
2018-11-16 15:22:37.731 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.731 {"cmd":"heartbeat","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"voltage\":3215,\"alarm\":\"0\"}"}

Within the "devices" list I don't see the smoke detector. What am i doing wrong? Has someone a tutorial?
willie-p
Posts: 34
Joined: Friday 12 July 2013 14:19
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by willie-p »

Marzmarz wrote: Friday 16 November 2018 15:31
hoeby wrote: Saturday 02 June 2018 11:23 Today i connected a smoke-detector, it is added to the devices list.
Next i actived it to the switch list.

I made a smoke-alarm whit it. The detector made the sound and also the gateway made a sound and light.
But looking in domoticz, nothing happend.
When i move a xiaomi motion detector, than i see a status change in domoticz. The same idea doesn't work on the smoke-detector?

When there is no alarm and looking in the switch page, it looks like undernead.
When i make a smoke-alarm, it stays the same. It doens't make a differance when i go to an other page and return to the switch-page (or push F5)
Image

It is possible to do a mouse click on the grey fire picto.
Than it gets a colour and the word changes from "off" to "on" (in the picture from "uit" to "aan" (dutch))
Than the picutre looks like this. Again a smoke-alarm test. Again i can't find a status change in domoticz.
Image

How can i find the status change in domoticz, so i can make an event whit is?
Hello,
Today I've tried to add the xiaomi smoke detector in Domoticz. How did you do this? When I pressed the test button on the smoke alarm within the time-window to receive new sensors (within domoticz), i see the following text in the log file:

2018-11-16 15:22:37.482 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.482 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"density\":\"3\"}"}
2018-11-16 15:22:37.495 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.495 {"cmd":"heartbeat","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"voltage\":3215,\"alarm\":\"0\"}"}
2018-11-16 15:22:37.684 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.684 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"alarm\":\"0\"}"}
2018-11-16 15:22:37.717 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.718 {"cmd":"report","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"density\":\"3\"}"}
2018-11-16 15:22:37.731 XiaomiGateway: unhandled model: smoke
2018-11-16 15:22:37.731 {"cmd":"heartbeat","model":"smoke","sid":"158d0002b07b23","short_id":55425,"data":"{\"voltage\":3215,\"alarm\":\"0\"}"}

Within the "devices" list I don't see the smoke detector. What am i doing wrong? Has someone a tutorial?
Which version of Domoticz do you have?
Did you enable the hardware in the Settings tab?
willie-p
Posts: 34
Joined: Friday 12 July 2013 14:19
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by willie-p »

I've an other issue with the Smoke Alarm.
I'm also trying to trigger the Alarm manual however I'm getting the following feedback: " Error: XiaomiGateway: unable to write command - Unsupported device"

Cheers
Will
visuel
Posts: 13
Joined: Sunday 05 March 2017 13:02
Target OS: Linux
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by visuel »

Same here:

I'm also trying to trigger the Alarm manual however I'm getting the following feedback:


2019-01-23 18:13:17.926 Error: XiaomiGateway: unable to write command - Unsupported device
2019-01-23 18:13:18.177 Error: XiaomiGateway: unable to write command - Unsupported device
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

sorry, i don't know why you getting "unable to write command".
For the help for other people, which domoticz version are you running.

I run version 4.9700 stable.
I programmed the alarm as "switch on/off". Tested it a few minutes ago, i can set it manual without error
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
jejedelbarro
Posts: 1
Joined: Tuesday 05 March 2019 16:02
Target OS: -
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by jejedelbarro »

Hi,

you mean you are able to trigger the alarm manually from domoticz ?

To coplete that you just had to turn the alarm as "switch on/off" ?

Regards
Gadgetopi
Posts: 4
Joined: Tuesday 22 October 2019 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by Gadgetopi »

hoeby wrote: Monday 23 July 2018 19:51 i have noticed that the smoke detectors give a pulse. when alarm of is ON and OFF in the same second. i made a virtual switch to extend the alarm.
look in the log file of the device, there i noticed it
I've got the same issue. How did you succeed to extend the alarm ? What is the role of your virtualswitch ? ;)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

I made a dzvents script, which is triggered by the smoke-detector. This sets the dummy switch On. The dummy sets an image active on my dashboard, where the alarm is coming from.
Then you need to make something to also turn off the dummy switch. I do this by my own made dashboard. Where i need to accept the alarm, before my tablet stops making the fire alarm sound. Then the image on the dashboard sets back to normal.

But this depents what you are willing to do with the alarm.
Could you explane, why you want to extend the alarm?. Maybe there are other solutions
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Gadgetopi
Posts: 4
Joined: Tuesday 22 October 2019 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by Gadgetopi »

hoeby wrote: Wednesday 23 October 2019 10:22 I made a dzvents script, which is triggered by the smoke-detector. This sets the dummy switch On. The dummy sets an image active on my dashboard, where the alarm is coming from.
Then you need to make something to also turn off the dummy switch. I do this by my own made dashboard. Where i need to accept the alarm, before my tablet stops making the fire alarm sound. Then the image on the dashboard sets back to normal.

But this depents what you are willing to do with the alarm.
Could you explane, why you want to extend the alarm?. Maybe there are other solutions
Thanks for your feedback. I just want to trigger a simple event to send a mail notification when smoke detector is triggered.
But, as you, domoticz show ON and OFF at the same time so my event is never triggered...

So that's why I'm asking how did you succeed to have a normal ON and then OFF some minutes later to do some events
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by hoeby »

This is the script i am using.
It is not exactly the script, because mine also sets the dashboard.
So i removed the dashboard items in the script.

For each smokedetector you need to make a dummy device.
This dummy device is set ON when the smokedetector gives an alarm. The dummy device could be used to trigger other scripts/events
The delay is the timer which switches OFF the dummy device after the minutes you filled in.

With some modification of the script. It also should be possible to send mail notification with this script.
Then you don't need the dummy devices.

Code: Select all

--[[
For each smokedetector make a dummy.
Fill in the smokedetector name and its dummy. Between the ( ), leave the " ".
Change the number for delay. This switches off the dummy device after X minutes
]]--

local smokedetector1      = dz.devices("Rookmelder-Meterkast")
local smokedetector1dummy = dz.devices("Rookmelder-Meterkast-Dummy") 
local smokedetector1delay = 5   -- Delay to switch off dummy, in minutes

local smokedetector2      = dz.devices("Rookmelder-Zolder")
local smokedetector2dummy = dz.devices("Rookmelder-Zolder-Dummy")
local smokedetector2delay = 5   -- Delay to switch off dummy, in minutes

debug = false                   -- Set to true to enable extra log-info, set to false to disable extra log-info.

-------------------------------------------------------
------------ Do not modify below this line ------------
-------------------------------------------------------

return {
    on = { 
       devices = {smokedetector1,
                  smokedetector2,
         }
       },

    execute = function(dz, device)
        if dz.devices(smokedetector1).state == 'On' then
            smokedetector1dummy.switchOn()
                if debug then
	            print ('Debug smoke-detector, ' ..smokedetector1.. ' is switch On. Dummy ' ..smokedetector1dummy.. ' is switched On')
	        end
        else     
            smokedetector1dummy.switchOff().afterMin(smokedetector1delay)
                if debug then
	            print ('Debug smoke-detector, Dummy ' ..smokedetector1dummy.. ' is switched Off')
	        end
        end
        
        if dz.devices(smokedetector2).state == 'On' then
            smokedetector2dummy.switchOn()
                if debug then
	            print ('Debug smoke-detector, ' ..smokedetector2.. ' is switch On. Dummy ' ..smokedetector2dummy.. ' is switched On')
	        end
        else     
            smokedetector2dummy.switchOff().afterMin(smokedetector2delay)
                if debug then
	            print ('Debug smoke-detector, Dummy ' ..smokedetector2dummy.. ' is switched Off')
	        end
        end
  end
}
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Gadgetopi
Posts: 4
Joined: Tuesday 22 October 2019 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by Gadgetopi »

Thanks a lot hoeby, I will give a try ;)
Gadgetopi
Posts: 4
Joined: Tuesday 22 October 2019 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Smoke-detector, status change domoticz doesn't work

Post by Gadgetopi »

hoeby wrote: Tuesday 29 October 2019 22:16 This is the script i am using.
It is not exactly the script, because mine also sets the dashboard.
So i removed the dashboard items in the script.

For each smokedetector you need to make a dummy device.
This dummy device is set ON when the smokedetector gives an alarm. The dummy device could be used to trigger other scripts/events
The delay is the timer which switches OFF the dummy device after the minutes you filled in.

With some modification of the script. It also should be possible to send mail notification with this script.
Then you don't need the dummy devices.
It works perfectly. Thanks again :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest