Coder Social home page Coder Social logo

mugifly / homeassistant-mornin Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 1.0 6 KB

Home Assistant platform for mornin' plus smart curtain (Unofficial)

License: MIT License

Python 100.00%
homeassistant homeassistant-components iot unofficial curtain curtains

homeassistant-mornin's Introduction

Home Assistant for mornin'

Home Assistant platform for Mornin'+.

It supports cover component and can be used to open / close the curtain on your home.


Notice and Limitations

  • This is UNOFFICIAL project for the personal convenience of IoT lovers.

    • I don't have any relationship with the vendor company (Robit Inc.) of the mornin'. Also, "mornin'" and "mornin'+" is a trademark of their. Thank you for the nice product!
  • This software has some limitations and is unstable, because it published under the TESTING phase.

    • I tested on Hass.io 0.92.2 + Raspberry Pi 3 Model B or Raspberry Pi Zero W.

    • In currently, this software only supports mornin'+ (mornin plus).

  • I don't any guarantee about this project.


Get Started

0. Finish the setup of mornin'+

First, you need to finish the setup process of your mornin'+ as normally.

1. Get the key of mornin'+

You can get it from the Android app.

HINT: D AuthRepository: Encrypt key: <xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx>

2. Install the component to Home Assistant

On Your Home Assistant server (Hass.io):

# cd /config

# wget https://github.com/mugifly/homeassistant-mornin/archive/master.zip

# unzip master.zip
# rm master.zip

# cp -r homeassistant-mornin-master/custom_components/ /config/
# rm -rf homeassistant-mornin-master/

3. Make a configuration

In configuration.yaml:

cover:
  - platform: mornin
    api_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    mac: 'xx:xx:xx:xx:xx:xx'
    name: 'Curtain of Living'
    reverse: false
  • platform (Required) - It must be mornin.

  • api_key (Required) - Encrypt key (alphanumeric) of your mornin+. Don't include spaces.

  • mac (Required) - MAC address of your mornin+.

  • name (Optional) - Name of your mornin+. In typically it should be name of curtain.

  • reverse (Optional) - Flag to reverse the direction to open the curtain. The default value is false, open to left and close to right.

4. Restart Home Assistant

After restarting, your mornin'+ will be appeared as Cover on your Home Assistant.

Let's enjoy IoT life :)


FAQ

How to check the debug log

Firstly, you need to specifying the log level for this component, in configuration.yaml on Home Assistant.

logger:
  default: warning
  logs:
    custom_components.mornin.cover: debug

After saving and restarting, then open the "Info" page of your Home Assistant (http://example.com/dev-info) on the browser, and click the "LOAD FULL HOME ASSISTANT LOG" button.


License and Thanks

The MIT License (MIT)
Copyright (c) 2019 Masanori Ohgita

And thank you for mornin'

homeassistant-mornin's People

Contributors

mugifly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

laurentkol

homeassistant-mornin's Issues

Error Message

@mugifly
Many Thanks, I was not able to find mornin+ somfy integration anywhere except your code.

I am getting error message at the 3rd step as:
"Platform error cover.mornin - Integration 'mornin' not found."

whereas I can see the folder in my custom_components properly installed.
"/config/custom_components/mornin/cover.py"

Do I need to install some integration? If yes then how do I need to install, as I can't find Mornin in integrations.

How can I obtain encryption key?

Hi,
I have mornin’, but I’m not sure how to get the encryption key.

What I did:
Logcat
Reading the source code of mornin+

mornin(first gen)への対応について

したいこと
mornin(first gen)の操作

試したこと(gistのスクリプトを使用)

  1. Encryption Keyの取得→成功
  2. 各種UUIDの書き換え等

その他
以下のエラーが発生します。
mornin+のみ対応ということは理解しているのですが、この場合の対処方法など思いつきましたらお教えいただけると幸いです。(対応できた際にはPull Requestをお送りさせていただきたく思います)

$ ./morninp.py E4:48:::: 67f2f034d7fe4******************* close

Connecting... E4:48::::

Receiving status... 14010304640700******************
Generating seed...
Generating main token... 5c652cb651d4ef*****************
Generating encrypted main token... 523af387************************
Trying to authenticate...
Traceback (most recent call last):
File "./morninp.py", line 178, in
main()
File "./morninp.py", line 169, in main
auth_device(peripheral, encrypt_key)
File "./morninp.py", line 57, in auth_device
app_service_status_characteristic.write(bytes.fromhex(auth_value), True)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 200, in write
return self.peripheral.writeCharacteristic(self.valHandle, val, withResponse)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 543, in writeCharacteristic
return self._getResp('wr')
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 368, in _waitResp
raise BTLEGattError("Bluetooth command failed", resp)
bluepy.btle.BTLEGattError: Bluetooth command failed (code: 3, error: Attribute can't be written)

MultipleDevices

Dear developer,

How can I set these for my multiple Devices?

Thanks in advance.

for homebridge ?

Dear developer,

I would like to use your your program for homebridge

How adapt it to homebridge ?

Thanks in advance,

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.