pi@pi ~/pimatic-app $ sudo node_modules/pimatic/pimatic.js
18:47:35.115 2017-06-18 Sunday
18:47:44.395 [pimatic] Starting pimatic version 0.9.39
18:47:44.812 [pimatic] settings.debug is true, showing debug output for pimatic core.
18:47:48.106 [pimatic, ppm] 2.15.12
18:47:48.187 [pimatic] Loading plugin: "pimatic-cron" (0.8.8)
18:47:48.967 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.11)
18:47:50.114 [pimatic] Loading plugin: "pimatic-tradfri" (0.1.8)
18:47:50.118 [pimatic] debug is true in plugin config, showing debug output for pimatic-tradfri.
18:47:50.479 [pimatic] Invalid config of pimatic-tradfri: Missing property "rampup"
18:47:50.494 [pimatic] Loading plugin: "pimatic-ping" (0.9.5)
18:47:50.498 [pimatic] debug is true in plugin config, showing debug output for pimatic-ping.
18:47:50.581 [pimatic-cron] the time is: Sun Jun 18 2017 18:47:50 GMT+0300 (EEST)
18:47:50.597 [pimatic-tradfri] Plugin initialization...
18:47:50.602 [pimatic-tradfri] tradfri cfg: Gateway IP: 192.168.1.208 KEY: hwaqPec........
18:47:51.229 [pimatic] New device "Tradfri Hub"...
18:47:51.288 [pimatic] New device "Tradfri Dimmer"...
18:47:51.759 [pimatic-mobile-frontend] packing static assets
18:47:53.943 [pimatic-mobile-frontend] packing static assets finished
18:47:53.958 [pimatic-mobile-frontend] rendering html
18:48:08.115 [pimatic-mobile-frontend] rendering html finished
18:48:08.190 [pimatic] Listening for HTTP-request on port 80...
18:48:08.197 [pimatic-tradfri] Try to connect to Tradfri
step() beginning
step() beginning
step() beginning
step() beginning
step() beginning
18:48:18.260 [pimatic-tradfri] ...connection error!
18:48:18.268 [pimatic-tradfri] Try to connect to Tradfri
step() beginning
step() beginning
step() beginning
-
New pimatic tradfri plugin / IKEA Smart Lights
-
This looks like an SSL error. The key is really ok?
I get exactly the same error, if the psk is different.
Maybe a typo with O / 0 or 1 / l -
I am ashamed. It’s my shame. I confused “I” with “1”.
I apologize for your lost time. I’m very very sorry.
Plugin works very well.
Once again I thank you for your work. -
@Andi-Tudor You are welcome!
And some new features will come soon…
-
I have release a new version. 0.1.9
Features
- Scenes/Moods
- Stepless light temperature change with new slider device
- New device option: transition time for smooth changes
- Action provider for all features (set color…)
- Presence of lights
- GUI optimization
The old buttons device is already available but
you should rescan the devices and change it with the new slider device.You should also clean the browser cache after update.
Hint: If you have two pimatic devices for the same bulb, only one of them is observing external changes.
@Felix-Haverkamp : moods are now available
-
@kosta Thank you for updating. For me everything works well.
-
@kosta , Very nice!
I updated the plugin and did get an error;19:43:38.810 [pimatic] error: A uncaught exception occurred: TypeError: Cannot read property 'send' of null 19:43:38.810 [pimatic] error:> at DtlsClientSocket.dgramSocket.once.send (/home/pi/pimatic-app/node_modules/pimatic-tradfri/node_modules/tradfri-coapdtls/node_modules/node-mbed-dtls/client_socket.js:63:22) 19:43:38.810 [pimatic] error:> at RetrySend._send (/home/pi/pimatic-app/node_modules/pimatic-tradfri/node_modules/tradfri-coapdtls/lib/retry_send.js:37:14) 19:43:38.810 [pimatic] error:> at null.RetrySend._bOff [as _onTimeout] (/home/pi/pimatic-app/node_modules/pimatic-tradfri/node_modules/tradfri-coapdtls/lib/retry_send.js:29:10) 19:43:38.810 [pimatic] error:> at Timer.listOnTimeout (timers.js:92:15) 19:43:38.810 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it! 19:43:38.813 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
Did another restart of pimatic and it started up without any errors.
Time to get more Tradfri bulbs
Question;
Does the Tradfri hub do a re-transmit if it doesn’t get an “ACK” from the bulb ? Or is that something the tradfri plugin can do? -
I had the same error one time in my production system. The ssl library which i use is timing sensitiv.
I’m working on a resolution of this problem.The Plugin sends a change request 3 times. If it isn’t successfull, the gateway is marked as down. After that, the
plugin makes a cleanup of the ssl-connection to the hub and trys each 10 secounds a full re-establish of the connection.The Hub always reponse with an ACK if the request ist accepted,
and try to send the change to the bulb. I’m not shure how often. But if the bulb is not reachable, the hub send some time later an observing message which marks the bulb down. And the plugin shows the bulb as offline.
If the Bulb is reachable the hub send the new status over the observing channel to the plugin and the status is refreshed. -
Check, thanks!
-
Thanks for the plug-in!
Just made a pull request to make the lights ready for pimatic-hap integration.
I also created a pull request for the needed pimatic-hap changes. works fine here.In general I found that the Tradfri system is still less stable and slower than HUE although they are based on the same technology. I hope this will be improved with future updates.
-
There is a thing with the plug-in that when you dim the light to 0% the light goes out. After that, when you turn on the light with the on/off toggle it goes back to 0% (because it sets to the latest dim level)
Is this something that can be set in the plugin ?If not, then I can off course fix this with a rule, but is would be nice to have this in the plugin itself!
-
That’s a bug. I’m currently working on this. Today I will release a new update.
-
hey pimatic crowd,
new version is published. v0.1.11
This should fix the exception errors and some other bugs.
Clear cache after the update.There is now a new device class for remotes/motion sensors available.
Status and battery can be observed now.@Rutger: Please check if the problem with the 0% dim and on/off toggle is fixed.
I couldn’t reproduce it. -
@kosta Yes! It works, thanks.
-
the exception at pimatic start is gone now! good work
the problem with brightness at switch on, is i think too solved!
good work @kosta
will monitor this both problems and give a final feedback if there are still problems.
-
@thex said in New pimatic tradfri plugin / IKEA Smart Lights:
Thanks for the plug-in!
Just made a pull request to make the lights ready for pimatic-hap integration.
I also created a pull request for the needed pimatic-hap changes. works fine here.In general I found that the Tradfri system is still less stable and slower than HUE although they are based on the same technology. I hope this will be improved with future updates.
Is this working already? When I try to switch a group (the only thing that shows up in the Home app), pimatic crashes. The bulbs don’t show up in Home app despite the HAP properties are set for them.
17:46:19.229 [pimatic] An uncaught exception occurred: TypeError: promise.then(...).catch(...).done is not a function 17:46:19.229 [pimatic]> at PowerSwitchAccessory.BaseAccessory.handleVoidPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:46:10) 17:46:19.229 [pimatic]> at PowerSwitchAccessory.handleVoidPromise (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/base.coffee:1:1) 17:46:19.229 [pimatic]> at null.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/accessories/switch.coffee:35:12) 17:46:19.229 [pimatic]> at emitMany (events.js:108:13) 17:46:19.229 [pimatic]> at null.emit (events.js:182:7) 17:46:19.229 [pimatic]> at null.Characteristic.setValue (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Characteristic.js:155:10) 17:46:19.229 [pimatic]> at Bridge.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:740:22) 17:46:19.229 [pimatic]> at Array.forEach (native) 17:46:19.229 [pimatic]> at Bridge.Accessory._handleSetCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/Accessory.js:685:8) 17:46:19.229 [pimatic]> at emitMany (events.js:108:13) 17:46:19.229 [pimatic]> at HAPServer.emit (events.js:182:7) 17:46:19.229 [pimatic]> at HAPServer._handleCharacteristics (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:972:10) 17:46:19.229 [pimatic]> at HAPServer.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-hap/node_modules/hap-nodejs/lib/HAPServer.js:209:39) 17:46:19.229 [pimatic]> at emitNone (events.js:67:13) 17:46:19.229 [pimatic]> at IncomingMessage.emit (events.js:166:7) 17:46:19.229 [pimatic]> at endReadableNT (_stream_readable.js:913:12) 17:46:19.229 [pimatic]> at nextTickCallbackWith2Args (node.js:442:9) 17:46:19.229 [pimatic]> at process._tickCallback (node.js:356:17) 17:46:19.229 [pimatic]> This is most probably a bug in pimatic or in a module, please report it! 17:46:19.247 [pimatic] shutting pimatic down... /home/pi/pimatic-app/node_modules/pimatic/startup.coffee:98 return framework.destroy().then(function() { ^ ReferenceError: framework is not defined at process.uncaughtException (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:85:9) at emitOne (events.js:77:13) at process.emit (events.js:169:7) at process._fatalException (node.js:224:26)
EDIT: following this pull request, by adding these two lines you can see the bulbs in the Homekit app, they work fine
Also: It would be nice if it is be possible to flash the bulbs once, e.g. when a presence sensor is triggered.
-
One other thing: when setting a rule that includes a dim level and a color temperature for the bulb, it changes it both inside pimatic, but the bulb only changes color.
-
@whatson i can’t test the homekit interface because i don’t have an apple device,
but nice to hear that it works with the upcoming pull request for the hap-plugin.
I will check the problem with the group device.The problem with the rule is a bug. I have the same problem, but i see that the
plugin send the new dim value and the gateway also responds the new value.
It needs some test to fix that.The flashing feature is a good idea. Now it would be possible over a rule.
But i will pick it up for the next release. -
@kosta I kinda fixed it by delaying the dim commands by 1 second (also tried 100ms and 500ms but those seem to fast) I fixed the all lights situation by creating a dummy switch that keeps in sync with the all lights switch. I now switch the dummy switch in Homekit instead. That works fine, but ofc not ideal.