gdombiak / OctoPod

Free open source client for OctoPrint
Apache License 2.0
225 stars 42 forks source link

Implementation of new Tradfri outlet plugin #332

Open ScharV opened 4 years ago

ScharV commented 4 years ago

Hey @gdombiak there is a new plugin called Ikea tradfri which allows you to switch on and off your printers ikea outlet. Would be nice to do this via octopod too. Plugin: https://github.com/ralmn/OctoPrint-Ikea-tradfri

Best regards ScharV

gdombiak commented 4 years ago

Nice new feature. Do you know how popular is this plugin? This plugin has its own unique API so adding support for it would be more involved. The other power plugins work very similar (since they were done by the same developer) so adding support for them was not much work.

I'm with limited time these days so trying to optimize it. :)

Thanks, Gaston

ScharV commented 4 years ago

Thanks for your fast reply💪🏼 Greetings Marv

ralmn commented 4 years ago

Hi,

I'm the creator of Tradfri plugin, I'm also interesting with this feature. I don't have time to see how to implement this feature in your app. But if you want my help to add endpoint in the API I can do that ;)

gdombiak commented 4 years ago

Hey @ralmn, nice meeting you!! It would be convenient to have the following APIs:

  1. API to get list of devices and their statuses if possible
  2. API to be able to turn on/off and pass name of device. API returns success code or some error code if operation failed.

Thanks, Gaston

ralmn commented 3 years ago

Sorry for the delay.

The ikea plugin handle only one plug.

So the two endpoint are :

It's on version 1.3.1 (https://github.com/ralmn/OctoPrint-Ikea-tradfri/releases/tag/1.3.1) & commit https://github.com/ralmn/OctoPrint-Ikea-tradfri/commit/12753023a808e9628b5896ffef902dfaa07d9fd7