moroen / IKEA-Tradfri-plugin

A Python plugin for Domoticz to controll IKEA Gateway
68 stars 23 forks source link

Reboot #118

Closed dbgnu76 closed 3 years ago

dbgnu76 commented 3 years ago

Is there any chance maybe for you to implement a reboot command to the gateway ! Like https://antoinealb.net/2019/08/10/automatically-rebooting-tradfri-gateway.html

moroen commented 3 years ago

That I can do, how would you like this in the domoticz interface? A push-button to reset the gateway? Such a button could be scheduled in the usual domoticz manner.

basrieter commented 3 years ago

That would be very much appreciated, especially as the gateway will become unresponsive after a longer period. Just rebooting it every week will work around that.

Bolten88 commented 3 years ago

Cool. This would be nice!

dbgnu76 commented 3 years ago

That I can do, how would you like this in the domoticz interface? A push-button to reset the gateway? Such a button could be scheduled in the usual domoticz manner.

Exactly, That would be very nice with a button in domoticz , perfectly 👍

superbra plugin , bra jobbat !

moroen commented 3 years ago

The latest development version (0.9.15) adds a push button that reboots the gateway, this can be scheduled just like any other button.

I've made another change that I've been planning for quite a while, but been a bit reluctant to do, but it is about time.

Tradfricoap (the API for controlling the gateway) has been separated out into it's own module, available on pypi. On well configured systems where the interactive interpreter is the same as the one used by domoticz, the upgrade should be simple:

$ cd plugins/IKEA-Tradfri
$ git checkout development
$ git pull
$ rm -rf tradfricoap
$ sudo -H pip3 install tradfricoap

On systems where domoticz is unable to use system modules, tradfricoap can still be installed into the plugin directory with git:

$ cd plugins/IKEA-Tradfri
$ git clone https://github.com/moroen/tradfricoap.git

For systems using coapcmd, there is a new version of this as well:

$ cd plugins/IEKA-Tradfri
$ sh ./install_coapcmd.sh

or download the latest prebuild binaries.

dbgnu76 commented 3 years ago

This is so great, and it is working like a charm :) Well Done :)

basrieter commented 3 years ago

Works like a charm here.

Bolten88 commented 3 years ago

I've installed the latest version and upgraded tradfricoap. Everything works great. I think (but not sure) that it looks like it's reacts faster on on/off command. But it's hard to meassure when it is only a few miliseconds.

moroen commented 3 years ago

I've been running this version for a while my self, and it seems to work. Merged into master, and closing issue.

Bolten88 commented 3 years ago

@moroen thanks again for all the effort. I'm still running the development version because of these reasons:

  1. battery monitoring issue #117
  2. Reboot button #118
  3. The upgrade to the new tradfricoap (#118 as well?)

If i'm understanding you correctly i could move to master again right?

moroen commented 3 years ago

@Bolten88

Yes, you should be able to use the laster master, fixes those three issues have been merged into master, version 0.10.0