PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

"SubType" : "Kangtai / Cotech" with "SwitchTypeVal" : 8 - Motion sensor not supported. #86

Closed jorgeruimachado closed 7 years ago

jorgeruimachado commented 7 years ago
{
   "ActTime" : 1498646892,
   "ServerTime" : "2017-06-28 11:48:12",
   "Sunrise" : "06:03",
   "Sunset" : "21:10",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 30.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
         "HardwareTypeVal" : 1,
         "HaveDimmer" : false,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "46D2",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2017-06-28 11:08:21",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 0,
         "Name" : "Movimento Garagem",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Off",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "Kangtai / Cotech",
         "SwitchType" : "Motion Sensor",
         "SwitchTypeVal" : 8,
         "Timers" : "false",
         "Type" : "Lighting 5",
         "TypeImg" : "motion",
         "Unit" : 7,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "4"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

This device works fine on domoticz, but the stat does not pass to HomeKit. Can you take a look at it? Thanks in advanced!

rswilem commented 7 years ago

Hi @jorgeruimachado

I have just tested the motion sensor with the same configuration as you have specified. It shows up in HomeKit and also seems to work. What NodeJS version are you on? There are a few problems with 8+.

jorgeruimachado commented 7 years ago

Yes it shows on HomeKit, but does not alter the state, at least for me..

NodeJS version: v7.10.0

rswilem commented 7 years ago

Try restarting your HomeBridge. And try directly after. Does that have any effect?

The reason I'm saying this is because I have the same problem, but on NodeJS 8. NodeJS 7.1 works for me!

PS. Might be a stupid question, but is your garage sensor in range of your RFXComm? 🙈

jorgeruimachado commented 7 years ago

The sensor shows and works well on Domoticz, them it's in range... After restarting no effect, it does not alter home kit state. I even tested this sensor only. turned off the other one, a OWL power meter, that works fine. By the way, do you know if some one manage to add graphics for this meter on the EVE app?

jorgeruimachado commented 7 years ago

Formated the Pi installed Domoticz - Now the sensor is recognized as a Lighting 4 Installed homebridge and homebridge-domoticz

The motion sensor now shows on HomeKit, BUT it does not send notification when it fires on all the occasion. This sensor works without flow on domoticz, but in HomeKit, even when in domoticz the sensor is active, sometimes (most of the times) HomeKit does not give the same state as in domoticz.

jorgeruimachado commented 7 years ago

After 1 day of fresh installed OS homebrige etc. Something continues to be wrong... The sensor show and work well on Domoticz, but HomeKit show is sometimes, the notification only worked 2 to 3 times, on a universe of 30+ activation.

Something is not good

rswilem commented 7 years ago

Wow, so weird! There is something wrong with the message throughput. Seems like the plugin gets the message every time though. Just that when it asks Homebridge to update it doesn't want to. I'm investigating... What iOS version are you on?

rswilem commented 7 years ago

Try and update your homebridge, homebridge modules (npm update in the homebridge directory) and homebridge-edomoticz and it's modules. The issue is now resolved for me!