Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC Motion sensors not reporting change of status #86

Closed
durosity opened this issue Mar 26, 2018 · 20 comments
Closed

DSC Motion sensors not reporting change of status #86

durosity opened this issue Mar 26, 2018 · 20 comments
Assignees
Labels
bug Something isn't working device HomeKit device problem potentially resolved or non-issue Bug that cannot be reproduced and may be fixed or a one-off user problem test results pending Issue is pending the outcome of test results or special build

Comments

@durosity
Copy link

durosity commented Mar 26, 2018

This is one I noticed a while ago but completely forgot to log, it was only when I was rebuilding my alarm system at the weekend I noticed that it was still outstanding. All other DSC Plugin devices I’ve setup seem to work fine but motion sensors do not show any activity. Simulation dump:

   HomeKit Bridge                  Simulating HomeKit values for Lounge - Motion Sensor
   HomeKit Bridge                  ##### DEVICE DATA DUMP #####
   HomeKit Bridge                  address : 
batteryLevel : None
buttonGroupCount : 0
configured : True
description : DSC Zone 05 - Wired 
deviceTypeId : alarmZone
displayStateId : state
displayStateImageSel : Closed
displayStateValRaw : closed
displayStateValUi : closed
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState : 
folderId : 16598138
globalProps : MetaProps : (dict)
	 com.frightideas.indigoplugin.dscAlarm : (dict)
		  Elem :  (string)
		  occupancyGroup : 0 (integer)
		  var : None (empty)
		  zoneLogChanges : false (bool)
		  zoneNumber : 5 (string)
		  zonePartition : 1 (string)
		  zoneType : zoneTypeMotion (string)
id : 471312243
lastChanged : 2018-03-26 21:09:29
lastSuccessfulComm : 2018-03-26 21:09:29
model : Alarm Zone
name : Lounge - Motion Sensor
ownerProps : com.frightideas.indigoplugin.dscAlarm : (dict)
	 Elem :  (string)
	 occupancyGroup : 0 (integer)
	 var : None (empty)
	 zoneLogChanges : false (bool)
	 zoneNumber : 5 (string)
	 zonePartition : 1 (string)
	 zoneType : zoneTypeMotion (string)
pluginId : com.frightideas.indigoplugin.dscAlarm
pluginProps : com.eps.indigoplugin.homekit-bridge : (dict)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
	 LastChangedShort : 4m (string)
	 LastChangedTimer : 4 (integer)
	 bypass : nobypass (string)
	 bypass.bypassed : false (bool)
	 bypass.nobypass : true (bool)
	 state : closed (string)
	 state.closed : true (bool)
	 state.open : false (bool)
	 state.tripped : false (bool)
subModel : 
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None
   HomeKit Bridge                  ##### DEVICE SIMULATION DATA #####
   HomeKit Bridge                  Service : 
	alias : Lounge - Motion Sensor
	model : 
	subModel : 
	indigoType : indigo.Device
	pluginType : indigo.Device.com.frightideas.indigoplugin.dscAlarm.alarmZone
	type : MotionSensor
	desc : Motion Sensor
	objId : 471312243
	serverId : 0
	invertOnState : False
	convertFahrenheit : False
	required : (List)
		MotionDetected : False
	optional : (List)
		StatusActive
		StatusFault
		StatusTampered
		Name
		StatusLowBattery : 0
	native : True
	requiresPlugin : (List)
	actions : (List)
	loadOptional : False
	characterDict : (Dict)
		MotionDetected : False
@Colorado4Wheeler
Copy link
Collaborator

When you say they don't show activity, are you saying that it always shows one state or does it change ever? For instance, is it always correct when you restart your server and look at HomeKit but then never changes again, implying that it's getting it's initial state correctly but after that when you trip the sensor it doesn't update HomeKit.

@Colorado4Wheeler Colorado4Wheeler self-assigned this Mar 26, 2018
@Colorado4Wheeler Colorado4Wheeler added bug Something isn't working beta testing Issues that popped up during beta testing device HomeKit device problem labels Mar 26, 2018
@Colorado4Wheeler
Copy link
Collaborator

I think I know the answer to my own question. I was in the middle of coding something and just sort of half-ass looked at this, but now that I do I can see that there are no monitors in place so when that state.open trips the plugin doesn't take that as a "hey I need to tell HomeKit".

I'm not going to "fix" this issue in the plugin because complications are about ready to launch and that's where all custom plugin configs will come from. In the meantime I suggest using Masquerade or Device Extensions to monitor that state and then link THAT device to HomeKit and it will work.

@Colorado4Wheeler Colorado4Wheeler added enhancement New feature or request and removed beta testing Issues that popped up during beta testing bug Something isn't working labels Mar 26, 2018
@durosity
Copy link
Author

They never show as “triggered” in Home app. Their default state in Indigo would be “closed” or state.closed . Are you asking if I were to restart the plugin with one of those zones open if it’d then show up as triggered in home app?

@Colorado4Wheeler
Copy link
Collaborator

Colorado4Wheeler commented Mar 26, 2018 via email

@durosity
Copy link
Author

Ok I’ll force open a zone and try a restart to see what happens. Will try and do it later tonight

@blysik
Copy link

blysik commented Mar 27, 2018

I tried testing a DSC motion sensor last night, and didn't see a trigger in the Home.app either.

@Colorado4Wheeler
Copy link
Collaborator

Colorado4Wheeler commented Mar 27, 2018 via email

@durosity
Copy link
Author

Sorry i've not had a chance to do this yet, I've been all over the place lately. Will try to remember tonight!

@Colorado4Wheeler
Copy link
Collaborator

So does a motion sensor change the 'state.tripped' to true? I'm assuming it does and that's why this isn't working and it's a super easy fix for the next release but I don't want to assume that, change the code only to be told it still doesn't work because I guessed wrong. Right now it's looking at the same thing as a contact sensor at 'state.open'.

@Colorado4Wheeler Colorado4Wheeler added the question Further information is requested label Mar 28, 2018
@durosity
Copy link
Author

If I restart that server with the motion zone forced open in Home app it shows as triggered. Closing the zone does not update the status.

HomeKit Bridge Simulating HomeKit values for Study - Motion Sensor
HomeKit Bridge ##### DEVICE DATA DUMP #####
HomeKit Bridge address :
batteryLevel : None
buttonGroupCount : 0
configured : True
description : DSC Zone 37 - Wired
deviceTypeId : alarmZone
displayStateId : state
displayStateImageSel : Opened
displayStateValRaw : open
displayStateValUi : open
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 32672637
globalProps : MetaProps : (dict)
com.frightideas.indigoplugin.dscAlarm : (dict)
Elem : (string)
occupancyGroup : 0 (integer)
var : None (empty)
zoneLogChanges : false (bool)
zoneNumber : 37 (string)
zonePartition : 1 (string)
zoneType : zoneTypeMotion (string)
id : 1274889130
lastChanged : 2018-03-28 16:29:29
lastSuccessfulComm : 2018-03-28 16:29:29
model : Alarm Zone
name : Study - Motion Sensor
ownerProps : com.frightideas.indigoplugin.dscAlarm : (dict)
Elem : (string)
occupancyGroup : 0 (integer)
var : None (empty)
zoneLogChanges : false (bool)
zoneNumber : 37 (string)
zonePartition : 1 (string)
zoneType : zoneTypeMotion (string)
pluginId : com.frightideas.indigoplugin.dscAlarm
pluginProps : com.eps.indigoplugin.homekit-bridge : (dict)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
LastChangedShort : 5m (string)
LastChangedTimer : 5 (integer)
bypass : nobypass (string)
bypass.bypassed : false (bool)
bypass.nobypass : true (bool)
state : open (string)
state.closed : false (bool)
state.open : true (bool)
state.tripped : false (bool)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None
HomeKit Bridge ##### DEVICE SIMULATION DATA #####
HomeKit Bridge Service :
alias : Study - Motion Sensor
model :
subModel :
indigoType : indigo.Device
pluginType : indigo.Device.com.frightideas.indigoplugin.dscAlarm.alarmZone
type : MotionSensor
desc : Motion Sensor
objId : 1274889130
serverId : 0
invertOnState : False
convertFahrenheit : False
required : (List)
MotionDetected : True
optional : (List)
StatusActive
StatusFault
StatusTampered
Name
StatusLowBattery : 0
native : True
requiresPlugin : (List)
actions : (List)
loadOptional : False
characterDict : (Dict)
MotionDetected : True

@Colorado4Wheeler
Copy link
Collaborator

I'm aware of that and have already said that I need to add proper support for this, so what I need to know is what I asked before you posted that. I only need to know if my suspicions are true that 'tripped' is the state that toggles when the motion goes on and off. You don't need to do a data dump, I just need to know if that state changes.

@durosity
Copy link
Author

Ah sorry I thought you wanted it when it was open. No, the tripped state is unchanged. Tripped would only occur if the alarm was set to home or away (or was a 24 hour zone such as a smoke alarm) and the zone was violated.

@Colorado4Wheeler
Copy link
Collaborator

Colorado4Wheeler commented Mar 28, 2018 via email

@durosity
Copy link
Author

Exact same as a contact. If I change my motion sensors in HBK from the type of Motion to the type of Contact Sensor the states show up as open for movement and closed for no movement. This is what I was saying at the beginning of the thread that the DSC plugin treats all devices the exact same, it doesn’t care if its a motion sensor or contact or smoke detector or whatever.. all it really cares is if it’s Open or Closed, and additionally if it’s tripped or not if violated when the alarm is active in home/away mode.

@Colorado4Wheeler
Copy link
Collaborator

Colorado4Wheeler commented Mar 28, 2018 via email

@durosity
Copy link
Author

OK.. so we know that if I force the zone open and start the server then the status of that sticks in Home app regardless of closing the zone.. so it looks like its reading the status of the DSC device in indigo correct at server startup. Could it be an issue with it refreshing that information after the initial start rather than what it’s reading?

@Colorado4Wheeler
Copy link
Collaborator

I believe this will be resolved in this next update.

@Colorado4Wheeler Colorado4Wheeler added bug Something isn't working potentially resolved or non-issue Bug that cannot be reproduced and may be fixed or a one-off user problem test results pending Issue is pending the outcome of test results or special build and removed enhancement New feature or request question Further information is requested labels Mar 28, 2018
Colorado4Wheeler pushed a commit that referenced this issue Mar 28, 2018
* Added additional sanity check on SecuritySpy servers that if they
don't have the xaddress populated to get the address from a different
field ([Issue
#81](#81))
* Added 'ProgramHeat' and 'ProgramCool' to conditions for sending
temperature set commands to a thermostat ([Issue
#79](#79))
* Fixed bug where if a thermostat was set to auto heat/cool that
changing temperatures in HomeKit would time out in the plugin because
the plugin didn't know what to set, it will now increase the heat if
the target temp is warmer than the current temp and increase cooling if
it is cooler
* Fixed bug where read-only HomeKit services may not get updates if not
specifically programmed (i.e., for DSC alarms) ([Issue
#86](#86))
* [Issue
#81](#81)
resolved
* [Issue
#79](#79)
resolved
* [Issue
#86](#86)
resolved
@durosity
Copy link
Author

Looks good!

@Colorado4Wheeler
Copy link
Collaborator

So fixed?

@durosity
Copy link
Author

Yup! Just going around testing a few different types on the off chance it broke them but all looks good. I think you’re safe to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device HomeKit device problem potentially resolved or non-issue Bug that cannot be reproduced and may be fixed or a one-off user problem test results pending Issue is pending the outcome of test results or special build
Projects
None yet
Development

No branches or pull requests

3 participants