peterbuga / HASS-sonoff-ewelink

Home Assistant component to control Sonoff/eWeLink devices with original firmware
MIT License
797 stars 294 forks source link

Have component added as official home assistant component? #55

Open ericmillersfbay opened 5 years ago

ericmillersfbay commented 5 years ago

I see so many people who want to add their device to their home assistant, and still people at the home assistant forums tell them they must flash their devices, for those of us who don't mind using the ewelink app, this component makes life easier, I'm sure some people skip sonoff devices just because they can't solder, so perhaps see if it could be added as an official component soon?

peterbuga commented 5 years ago

this was the idea from the beginning, but I later realised that this might not totally work (or it's a loooong road) due to the HA code quality restrictions. I hardly believe that copy-paste 3 files it's a difficult thing, otherwise people should skip HA automation altogether

right now i'll focus on adding support for new devices and probably this issue will go down un-resolved for an unspecified amount of time :confused:

ericmillersfbay commented 5 years ago

Understood, just so many people use Sonoff devices, they should make an exception they could even put a "experimental" tag or something.... I agree that it's easy to install, it's more about people not knowing it exist.

alesoft73 commented 5 years ago

this was the idea from the beginning, but I later realised that this might not totally work (or it's a loooong road) due to the HA code quality restrictions. I hardly believe that copy-paste 3 files it's a difficult thing, otherwise people should skip HA automation altogether

right now i'll focus on adding support for new devices and probably this issue will go down un-resolved for an unspecified amount of time 😕

This component work perfect, for me! Thanks for your work... th10 th16 + temperature and humidity 2 x sonoff 12v Thanks another.

springfall2008 commented 5 years ago

It's working well for me too :)

Could this be aded as a 'community' component so you can install it from the HAS web interface?

BTW: The install instructions are a little confusing as they don't say you need to put the files into the /config directory

ashrafmn commented 5 years ago

well done,:) , this is great component will be great if we can:

  1. setup local MQTT, or use HA as local MQTT
  2. have this as official HASSIO add-on

the component couldn't differentiate between sonoff basic switch and sonoff touch switch. i got them all listed

'sonoff RF bridge' and 'sonoff SC' were not recognized and sonoff

peterbuga commented 5 years ago

@ashrafmn there is no pretty way to differentiate between a sonoff basic and sonoff touch, behind the scenes they act exactly the same, they only have some product codes to have a real product representation in the app

.1 (which implies 2.) to have this as an official add-on I need to split it in 2 different parts, one will be the controlling/reporting part and the other the communication/HA component. if (or when) i'll do this someone else could take the 1st part and easily spin it in some mqtt compatible endpoint

sonoff RF bridge is not implemented yet, there's an issue for it sonoff SC, no one mentioned it before so would you be kind enough to open an issue for it and post the sonoff-debug output ?

ashrafmn commented 5 years ago

thnx a lot for your response and attention to this,, your effort is greatly appreciated

i will open the issue for sonoff sc,, with regards to the debug I'm getting the below error while running the command

python sonoffdebug.py -u 'xxxx@xxxxx' -p 'xxxxx' >devices.json

Traceback (most recent call last): File "sonoffdebug.py", line 2, in import argparse, sys, json, time, random, pprint, base64, requests, hmac, hashlib, re ImportError: No module named requests

ashrafmn commented 5 years ago

@peterbuga and for "if (or when) i'll do this someone else could take the 1st part and easily spin it in some mqtt compatible endpoint" i hope i can help,, but unfortunately i don't know how, and don't have the required skills to do so.

i thought "sonoff touch" can be recognized as Lights instead of Switches!!

2016for commented 5 years ago

@ashrafmn All sonoff devices are recognized as switches in HA.

To make them appear as lights use "a light switch" component from HA: https://www.home-assistant.io/components/light.switch/

"The light switch platform lets you control an existing switch, allowing you to use a switch like a light in Home Assistant."

ashrafmn commented 5 years ago

@2016for thnx, the light switch did the job :)

violgore commented 5 years ago

I can not find information about this, I am interesting, can you help me?

@ashrafmn All sonoff devices are recognized as switches in HA.

To make them appear as lights use "a light switch" component from HA: https://www.home-assistant.io/components/light.switch/

"The light switch platform lets you control an existing switch, allowing you to use a switch like a light in Home Assistant."

waynepaulward commented 4 years ago

how do I get the command with pip ?

iMac-computer:.homeassistant wayne$ python sonoffdebug.py /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'sonoffdebug.py': [Errno 2] No such file or directory iMac-computer:.homeassistant wayne$

peterbuga commented 4 years ago

@waynepaulward your question and what you posted don't make sense, please ask/describe the problem properly

ps: unless you changed the file's name it's sonoff-debug.py (there's a dash in there) :P

waynepaulward commented 4 years ago

No I’ve installed the component i downloaded into my home assistant unzipped it and put in the components directory and restarted home assistant but not sure what to do next !

waynepaulward commented 4 years ago

I have it working now thank you :)