genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
403 stars 157 forks source link

Cannot set sensor to 'Security Alarm System' - reverts to 'Energy Montior' upon save #330

Closed alphaDev23 closed 5 years ago

alphaDev23 commented 6 years ago

Using 1.1 beta r526.

The only logs that possible relate to this are the following: 2018-09-06 19:37:49.5294 Info HomeAutomation.HomeGenie Scheduler Scheduler Routed Event Scheduler.OnModuleUpdateStart Behavior.SensorTimeout 2018-09-06 19:37:49.5302 Info HomeAutomation.HomeGenie Scheduler Scheduler Routed Event Scheduler.OnModuleUpdateEnd Behavior.SensorTimeout 2018-09-06 19:37:51.0378 Info HomeAutomation.EnergyMonitor 1 - Program.UiRefresh Energy Monitor data updated 2018-09-06 19:37:51.0378 Info HomeAutomation.HomeGenie Scheduler Scheduler Routed Event Scheduler.OnModuleUpdateStart Behavior.SensorTimeout 2018-09-06 19:37:51.0378 Info HomeAutomation.HomeGenie Scheduler Scheduler Routed Event Scheduler.OnModuleUpdateEnd Behavior.SensorTimeout 2018-09-06 19:37:51.0529 Info WebServiceGateway 172.18.0.1 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.EnergyMonitor/1/ [OPEN] 2018-09-06 19:37:51.0529 Info WebServiceGateway 172.18.0.1 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.EnergyMonitor/1/ [CLOSED AFTER 0 seconds]

Expected: Security Alarm System is saved as a setting

genemars commented 6 years ago

In order to help investigate the issue, please fill in the following form:


Expected behavior

Actual behavior

Steps to reproduce the problem starting from a fresh install

1. 2. 3.

Specifications

Additional configuration notes


alphaDev23 commented 6 years ago

Expected: Security Alarm System is saved as a setting when set on a sensor Actual behaviour: Security Alarm System is not saved as a setting when set on a sensor Steps to reproduce:

  1. Add sensor module to a group
  2. Configure the sensor's features/options to "Security Alarm System"
  3. Change "Use as security sensor" or "Also triggered when home" (it doesn't matter because setting/not setting these does not change the actual behavior.
  4. Click Save
  5. Reopen the configuration to verify that the settings has been saved. (It is not)

Specifications: OS: Ubuntu 16.04 in docker 18.06.1-ce. Hardware configuration: Irrelevant because it occurs regardless of the interface.

Additional notes: The sensor works as expected in the interface (showing when it is triggered).

genemars commented 6 years ago

mono runtime version?

genemars commented 6 years ago

where this sensor come from? I mean what is the domain/address and what widget is used to display it?

alphaDev23 commented 6 years ago

Install is standard Ubuntu 16.04 and HomeGenie was install from https://github.com/genielabs/HomeGenie/releases/download/v1.1-beta.526/homegenie-beta_1.1.r526_all.deb

How is the mono runtime version determined?

Sensor is from a USB device port. Note, the settings under "Basic security alarm system" are saved but the Features/Options in the dropdown are not.

genemars commented 6 years ago

run this command in a terminal:

mono --version

how did you make HomeGenie recognize this USB sensor?

alphaDev23 commented 6 years ago

Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen

genemars commented 6 years ago

Can you give further details about this sensor and how it is handled in your homegenie config? Which driver/program are you using to recognize this USB sensor in hg?

tuicemen commented 6 years ago

I have the same issue with X10 security motion sensors if set as a sensor with the feature/options set as security the next time I open it ,it is set as an energy monitor. If I set it as a door window sensor and security as the feature option the setting sticks however If I chose sensor it reverts to security

I also experience this with the generic IP camera under sensors if I return to the setup it displays as a energy monitor as well however switching it back to generic IP camera shows the saved info and I have no problems with the cameras displaying. It seems no mater what you set the feature/options to it always reverts back to energy monitor.

genemars commented 6 years ago

@tuicemen The group (Energy Monitor ,Generic IP Camera, Security Alarm System) is just a group name and it is not meant to stick to the last selected one. The options inside the selected group are meant to persist after save. So since you say they are saving then everything is working as expected.

tuicemen commented 6 years ago

@genemars thanks for that info. I wasn't to concerned about it as cameras work and info entered does get saved. I only mentioned it as I assumed this was what @alphaDev23 was referring to.

genemars commented 6 years ago

@tuicemen ok, if so then maybe @alphaDev23 can close the issue?

tuicemen commented 6 years ago

@genemars I wonder if what I'm seeing in issue #332 is may be what @alphaDev23 is seeing however they don't mention a service restart or OS reboot.