Git Product home page Git Product logo

pimatic-hap's People

Contributors

dependabot[bot] avatar michbeck100 avatar sentzu01 avatar sweetpi avatar thexperiments avatar treban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pimatic-hap's Issues

Interference between pimatic-hap and Homeduino RF

This issue is already present for a while and reported in an other issue. Today I did a bit of debugging. If I disable the Hap plugin, it does not happen. As soon as I enable the pluging the interference starts.
As soon as I change the setting for my RF Dimmer it keeps oscillating between values. This behaviour is consistant. The only way to stop is to restart pimatic. I have enabled debug for homeduino and hap. Below the output.
This does not only happen with the dimmer but also with a switch. I have one door contact which activates a RFswitch. Sometime in keeps oscillating between ON/OFF. Again restarting is the only way out. This behaviour is not consistant.

16:50:09.744 [pimatic-homeduino] debug: Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:2 Pin:4 Repeats:1
16:50:10.481 [pimatic-homeduino] debug: data: "ACK"
16:50:10.518 [pimatic-homeduino] debug: data: "RF receive 352 2644 212 1258 10412 0 0 0 0102030203020302030203030202030302020302030203030203020203020303020302030202030203020303020203030203020203020302020203020302030203020302030302020304"
16:50:10.626 [pimatic-homeduino] debug: received: [ 212, 352, 1258, 2644, 10412 ] 1310121012101210121012121010121210101210121012121012101012101212101210121010121012101212101012121012101012101210101012101210121012101210121210101214
16:50:11.168 [pimatic-homeduino] debug: dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 2, state: undefined }
16:50:11.198 [pimatic-hap] debug: changing dimlevel of Lamp Bank to 13
16:50:11.214 [pimatic-homeduino] debug: Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:2 Pin:4 Repeats:1
16:50:11.283 [pimatic-hap] debug: changing dimlevel of Lamp Bank to 15
16:50:11.296 [pimatic-homeduino] debug: Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:2 Pin:4 Repeats:1
16:50:12.200 [pimatic-homeduino] debug: data: "ACK"
16:50:12.216 [pimatic-homeduino] debug: data: "RF receive 352 2640 211 1258 10408 0 0 0 0102030203020302030203030202030302020302030203030203020203020303020302030202030203020303020203030203020203020302020203020302030203020302030302020304"
16:50:12.236 [pimatic-homeduino] debug: received: [ 211, 352, 1258, 2640, 10408 ] 1310121012101210121012121010121210101210121012121012101012101212101210121010121012101212101012121012101012101210101012101210121012101210121210101214
16:50:12.261 [pimatic-homeduino] debug: dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 2, state: undefined }
16:50:12.278 [pimatic-hap] debug: changing dimlevel of Lamp Bank to 13
16:50:12.289 [pimatic-homeduino] debug: Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:2 Pin:4 Repeats:1
16:50:13.101 [pimatic-homeduino] debug: data: "ACK"
16:50:13.141 [pimatic-homeduino] debug: data: "RF receive 303 2660 214 1278 10444 0 0 0 0102030203020302030003030200030300000300030003030003000003000303000300030000030003000303000003030003000003000300000003000300030003000300030300000304"
16:50:13.164 [pimatic-homeduino] debug: received: [ 214, 303, 1278, 2660, 10444 ] 1310121012101210121112121011121211111211121112121112111112111212111211121111121112111212111112121112111112111211111112111211121112111211121211111214
16:50:13.184 [pimatic-homeduino] debug: dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 2, state: undefined }
16:50:13.214 [pimatic-hap] debug: changing dimlevel of Lamp Bank to 15
16:50:13.226 [pimatic-homeduino] debug: Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:2 Pin:4 Repeats:1
16:50:13.796 [pimatic-homeduino] debug: data: "ACK"
16:50:13.837 [pimatic-homeduino] debug: data: "RF receive 297 2672 212 1286 10452 0 0 0 0102030003000300030003030000030300000300030003030003000003000303000300030000030003000303000003030003000003000300000003000300030003000300030300000304"
16:50:13.860 [pimatic-homeduino] debug: received: [ 212, 297, 1286, 2672, 10452 ] 1310121112111211121112121111121211111211121112121112111112111212111211121111121112111212111112121112111112111211111112111211121112111211121211111214
16:50:13.881 [pimatic-homeduino] debug: dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 2, state: undefined }
16:50:13.897 [pimatic-hap] debug: changing dimlevel of Lamp Bank to 13

Cannot find module 'hap-nodejs/node_modules/debug'

For some reason I'm unable to install Pimatic-HAP. I tried doing a fresh Pimatic install and I still get this error: Cannot find module 'hap-nodejs/node_modules/debug'

Any idea what this could be?

Ubuntu version:

3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Screenshot of the error:
schermafbeelding 2016-09-12 om 21 17 08

In addition to this I tried installing it manually but then I get:

tim@Tim-server:~/pimatic-test/node_modules/pimatic-hap$ npm install debug
[email protected] /home/tim/pimatic-test/node_modules/pimatic-hap
├── [email protected]
└── UNMET PEER DEPENDENCY pimatic@~0.9.0

npm WARN [email protected] requires a peer of pimatic@~0.9.0 but none was installed.
npm WARN [email protected] No license field.

change temperature on COMETDECT-FRITZ!Box Thermostat through pimatic-hap

99% of the time the temp change through pimatic-hap / homekit doesn't always work

When changing the temp these are the 2 diffrent error which happen:

  • temp automatically changes every second up or down til restart of pimatic
  • home app tries to change the temp during a couple of min without success (exclamation marks error in home app thermostat widget) --> produces error in pimatic log

error seems related to pimatic-hap since changing temp directly in pimatic works flawless

error [pimatic]: A uncaught exception occured: Error: changeModeTo must be implemented by a subclass
at FritzThermostatDevice.HeatingThermostat.changeModeTo (/home/amiraoul/pimatic-app/node_modules/pimatic/lib/devices.coffee:602:17)
at [object Object]. (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/accessories/thermostat.coffee:68:20)
at emitMany (events.js:108:13)
at [object Object].emit (events.js:182:7)
at [object Object].Characteristic.setValue (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:155:10)
at Bridge. (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:727:22)
at Array.forEach (native)
at Bridge.Accessory._handleSetCharacteristics (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:672:8)
at emitMany (events.js:108:13)
at HAPServer.emit (events.js:182:7)
at HAPServer._handleCharacteristics (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:967:10)
at HAPServer. (/home/amiraoul/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:204:39)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:921:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
This is most probably a bug in pimatic or in a module, please report it!

Temperature and switch update

In version 3.2 there is something wrong with the temperature indication = 0, the contact status does not update and the switch update (on/off) does not update. In the debug log of pimatic the updates are submitted to hap. The value of a dimmer is updated that works. Also I can switch on off via eve.
I have done a complete fresh install. Both phone and pimatic.

pimatic-log-reader integration

hello i am using pimatic-logreader to read the temperature from an external sensor (logfile)

pimatic-log-reader

 {
      "plugin": "log-reader"
 },
{
      "id": "temperature-from-logfile-bad-h1",
      "name": "Bad Temperatur",
      "class": "LogWatcher",
      "file": "/home/pi/log/aa_t.log",
      "attributes": [
        {
          "name": "temperature",
          "type": "number",
          "unit": "°C"
        }
      ],
      "lines": [
        {
          "match": "temperature: (.+)",
          "temperature": "$1"
        }
      ]
    },

Is it possible to integrate this into pimatic-hap ?
Could you give me any hints where to pay attention, please.

Thx in advance
hans

Error installing packages

I tried sudo apt-get install libnss-mdns libavahi-compat-libdnssd-dev but I get this error:

ns libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libavahi-compat-libdnssd-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Only one davice can access the bridge

I just deleted the hap-database and freshly set up pimatic-hap with my iPhone. Worked fine and it works with the iPhone on the local network like a charm.

However... It is not working on the iPad anymore. Looks like all devices synced to the iPad from iCloud without problems but in the debug output of the plugin I see that there eems to be something wrong with authentication.

22:05:12.863 [pimatic-hap] debug: [d9:33:c1:bc:8c:3f] HAP Request: POST /pair-verify
22:05:12.869 [pimatic-hap] debug: [d9:33:c1:bc:8c:3f] Pair verify step 1/2

It never gets to 2/2 and I can se the same output when starting my appleTV.

Both worked before I set it up fresh.

Any idea what that could be?

Pimatic shell-sensor recognized and communicated to Homekit?

Hello, first of all thanks for this great plugin!

I have a question: is it possible to use pimatic-hap with pimatic-shell-execute? I'm using it to obtain the temperature via js script, but HomeKit is not recognizing it as temperature sensor (even after putting the correct service name in hap tag in config). Also wanted to use it to obtain relative humidity, but I suppose issue will be the same.

Example of the config
{
"attributeName": "Temperature",
"attributeType": "number",
"attributeUnit": "ºC",
"command": "node /home/pi/pimatic-app/scripts/TempQuartoDiogo2.js",
"interval": 60000,
"id": "temperatura-quarto-diogo",
"name": "Temperatura Quarto Diogo",
"class": "ShellSensor",
"hap": {
"service": "Thermostat"
}
}

Thanks and regards.

Cannot find module './accessories/contact'

With Version 0.5.0 I'm getting the following error:

17:34:32.941 [pimatic] info: Loading plugin: "pimatic-hap" (0.5.0)
17:34:33.067 [pimatic] error: Cannot find module './accessories/contact'

Any ideas how to fix it?

Devices not accessible in iOS10 Home App

Hey, I know its only 2 days out, but i want to inform you about an issue running pimatic-hap with iOS 10 dev beta 1 and the nativ "Home"-App.

Often when I open the Home app every switch and lamp says "no response" and cant be switched. I then have to go into the device details for some seconds and after that i can switch the device flawless.

For me (without any knowledge) it seems like the connection is shut down after some time without switching and only going into the device-prefs connects the devices again.

I recorded a video to show exactly what im talking about: https://youtu.be/u5vR5prcbYc

Strange thing: now 5 minutes after i recorded the video all devices are switchable again. This will change in some minutes (or even hours?)
Heres a screenshot of the app when devices are accessible:

pimatic-hap v. 0.6.3
pimatic v. 0.9.18
iPhone 6S iOS10

A uncaught exeption occured

After installing and configuring pimatic-hab using Eve it worked very good for a few hours.
This error message I got the next day. Restarting pimatic won't fix the problem. And the Eve app tells me the devices are unreacable. The homekit server can't be found anymore.

error [pimatic]: A uncaught exception occured: Error: dns service error: unknown at Advertisement.on_service_registered (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:42:24) at SocketWatcher.MDNSService.self.watcher.callback (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/mdns_service.js:18:40) This is most probably a bug in pimatic or in a module, please report it!

@michbeck100 what can I do to fix this?

Add null to the line

Hi I am just reading your code, not based on any direct error just by comparing... Should there not be null added to the end of line 157 of hap.coffee? I compared it with line 190. A bulb is the same as a switch?

Installing Plugin pimatic-hap under v0.9.25

When trying to instal pimatic-hap under newest pimatic version, i get the following output in Logfile:
11:25:52.790 [pimatic] info: Installing: "[email protected]" from npm-registry. 11:25:56.186 [pimatic, ppm] info: WARN peerDependencies The pimatic plugin pimatic-hap is maybe not compatible with your pimatic version. 11:26:17.776 [pimatic, ppm] info: > [email protected] install /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/curve25519 11:26:17.779 [pimatic, ppm] info: > node-gyp rebuild 11:26:22.470 [pimatic, ppm] info: make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/curve25519/build' 11:26:22.488 [pimatic, ppm] info: CXX(target) Release/obj.target/curve/node_curve.o 11:27:10.338 [pimatic, ppm] info: SOLINK_MODULE(target) Release/obj.target/curve.node 11:27:10.791 [pimatic, ppm] info: COPY Release/curve.node 11:27:10.829 [pimatic, ppm] info: make: Leaving directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/curve25519/build' 11:27:11.003 [pimatic, ppm] info: > [email protected] install /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/ed25519 11:27:11.010 [pimatic, ppm] info: > node-gyp rebuild 11:27:14.649 [pimatic, ppm] info: make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/ed25519/build' 11:27:14.654 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/keypair.o 11:27:19.234 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/sign.o 11:27:38.399 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/open.o 11:27:47.170 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/crypto_verify_32.o 11:28:08.174 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_double_scalarmult.o 11:28:08.852 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_frombytes.o 11:28:09.850 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_scalarmult_base.o 11:28:17.876 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_precomp_0.o 11:28:26.361 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_0.o 11:28:37.722 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p2_dbl.o 11:28:37.874 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_0.o 11:28:39.472 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_dbl.o 11:28:39.720 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_p2.o 11:28:39.964 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_to_cached.o 11:28:40.229 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p3_tobytes.o 11:28:40.485 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_madd.o 11:28:40.762 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_add.o 11:28:41.033 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_msub.o 11:28:41.187 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_sub.o 11:28:41.432 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p3.o 11:28:41.687 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_p1p1_to_p2.o 11:28:41.937 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/ge_tobytes.o 11:28:42.204 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_0.o 11:28:42.459 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_1.o 11:28:42.708 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_cmov.o 11:28:48.679 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_copy.o 11:28:53.038 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_neg.o 11:28:53.218 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_add.o 11:28:53.428 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_sub.o 11:28:53.708 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_mul.o 11:29:07.932 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq.o 11:29:20.421 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_sq2.o 11:29:21.967 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_invert.o 11:29:22.365 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_tobytes.o 11:29:24.167 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnegative.o 11:29:24.414 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_isnonzero.o 11:29:24.663 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_frombytes.o 11:29:25.403 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/fe_pow22523.o 11:29:25.730 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/sc_reduce.o 11:29:29.855 [pimatic, ppm] info: CC(target) Release/obj.target/ed25519/src/ed25519/sc_muladd.o 11:29:38.878 [pimatic, ppm] info: CXX(target) Release/obj.target/ed25519/src/ed25519.o 11:29:43.456 [pimatic, ppm] info: SOLINK_MODULE(target) Release/obj.target/ed25519.node 11:29:43.972 [pimatic, ppm] info: COPY Release/ed25519.node 11:29:44.009 [pimatic, ppm] info: make: Leaving directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/ed25519/build' 11:29:44.047 [pimatic, ppm] info: > [email protected] install /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns 11:29:44.051 [pimatic, ppm] info: > node-gyp rebuild 11:29:47.646 [pimatic, ppm] info: make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/build' 11:29:47.650 [pimatic, ppm] info: CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o 11:29:48.052 [pimatic, ppm] info: In file included from ../src/dns_sd.cpp:1:0: 11:29:48.053 [pimatic, ppm] info: ../src/mdns.hpp:32:20: fatal error: dns_sd.h: Datei oder Verzeichnis nicht gefunden 11:29:48.055 [pimatic, ppm] info: #include <dns_sd.h> 11:29:48.058 [pimatic, ppm] info: ^ 11:29:48.068 [pimatic, ppm] info: compilation terminated. 11:29:50.407 [pimatic, ppm] info: dns_sd_bindings.target.mk:142: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed 11:29:50.415 [pimatic, ppm] info: make: Leaving directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/build' 11:29:50.418 [pimatic, ppm] info: make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1 11:29:50.431 [pimatic, ppm] info: gyp ERR! build error 11:29:50.447 [pimatic, ppm] info: gyp ERR! stack Error:makefailed with exit code: 2 11:29:50.456 [pimatic, ppm] info: gyp ERR! stack at ChildProcess.onExit (/home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) 11:29:50.459 [pimatic, ppm] info: gyp ERR! stack at emitTwo (events.js:87:13) 11:29:50.461 [pimatic, ppm] info: gyp ERR! stack at ChildProcess.emit (events.js:172:7) 11:29:50.464 [pimatic, ppm] info: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 11:29:50.467 [pimatic, ppm] info: gyp ERR! System Linux 4.4.11-v7+ 11:29:50.485 [pimatic, ppm] info: gyp ERR! command "/usr/bin/nodejs" "/home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 11:29:50.488 [pimatic, ppm] info: gyp ERR! cwd /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns 11:29:50.492 [pimatic, ppm] info: gyp ERR! node -v v4.4.5 11:29:50.495 [pimatic, ppm] info: gyp ERR! node-gyp -v v3.3.1 11:29:50.500 [pimatic, ppm] info: gyp ERR! not ok 11:29:50.506 [pimatic, ppm] info: > [email protected] install /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum 11:29:50.509 [pimatic, ppm] info: > node-pre-gyp install --fallback-to-build 11:29:53.429 [pimatic, ppm] info: node-pre-gyp ERR! Tried to download: https://rvagg-node.s3-us-west-2.amazonaws.com/bignum/v0.12.5/bignum-v0.12.5-node-v46-linux-arm.tar.gz 11:29:53.434 [pimatic, ppm] info: node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp) 11:29:58.930 [pimatic, ppm] info: make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum/build' 11:29:58.943 [pimatic, ppm] info: CXX(target) Release/obj.target/bignum/bignum.o 11:30:12.511 [pimatic, ppm] info: SOLINK_MODULE(target) Release/obj.target/bignum.node 11:30:12.809 [pimatic, ppm] info: COPY Release/bignum.node 11:30:12.831 [pimatic, ppm] info: COPY /home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum/binding/bignum.node 11:30:12.854 [pimatic, ppm] info: TOUCH Release/obj.target/action_after_build.stamp 11:30:12.866 [pimatic, ppm] info: make: Leaving directory '/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum/build' 11:30:12.924 [pimatic, ppm] info: ERR! Linux 4.4.11-v7+ 11:30:12.928 [pimatic, ppm] info: ERR! argv "/usr/bin/nodejs" "/home/pi/pimatic-app/node_modules/pimatic/ppm.js" "install" "[email protected]" "--unsafe-perm" 11:30:12.936 [pimatic, ppm] info: ERR! node v4.4.5 11:30:12.937 [pimatic, ppm] info: ERR! npm v2.15.6 11:30:12.939 [pimatic, ppm] info: ERR! code ELIFECYCLE 11:30:12.949 [pimatic, ppm] info: ERR! [email protected] install:node-gyp rebuild 11:30:12.953 [pimatic, ppm] info: ERR! Exit status 1 11:30:12.954 [pimatic, ppm] info: ERR! 11:30:12.956 [pimatic, ppm] info: ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 11:30:12.957 [pimatic, ppm] info: ERR! This is most likely a problem with the mdns package, 11:30:12.959 [pimatic, ppm] info: ERR! not with npm itself. 11:30:12.961 [pimatic, ppm] info: ERR! Tell the author that this fails on your system: 11:30:12.962 [pimatic, ppm] info: ERR! node-gyp rebuild 11:30:12.964 [pimatic, ppm] info: ERR! You can get information on how to open an issue for this project with: 11:30:12.965 [pimatic, ppm] info: ERR! npm bugs mdns 11:30:12.967 [pimatic, ppm] info: ERR! Or if that isn't available, you can get their info via: 11:30:12.991 [pimatic, ppm] info: ERR! 11:30:12.994 [pimatic, ppm] info: ERR! npm owner ls mdns 11:30:12.996 [pimatic, ppm] info: ERR! There is likely additional logging output above. 11:30:18.180 [pimatic, ppm] info: ERR! Please include the following file with any support request: 11:30:18.204 [pimatic, ppm] info: ERR! /home/pi/pimatic-app/npm-debug.log 11:30:18.264 [pimatic] error: Error running "./node_modules/pimatic/ppm.js install [email protected] --unsafe-perm"

Status indication of dimming devices in iphone home app

Thanks for the support so far, the dimming devices are now working well within the home app. :-) Now the next observation. The dimming devices are shown as ON with the latest dimming % even though they are switched off via pimatic.
I think this has to do with the two ways of switching the lamps OFF.

  • Sliding the slider to 0 via pimatic. -> Need to check what the indication in home app is.
  • Sending the OFF signal via a rule within pimatic.
    As I use the last option for at least one of my devices I think that is the case.

I will test some more upon this for debug input...

make debug messages configurable

Since the debug messages from hap-nodejs can get a little bit too much after a while, it should configurable, so one can switch the debug messages on and off.

Some hints about the usage of promises

Great work. I like the plugin very much. However, unfortunately I don't have a ios device for testing.

I did spot some errors in the code, I want to point out to improve it a little bit:

device.changeStateTo(value).then( callback() )

You are calling the callback, before the actions finished, because you are passing the result of the callback call to the then handler. You probably call the callback in the then handler:

device.changeStateTo(value).then( => callback() )

This parses a function, that calls the callback to the handler. Which is the right way.

Further you should handle errors:

device.changeStateTo(value)
  .then( => callback() )
  .catch( (error) => callback(error) )
  .done()

catch catches an error and passes it to the callback. done throws all unhandled errors.


...
        device.turnOff().then(
          device.turnOn().then(
            device.turnOff().then(
            ...

The same problem here. You parsing the result of device.turnOn() to the then handler. However you want to pass a function, that calls turnOn:

...
        device.turnOff().then( =>
          device.turnOn().then( =>
            device.turnOff().then( =>
            ...

You can even flatten the callback chain here:

      device.getState().then( (state) =>
       device.turnOff()
      ).then( =>
        device.turnOn()
      ).then( => 
        device.turnOff()
      ).then( =>
        device.turnOn()
      ).then( =>
        # recover initial state
        device.turnOff() if not state
      )
      .then( => callback() )
      .catch( (error) => callback(error) )
      .done()

As rule of thumb: Always make sure to pass a function => ... to a then handler. Further end each chain of promise class with a .catch( (error) => callback(error) ), if you want to pass the error to a callback and with .done() to not silently discard errors.

Property "hap" is not a valid property

Hello, I have this configuration, but I get this error:

Invalid config of device "switch": Property "hap" is not a valid property

"devices": [
{
"id": "home-switch",
"name": "Fritz outlet",
"class": "FritzOutlet",
"ain": "087610239316",
"hap": {
"service": "Lightbulb",
"exclude": false
}
}
]

Temperature Minimum is 0.0 Degrees

My outside temperature sensor (GT-WT-02) is measuring -7.6 degrees Celsius right now. This is also displayed in the log and in the pimatic frontend. However, Eve is showing 0.0 degrees Celsius.
Temperature values seem to be displayed correctly when >= 0.0 degrees.

Log:
21:24:24.072 [pimatic-homeduino] debug: weather12: { id: 43,
21:24:24.072 [pimatic-homeduino] debug:> channel: 1,
21:24:24.072 [pimatic-homeduino] debug:> temperature: -7.6,
21:24:24.072 [pimatic-homeduino] debug:> humidity: 89,
21:24:24.072 [pimatic-homeduino] debug:> lowBattery: false }

make service for switches configurable

Sometimes it makes sense to override the default service for power outlets, if eg. a lamp is connected to the switch. Depending on the assigned service the command Siri understands can be different. Especially the command for switching lights is more intuitive than for switching outlets.

Slidings back dimmers?

My dimmers now seam to slide back to 0 after setting the value but they keep burning. This is both in pimatic and in eve. It looks like some interference between both pimatic-hap and the core? Does anybody else has this behaviour. I have juist update everyting to the latent official releases. No github yet for hap.

v0.2.0 crash with contact

v0.2.0 issue with contact.
When a contact is triggered pimatic crash with the following error message.

08:29:08.759 [pimatic-hap] debug: contact sensor state changed. Notifying iOS devices.
08:29:09.422 [pimatic] error: A uncaught exception occured: ReferenceError: getHomekitState is not defined
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.<anonymous> (/root/pimatic-git/node_modules/pimatic-hap/hap.coffee:264:65)
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.EventEmitter.emit (events.js:117:20)
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.ContactSensor._setContact (/root/pimatic-git/node_modules/pimatic/lib/devices.coffee:428:8)
08:29:09.422 [pimatic] error:>    at Board.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/homeduino.coffee:520:14)
08:29:09.422 [pimatic] error:>    at Board.EventEmitter.emit (events.js:117:20)
08:29:09.422 [pimatic] error:>    at Board._emitReceive (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:352:12)
08:29:09.422 [pimatic] error:>    at Board._handleRFControl (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:337:10)
08:29:09.422 [pimatic] error:>    at Board._onLine (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:142:21)
08:29:09.422 [pimatic] error:>    at SerialPortDriver.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:83:22)
08:29:09.422 [pimatic] error:>    at SerialPortDriver.EventEmitter.emit (events.js:95:17)
08:29:09.422 [pimatic] error:>    at SerialPort.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/driver/serialport.js:60:24)
08:29:09.422 [pimatic] error:>    at SerialPort.EventEmitter.emit (events.js:95:17)
08:29:09.422 [pimatic] error:>    at /root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/parsers.js:25:17
08:29:09.422 [pimatic] error:>    at Array.forEach (native)
08:29:09.422 [pimatic] error:>    at Object.parser (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/parsers.js:24:13)
08:29:09.422 [pimatic] error:>    at Object.SerialPort.options.dataCallback (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:168:15)
08:29:09.422 [pimatic] error:>    at SerialPortFactory.SerialPort._emitData (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:350:20)
08:29:09.422 [pimatic] error:>    at afterRead (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:326:20)
08:29:09.422 [pimatic] error:>    at /root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:342:9
08:29:09.422 [pimatic] error:>    at Object.wrapper [as oncomplete] (fs.js:454:17)
08:29:09.422 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
08:29:09.428 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic so soon as possible!

dns service error

Since today, the server logs show the following error:

error [pimatic]: A uncaught exception occured: Error: dns service error: unknown
at Advertisement.on_service_registered (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:42:24)
at SocketWatcher.MDNSService.self.watcher.callback (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/node_modules/mdns/lib/mdns_service.js:18:40)
This is most probably a bug in pimatic or in a module, please report it!

Any Ideas?

Flickering lights/lights turning on on startup

Hi,
for some time now my hues were turned on when I restarted pimatic. I now found out that this doesn't happen when I disable the hap plugin. Today it even startet toggeling my Kitchen light like crazy when I restarted.

17:57:08.647 [pimatic] info: New device "Stehlampe Schlafzimmer"...
17:57:08.658 [pimatic-hap] debug: successfully added device Stehlampe Schlafzimmer

Turning on the hue in my bedroom

17:57:24.045 [pimatic-hap] debug: switching device Stehlampe Schlafzimmer to false
17:57:24.059 [pimatic-hap] debug: changing dimlevel of Stehlampe Schlafzimmer to 100

and the others also (It is setting them to false but I think changing the dimlevel causes them to turn on)

17:57:24.045 [pimatic-hap] debug: switching device Stehlampe Schlafzimmer to false
17:57:24.059 [pimatic-hap] debug: changing dimlevel of Stehlampe Schlafzimmer to 100
17:57:24.073 [pimatic-hap] debug: switching device Indirekt Wohnzimmer 1 to false
17:57:24.076 [pimatic-hap] debug: changing dimlevel of Indirekt Wohnzimmer 1 to 100
17:57:24.083 [pimatic-hap] debug: switching device Indirekt Wohnzimmer 2 to false
17:57:24.085 [pimatic-hap] debug: changing dimlevel of Indirekt Wohnzimmer 2 to 100
17:57:24.093 [pimatic-hap] debug: switching device Indirekt Wohnzimmer 4 to false
17:57:24.097 [pimatic-hap] debug: changing dimlevel of Indirekt Wohnzimmer 4 to 0
...
17:58:02.451 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.502 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.541 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.584 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.619 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.658 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.701 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.741 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.782 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.829 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.871 [pimatic-hap] debug: switching device Licht Küche to false
17:58:02.916 [pimatic-hap] debug: switching device Licht Küche to true
17:58:02.961 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.001 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.041 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.080 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.130 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.168 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.214 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.251 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.290 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.331 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.369 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.412 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.456 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.494 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.534 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.571 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.614 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.661 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.708 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.752 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.788 [pimatic-hap] debug: switching device Licht Küche to false
17:58:03.832 [pimatic-hap] debug: switching device Licht Küche to true
17:58:03.883 [pimatic-hap] debug: switching device Licht Küche to false
...

Why is it changing something in the startup state? I would guess the first thing the plugin should do after startup is to communicate the current states to homekit.

Identify doesn't works for led-light

When I want to identify a led-light I get this error:

error [pimatic]: A uncaught exception occured: TypeError: Object #<Object> has no method 'then'
    at LedLightAccessory.SwitchAccessory.identify (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/switch.coffee:15:10)
    at LedLightAccessory.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/switch.coffee:1:1)
    at LedLightAccessory.identify (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:1:1)
    at LedLightAccessory.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:21:10)
    at LedLightAccessory.EventEmitter.emit (events.js:98:17)
    at LedLightAccessory.Accessory._identificationRequest (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:104:10)
    at LedLightAccessory.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:73:14)
    at EventEmitter.emit (events.js:106:17)
    at Characteristic.setValue (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:151:10)
    at Bridge.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:537:22)
    at Array.forEach (native)
    at Bridge.Accessory._handleSetCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:486:8)
    at HAPServer.EventEmitter.emit (events.js:106:17)
    at HAPServer._handleCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:696:10)
    at HAPServer.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:178:39)
    at IncomingMessage.EventEmitter.emit (events.js:92:17)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)
 This is most probably a bug in pimatic or in a module, please report it!

Accessing Homekit with multiple Devices

Hey,

first of all great work!
Unfortunately im having a problem. Im only able to connect with one iDevice at the same time.
Ive got a iPhone and an iPad but i am can only connect with one device.
The other device has access to the homekit but the devices are all unreachable.

Any help would be awesome.
Sorry for my bad language.

thanks in advance,

Tom

Add Humidity sensors

I have some humidity sensors attached to my pimatic. How could these be exposed to homekit?

Shutter device always open

Hello @michbeck100,

i have a IOS10 GM install and a shutter device. If i open the blind with pimatic - iOS tells me every Time "Jalousie geöffnet" (Blind OPEN).

I tink there is a error in the communication between Pimatic and hap/IOS.

How can i reproduce that, that u can work with it?

Cannot find accesory

Hi,

I have updated to the latest version by removing all the files and the hap database but somehow I am not able to find the pimatic via eve. I have removed the homekit also from my Phone.
How can I debug it? Somebody else having the same issue?

Pimatic-hap form outside the Wifi

Hello, i'm using piratic-hap for several weeks now. it works fine. I also own an apple TV3 and at the beginning it worked as HomeKit Bridge to control home kit form outside my home but now i need to be connected with my iPhone to the same wifi as my pimatic to control over homekit.
somebody know what to do to get it working again from outside?

Exclude devices from HomeKit

Hi,

it would be great to exclude specific devices from homekit.

PS. Thank you very much for this amazing plugin :)

ShellSwitch executes twice & Sliding back dimmers

sadly i have two other issues with the pimatic-hap plugin:

1) Shell Switch executes twice
If hap is activated the command of my ShellSwitch always gets activated (and deactivated) twice.
If hap is deactivated everything works as it should and even the same command with a DummySwitch combined with a rule works without problem if hap is activated.

The log does only show one state change (not explaining the two executions):

09:42:40 debug [pimatic-hap]: switching device to true
09:42:39 debug [pimatic-hap]: switching device to false

there was someone with the same issue: pimatic/issue#792

2) Sliding back dimmers
Similar to this hap issue#25 the dimmer of my led-device keeps on sliding to 100% brightness whenever i click on a color. And as 100% Brightness is plain white thats pretty bad.
Same as above: doesn't occur when deactivating hap, no special info in the log
Video with log

Note: in the beginning at 10 sec mark you can see the other Issue i have: pimatic-hap/issue#36

In some threads i saw you talking about sliding back dimmers and double execution, but they didnt have a specific fix.
I'm a github beginner, but i saw that v0.9.x branch is "5 commits ahead, 11 commits behind master."
Maybe some of the fixes didnt made it to 0.9 branch?!

Can't change color

I can't change the color via siri.

I get the following error message:
error [pimatic]: A uncaught exception occured: TypeError: Cannot read property '0' of undefined
at convert.rgb.hex (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/color-convert/conversions.js:574:33)
at /usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/color-convert/route.js:60:10
at Object.wrappedFn as hex
at null. (/usr/local/pimatic-app/node_modules/pimatic-hap/accessories/ledlight.coffee:93:29)
at EventEmitter.emit (events.js:106:17)
at Characteristic.setValue (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:151:10)
at Bridge. (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:537:22)
at Array.forEach (native)
at Bridge.Accessory._handleSetCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:486:8)
at HAPServer.EventEmitter.emit (events.js:106:17)
at HAPServer._handleCharacteristics (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:696:10)
at HAPServer. (/usr/local/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:178:39)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
This is most probably a bug in pimatic or in a module, please report it!

Config in type of switch

Would there be a possibility to change the type of switch. Now dimmer is indicated as a lamp with power switch. To Some kaku switches I have a lamp connected, would be nice if they can be identified as lamps in EVE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.