vincenzosuraci / hassio_meross_sensor_switch

A Home Assistant custom-component for Meross devices, based on the work done by Alberto Geniola and Chris Hurst
17 stars 8 forks source link

MSG100 #10

Closed coolguymatt closed 5 years ago

coolguymatt commented 5 years ago

Alberto has updated the meross-iot library to include support for MSG100 (garage door opener). Do you know what needs to be done in your custom component to add this? I tried changing the manifest file to include the new library but that didn't seem to work.

vincenzosuraci commented 5 years ago

Consider that HA has a dedicated object to handle garage doors and roller shutters. As stated in the Readme.md I have not implemented this type of object (that is different from a "sensor" or a "switch" entity, it is a "covers" entity). This implies the use of a different Home Assistant Python template class, that implements completely different methods. Unfortunately, I do not own a Meross garage opener device and, without It, developing an extension is really hard and out of my spear time possibilities. Right now I do not plan to add it (because I have no possibility to debug it by myself). Sorry for that.

coolguymatt commented 5 years ago

Can it be setup as a switch or it has to be a cover entity? meross-iot returns open/closed instead of on/off, but other than that it operates similarly to a switch.

vincenzosuraci commented 5 years ago

A switch, in HA, can be commanded to be on or off and its status can be on or off. I guess that for a cover you have more status: open, close, opening, closing, paused. And you can give three commands: up, down, pause. Indeed the methods of a cover entity are much more than the switch entity. I would prefer to be compliant with the HA rather than patching the custom component. The real problem I see is that I would be forced to program without any feedback (I do not own a Meross Garage Opener), that Is really frustrating.

However, if you have some Python programming skills, you could help to extend the custom component adding this feature and I can help you in understanding what's wrong during your debugging phase.

SLYtiger16 commented 5 years ago

I would be interested in this, im a javascript kid though, my python is rusty. I also own the msg100.

Note: I successfully can programatically control the msg100 with Alberto's latest library.

I will fork and see what I can come up with

vincenzosuraci commented 5 years ago

Try to work directly extending a cover entity

SLYtiger16 commented 5 years ago

Sure thing, although I cannot get the component to work initially. "Component not found: meross" after moving files to config.

venv: -v 0.93.1

On Mon, May 27, 2019, 12:09 PM Vincenzo Suraci notifications@github.com wrote:

Try to work directly extending a cover entity

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vincenzosuraci/hassio_meross_sensor_switch/issues/10?email_source=notifications&email_token=AIWSQGK54CKJHVDEAKOIGT3PXQIU3A5CNFSM4HOU5FLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWKHH5Y#issuecomment-496268279, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWSQGPTBFCDXJSZ3TMWPS3PXQIU3ANCNFSM4HOU5FLA .

vincenzosuraci commented 5 years ago

Which is your folder structure?

SLYtiger16 commented 5 years ago

/config/custom_components/meross/...

On Tue, May 28, 2019, 1:05 AM Vincenzo Suraci notifications@github.com wrote:

Which is your folder structure?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vincenzosuraci/hassio_meross_sensor_switch/issues/10?email_source=notifications&email_token=AIWSQGK2VYQACQFESZV4A5DPXTDSRA5CNFSM4HOU5FLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLB3VI#issuecomment-496377301, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWSQGI4PGU562PNANM5TX3PXTDSRANCNFSM4HOU5FLA .

vincenzosuraci commented 5 years ago

The folder is the correct one. I suggest you to attach a more extensive log, otherwise it is rather difficult to understand the nature of the bug. In parallel, I suggest you to do some "hello world" testing, just to ensure that you setup a good and working testing environment (that is not that easy as it seems...).

SLYtiger16 commented 5 years ago

I will re attempt but it is on a test environment with a couple other working customs... I have a couple ideas and will update.

On Fri, May 31, 2019, 8:22 AM Vincenzo Suraci notifications@github.com wrote:

The folder is the correct one. I suggest you to attach a more extensive log, otherwise it is rather difficult to understand the nature of the bug. In parallel, I suggest you to do some "hello world" testing, just to ensure that you setup a good and working testing environment (that is not that easy as it seems...).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vincenzosuraci/hassio_meross_sensor_switch/issues/10?email_source=notifications&email_token=AIWSQGNGWCPX23KVXSBK5TDPYERB5A5CNFSM4HOU5FLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVGOBI#issuecomment-497706757, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWSQGN2UNGSZYXZQC3GXTDPYERB5ANCNFSM4HOU5FLA .

SLYtiger16 commented 5 years ago

13:18:21 INFO (SyncWorker_18) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:18:21 INFO (SyncWorker_18) [pynetgear] Get attached devices 2019-06-02 13:18:32 INFO (SyncWorker_16) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:18:32 INFO (SyncWorker_16) [pynetgear] Get attached devices 2019-06-02 13:18:43 INFO (SyncWorker_1) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:18:43 INFO (SyncWorker_1) [pynetgear] Get attached devices 2019-06-02 13:18:54 INFO (SyncWorker_16) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:18:54 INFO (SyncWorker_16) [pynetgear] Get attached devices 2019-06-02 13:18:57 INFO (SyncWorker_14) [custom_components.google_geocode.sensor] google request sent 2019-06-02 13:19:05 INFO (SyncWorker_4) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:19:05 INFO (SyncWorker_4) [pynetgear] Get attached devices 2019-06-02 13:19:16 INFO (SyncWorker_19) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:19:16 INFO (SyncWorker_19) [pynetgear] Get attached devices 2019-06-02 13:19:27 INFO (SyncWorker_11) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:19:27 INFO (SyncWorker_11) [pynetgear] Get attached devices

Found Here: 2019-06-02 13:19:33 INFO (SyncWorker_17) [homeassistant.loader] Loaded meross from custom_components.meross 2019-06-02 13:19:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for meross which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Then Log continues: 2019-06-02 13:19:38 INFO (SyncWorker_7) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:19:38 INFO (SyncWorker_7) [pynetgear] Get attached devices 2019-06-02 13:19:49 INFO (SyncWorker_14) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:19:49 INFO (SyncWorker_14) [pynetgear] Get attached devices 2019-06-02 13:20:00 INFO (SyncWorker_1) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:00 INFO (SyncWorker_1) [pynetgear] Get attached devices 2019-06-02 13:20:11 INFO (SyncWorker_4) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:11 INFO (SyncWorker_4) [pynetgear] Get attached devices 2019-06-02 13:20:22 INFO (SyncWorker_19) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:22 INFO (SyncWorker_19) [pynetgear] Get attached devices 2019-06-02 13:20:33 INFO (SyncWorker_18) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:33 INFO (SyncWorker_18) [pynetgear] Get attached devices 2019-06-02 13:20:36 ERROR (MainThread) [homeassistant.components.homeassistant] Component not found: meross 2019-06-02 13:20:42 ERROR (MainThread) [homeassistant.components.homeassistant] Component not found: meross 2019-06-02 13:20:43 INFO (SyncWorker_9) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:43 INFO (SyncWorker_9) [pynetgear] Get attached devices 2019-06-02 13:20:54 INFO (SyncWorker_15) [homeassistant.components.netgear.device_tracker] Scanning 2019-06-02 13:20:54 INFO (SyncWorker_15) [pynetgear] Get attached devices

This is my log. Other custom components are working fine, not sure what the issue is. it appears to load in and then congif --check states not found...?

SLYtiger16 commented 5 years ago

Ok, so I have discovered the issue I believe. I am running a venv homeassistant on a ubuntu 18.04 system under a separate user as described here. I have come to the conclusion through multiple rounds of testing that the meross-iot module in not found and causing the component to fail. I cannot for the life of me figure out how to install the component where it is accessible to the venv though ...

EDIT: This is now solved. WOW I can be slow.... I am now able to begin building a cover.py component. I will update asap.

coolguymatt commented 5 years ago

Any luck? If you post the code I can troubleshoot or assist?

SLYtiger16 commented 5 years ago

I am able to dev. Working on writing the component now. @coolguymatt