Giter VIP home page Giter VIP logo

homeassistant-myjdownloader's People

Contributors

asthowen avatar doudz avatar hummel95 avatar leandroissa avatar nyaran avatar oribafi avatar toalex77 avatar unfocused avatar viper5000 avatar wrt54g 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

homeassistant-myjdownloader's Issues

Poor configuration documentation - setup does not work

I set up sensor according to https://github.com/doudz/homeassistant-myjdownloader#configuration.

Restarted HA several times.

What is supposed to happen?

There´s no new integration when trying to manually add a new one.

There´s no new sensor.

Nothing.

Only log entry is

2020-12-07 21:40:50 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for myjdownloader which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

Is it a bug or do I just don´t get how to set this thing up?

Deprecated entry_type in class MyJDownloaderDeviceEntity

I get the following log entry when I use your custom component.

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:74
First occurred: 09:32:34 (8 occurrences)
Last logged: 09:32:35

Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.

Could you please update this? You have to change entry_type="service" to entry_type = DeviceEntryType.SERVICE. You could do it like HACS does and check for the Home Assistant version.

# LEGACY can be removed when min HA version is 2021.12
if self.hacs.core.ha_version >= "2021.12.0b0":
    # pylint: disable=import-outside-toplevel
    from homeassistant.helpers.device_registry import DeviceEntryType

    info["entry_type"] = DeviceEntryType.SERVICE
else:
    info["entry_type"] = "service"
return info

Rewrite with config flow

Forked thread from #6 to discuss rewrite of this integration with config flow and more platforms in https://github.com/oribafi/homeassistant-myjdownloader/tree/rewrite.

It's still in early development, so I'm grateful for feedback and anyone willing to test. Thanks for this great integration, which motivated me to learn how to write integrations for HA!

Features

Sensor

  • status
  • number of links
  • number of packages

Binary Sensor

  • update available

Switch

  • pause downloads
  • limit download speed

Service

  • myjdwonloader.run_update_check
  • myjdwonloader.restart_and_update
  • myjdwonloader.start_downloads
  • myjdwonloader.stop_downloads

Todo

  • When using the pause switch, it might take a while for the status sensor to reflect the new pause state.
    I need to trigger the update of the status entity out-of-order, when the pause switch is toggled.
  • There is not much error handling yet, e.g. when you change your password, you need to remove and add the integration again.
  • Not tested with more than one JDownloader yet.
  • Devices which are not online during setup of the integration should be created when they become available.
  • Devices becoming offline will turn to unavilable.

Add a license

I just noticed, you haven't chosen a license for your integration. Would you mind doing so?

auto - message all downloads done

Is it possible to make an automation with the sensor to announce when all downloads are done ? what will be the parameters for the sensor to indicate that
Thank you!

Device not found

Hy, thank you for your effort. I configured your integration but the sensor state is device not found. I use regularly myjdownloader extension on chrome.
Thank you for your reply.

Add Integration fails

Hi,

I attempt to Add Integration via the button on the GitHub readme, and I get this error: Config flow could not be loaded: Unknown error.

Any ideas?

Device not found

Hey doudz,
thanks for your myjdownloader integration.
Maybe i'm doing something wrong. It detects my instance but it says "Device not found"

sensor:
  - platform: myjdownloader
    email: !secret mail
    password: !secret pwd2

image

Request: more Metadata

Hi,
thanks for the integration 👍

It would be great to make some more information available.
Possible candidates would be
device.downloadcontroller.get_speed_in_bytes()
and
device.downloads.query_links()

What do you think?

Limit option

Hi, could you please add the ability to write the LIMIT Bandwith parameter?
I would like to create an automation based on my presence at home (if i'm away, i could set no limit, if i'm home, i could set it to a minimium value...)

Thanks

Access from local - Docker JDownloader

Would it be possible to access the data, for the sensors, switches, etc., using a device: ip:port, instead of an account from the cloud?
It could possibly resolve the lag-time-reaction.

Device not found

Hello just installed and tried to configure it

 - platform: myjdownloader
    email: [email protected]
    password: mypassword
    name: JDownloader@ubuntu-server
    scan_interval: 5

But i got error device not found

Add device_id to the list of online devices

Hi,

I would like to suggest adding the device id to the list of online devices.
I achieved this by modifying the following part of sensor.py:

to:

    @property
    def extra_state_attributes(self):
        """Return the state attributes."""
        devices = sorted(self.devices.values(), key=lambda x: x.name)
        return {
            "jdownloaders": [device.name for device in devices],
            "jdownloader_ids": [device.device_id for device in devices],
        }

This allows people to create links directly to their current jdownloader instance.
for example in my single device use case:

  - type: custom:button-card
    tap_action:
      action: url
      url_path: >
        [[[
          return 'https://my.jdownloader.org/?deviceId='+states['sensor.jdownloaders_online'].attributes.jdownloader_ids[0]+'#webinterface:downloads';
        ]]]
    name: JDownloader
    ...

cannot install the integration

Hi,

when trying to install from repo link to HA I get an error message:
2024-03-01_10-32-18-L-chrome

"Manual" installation of integration is also not possible, as the integration does not appear on the list of available ones..

Is this an issue just on my side, please?

thx, JJ

Some sensors result unavailable

Some sensors, i.e. (packeges, links and update) results unavailable, I've tried both reconfiguring the integration from 0 and restarting supervisor, but to no avail. Are there any other procedures to try?

Error after changing scan_interval

Hi,

I set this component up into HA. After reboot it was in developer panel but with no download shown.

So i changed added the sensor to add the optionnal scan_interval with value = 2

`

  • platform: myjdownloader
    email: [email protected]
    password: mypassword
    scan_interval: 2
    `

Then, after reboot, I got an error shown below. Any idea of what is wrong?

myjdownloader: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/myjdownloader/sensor.py", line 110, in update currentDownloads = [x for x in downloadList if not x['finished']] File "/config/custom_components/myjdownloader/sensor.py", line 110, in <listcomp> currentDownloads = [x for x in downloadList if not x['finished']] KeyError: 'finished'

Update to 46573 is still proposing into my home assistant but can't update

Hello dear developers,

Since 2 days my home assistant is proposing me the update like following
grafik

I click on it and have
grafik

Sadly if I want to update it I have this next screen:
grafik
The message says that it's not available.

Then if I close the window it come back again.

I tried to remove the integration from here:
grafik

And re added but it seems that the update message is coming back anyway.

I do believe it's the second time it's happening with Myjdownloader updates to be kind of stucked on my config

I use a Odroid home assistant blue
With this configuration:
grafik
(not sure what to show more to help on this topic. Let me know if you need more intel)

cannot connect

I run the latest Home Assistant OS in a VM

When i try to setup the integration it alwys says cannot connect

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.