├── .github └── workflows │ └── work.yml ├── .gitignore ├── 3rdparty ├── antenna-ko.png ├── antenna.png ├── colorpicker │ ├── css │ │ ├── colorpicker.css │ │ └── layout.css │ ├── images │ │ ├── Thumbs.db │ │ ├── blank.gif │ │ ├── colorpicker_background.png │ │ ├── colorpicker_hex.png │ │ ├── colorpicker_hsb_b.png │ │ ├── colorpicker_hsb_h.png │ │ ├── colorpicker_hsb_s.png │ │ ├── colorpicker_indic.gif │ │ ├── colorpicker_overlay.png │ │ ├── colorpicker_rgb_b.png │ │ ├── colorpicker_rgb_g.png │ │ ├── colorpicker_rgb_r.png │ │ ├── colorpicker_select.gif │ │ ├── colorpicker_submit.png │ │ ├── custom_background.png │ │ ├── custom_hex.png │ │ ├── custom_hsb_b.png │ │ ├── custom_hsb_h.png │ │ ├── custom_hsb_s.png │ │ ├── custom_indic.gif │ │ ├── custom_rgb_b.png │ │ ├── custom_rgb_g.png │ │ ├── custom_rgb_r.png │ │ ├── custom_submit.png │ │ ├── select.png │ │ ├── select2.png │ │ └── slider.png │ ├── index.html │ └── js │ │ ├── colorpicker.js │ │ ├── eye.js │ │ ├── jquery.js │ │ ├── layout.js │ │ └── utils.js ├── jeeblue-ko.png ├── jeeblue.png ├── jeedom.png └── vivagraph │ └── vivagraph.min.js ├── LICENSE ├── README.md ├── core ├── ajax │ └── blea.ajax.php ├── class │ ├── .htaccess │ └── blea.class.php ├── config │ ├── blea.config.ini │ └── devices │ │ ├── amazfit │ │ ├── amazfitgtr.jpg │ │ └── amazfitgtr.json │ │ ├── aqualin │ │ ├── aqualin.jpg │ │ ├── aqualin.json │ │ └── class │ │ │ └── aqualin.class.php │ │ ├── awoxmesh │ │ ├── README.md │ │ ├── awox.jpg │ │ ├── awox.json │ │ ├── awox_eglo_fueva.jpg │ │ ├── awox_smartlight.jpg │ │ ├── awoxremote.jpg │ │ ├── awoxremote.json │ │ └── doc │ │ │ ├── README.md │ │ │ ├── awoxmeshdoc.php │ │ │ ├── img │ │ │ ├── capture_awoxmesh.png │ │ │ ├── capture_awoxmesh2.png │ │ │ ├── capture_awoxmesh_group.png │ │ │ ├── capture_awoxmesh_group2.png │ │ │ ├── capture_awoxmesh_resetmanuel.png │ │ │ └── capture_awoxmesh_scenario.png │ │ │ └── parsedown.php │ │ ├── beagle │ │ ├── beagle.jpg │ │ └── beagle.json │ │ ├── beewismartdoor │ │ ├── beewismartdoor.jpg │ │ └── beewismartdoor.json │ │ ├── blpnr │ │ ├── blpnr.jpg │ │ └── blpnr.json │ │ ├── default │ │ ├── default.jpg │ │ └── default.json │ │ ├── divoompixoo │ │ ├── ajax │ │ │ └── divoompixoo.ajax.php │ │ ├── class │ │ │ └── divoompixoo.class.php │ │ ├── divoompixoo.json │ │ ├── divoompixoo_blanc.jpg │ │ ├── divoompixoo_noir.jpg │ │ └── divoompixoo_tivoo_noir.jpg │ │ ├── divoomtimeboxmini │ │ ├── ajax │ │ │ └── divoomtimeboxmini.ajax.php │ │ ├── class │ │ │ └── divoomtimeboxmini.class.php │ │ ├── divoomtimeboxmini.jpg │ │ └── divoomtimeboxmini.json │ │ ├── dotti │ │ ├── ajax │ │ │ └── dotti.ajax.php │ │ ├── class │ │ │ └── dotti.class.php │ │ ├── dotti.jpg │ │ └── dotti.json │ │ ├── dreamscreen │ │ ├── dreamscreen.jpg │ │ └── dreamscreen.json │ │ ├── fitbit │ │ ├── fitbit.jpg │ │ └── fitbit.json │ │ ├── flowerpower │ │ ├── flowerpower.jpg │ │ └── flowerpower.json │ │ ├── gigaset │ │ ├── gigaset.jpg │ │ └── gigaset.json │ │ ├── hector │ │ ├── hector.jpg │ │ └── hector.json │ │ ├── ibbq4 │ │ ├── ibbq4.jpg │ │ └── ibbq4.json │ │ ├── ibbq6 │ │ ├── ibbq6.jpg │ │ └── ibbq6.json │ │ ├── itag │ │ ├── itag.jpg │ │ ├── itag.json │ │ ├── itag_blanc.jpg │ │ ├── itag_bleu.jpg │ │ ├── itag_rose.jpg │ │ └── itag_vert.jpg │ │ ├── jinlin │ │ ├── jinlin.jpg │ │ └── jinlin.json │ │ ├── kst1 │ │ ├── kst1.jpg │ │ └── kst1.json │ │ ├── logiswitch │ │ ├── logiswitch.jpg │ │ ├── logiswitch.json │ │ ├── logiswitch_blanc.jpg │ │ ├── logiswitch_gris.jpg │ │ └── logiswitch_vert.jpg │ │ ├── lywsd02 │ │ ├── lywsd02.jpg │ │ └── lywsd02.json │ │ ├── lywsd03 │ │ ├── lywsd03.jpg │ │ └── lywsd03.json │ │ ├── meyerdom │ │ ├── meyerdom2analog.jpg │ │ ├── meyerdom2analog.json │ │ ├── meyerdom4contacts.jpg │ │ ├── meyerdom4contacts.json │ │ ├── meyerdomcontactvocal.jpg │ │ └── meyerdomcontactvocal.json │ │ ├── meyerdom4contacts │ │ ├── meyerdom4contacts.jpg │ │ └── meyerdom4contacts.json │ │ ├── miband │ │ ├── miband1.jpg │ │ ├── miband1.json │ │ ├── miband1s.jpg │ │ ├── miband1s.json │ │ ├── miband2.jpg │ │ ├── miband2.json │ │ ├── miband3.jpg │ │ ├── miband3.json │ │ ├── miband4.jpg │ │ ├── miband4.json │ │ ├── mibandcolor.jpg │ │ └── mibandcolor.json │ │ ├── miflora │ │ ├── miflora.jpg │ │ ├── miflora.json │ │ └── miflora_ropot.jpg │ │ ├── miscale │ │ ├── ajax │ │ │ └── miscale.ajax.php │ │ ├── class │ │ │ └── miscale.class.php │ │ ├── miscale.jpg │ │ ├── miscale.json │ │ └── miscale_2019.jpg │ │ ├── miscale2 │ │ ├── ajax │ │ │ └── miscale2.ajax.php │ │ ├── class │ │ │ └── miscale2.class.php │ │ ├── miscale2.jpg │ │ └── miscale2.json │ │ ├── myfox │ │ ├── myfox.jpg │ │ └── myfox.json │ │ ├── niu │ │ ├── niu.json │ │ ├── niu_cozygrey.jpg │ │ ├── niu_lagoon.jpg │ │ ├── niu_softberry.jpg │ │ ├── niu_techblue.jpg │ │ ├── niu_wazabi.jpg │ │ └── niu_white.jpg │ │ ├── noke │ │ ├── noke.jpg │ │ └── noke.json │ │ ├── nut │ │ ├── nut.jpg │ │ ├── nut.json │ │ ├── nut_ale.jpg │ │ ├── nut_find_3_blanc.jpg │ │ ├── nut_find_3_gris.jpg │ │ ├── nut_find_3_rose.jpg │ │ ├── nut_find_3_vert.jpg │ │ ├── nut_mini_blanc.jpg │ │ ├── nut_mini_bleu.jpg │ │ ├── nut_mini_rose.jpg │ │ ├── nut_mini_vert.jpg │ │ ├── nut_nutale.jpg │ │ └── nut_orange.jpg │ │ ├── parrotpot │ │ ├── parrotpot.jpg │ │ └── parrotpot.json │ │ ├── playbulb │ │ ├── playbulb.json │ │ ├── playbulb_bluelabel.jpg │ │ ├── playbulb_candle.jpg │ │ ├── playbulb_garden.jpg │ │ ├── playbulb_original.jpg │ │ ├── playbulb_rainbow.jpg │ │ ├── playbulb_smart.jpg │ │ └── playbulb_sphere.jpg │ │ ├── ropot │ │ ├── ropot.jpg │ │ └── ropot.json │ │ ├── ruuvi │ │ ├── ruuvi.jpg │ │ └── ruuvi.json │ │ ├── smartplug │ │ ├── smartplug.jpg │ │ └── smartplug.json │ │ ├── tb05 │ │ ├── tb05.jpg │ │ └── tb05.json │ │ ├── ticatag │ │ ├── ticatag.jpg │ │ └── ticatag.json │ │ ├── tile │ │ ├── tile.jpg │ │ └── tile.json │ │ ├── wistiki │ │ ├── wistiki.jpg │ │ └── wistiki.json │ │ ├── xiaomiht │ │ ├── xiaomiht.jpg │ │ ├── xiaomiht.json │ │ └── xiaomiht_cleargrass.jpg │ │ └── yeelight │ │ ├── yeelight_bed.jpg │ │ └── yeelight_bed.json ├── i18n │ ├── .htaccess │ ├── de_DE.json │ ├── en_US.json │ ├── es_ES.json │ ├── fr_FR.json │ ├── id_ID.json │ ├── it_IT.json │ ├── ja_JP.json │ ├── pt_PT.json │ ├── ru_RU.json │ └── tr.json ├── php │ └── jeeBlea.php └── template │ ├── dashboard │ ├── aqualin.html │ ├── cmd.action.message.default.html │ ├── cmd.action.other.arrosage.html │ ├── cmd.action.slider.heure.html │ ├── cmd.action.slider.heureminute.html │ ├── cmd.action.slider.weekdays.html │ ├── divoompixoo.html │ ├── divoomtimeboxmini.html │ └── dotti.html │ └── mobile │ ├── divoompixoo.html │ ├── divoomtimeboxmini.html │ └── dotti.html ├── data └── collection_dotti_sample.json ├── desktop ├── js │ └── blea.js ├── modal │ ├── blea.divoompixoo.all.php │ ├── blea.divoompixoo.php │ ├── blea.divoomtimeboxmini.all.php │ ├── blea.divoomtimeboxmini.php │ ├── blea.dotti.all.php │ ├── blea.dotti.php │ ├── blea.graph.php │ ├── blea.miscale.php │ ├── blea.miscale2.php │ ├── blea.remote.php │ ├── health.php │ └── syncconf.blea.php └── php │ └── blea.php ├── docs ├── de_DE │ ├── changelog.md │ └── index.md ├── en_US │ ├── changelog.md │ └── index.md ├── es_ES │ ├── changelog.md │ └── index.md ├── fr_FR │ ├── changelog.md │ └── index.md ├── i18n │ ├── de_DE.json │ ├── en_US.json │ ├── es_ES.json │ ├── fr_FR.json │ └── pt_PT.json ├── images │ ├── blea_commands_niu.jpg │ ├── blea_icon.png │ ├── blea_screenshot1.jpg │ ├── blea_screenshot2.jpg │ ├── blea_screenshot3.jpg │ ├── blea_screenshot4.jpg │ ├── blea_screenshot5.jpg │ ├── blea_screenshot6.jpg │ ├── blea_screenshot7.jpg │ ├── blea_screenshot8.jpg │ └── gestion.jpg └── pt_PT │ ├── changelog.md │ └── index.md ├── mobile ├── html │ └── blea.html └── js │ └── blea.js ├── plugin_info ├── .htaccess ├── blea_icon.png ├── configuration.php ├── info.json ├── install.php └── install.sql └── resources ├── .htaccess ├── blead ├── blead.py ├── devices │ ├── __init__.py │ ├── amazfitgtr.py │ ├── aqualin.py │ ├── awoxmesh.py │ ├── beagle.py │ ├── beewismartdoor.py │ ├── blpnr.py │ ├── divoompixoo.py │ ├── divoomtimeboxmini.py │ ├── dotti.py │ ├── dreamscreen.py │ ├── fitbit.py │ ├── gigaset.py │ ├── hector.py │ ├── ibbq4.py │ ├── ibbq6.py │ ├── itag.py │ ├── jinlin.py │ ├── kst1.py │ ├── logiswitch.py │ ├── lywsd02.py │ ├── lywsd03.py │ ├── lywsd03.py_beta │ ├── lywsd03.py_with_bindkeys │ ├── meyerdom2analog.py │ ├── meyerdom4contacts.py │ ├── meyerdomcontactvocal.py │ ├── miband.py │ ├── miband2.py │ ├── miband3.py │ ├── miband4.py │ ├── miflora.py │ ├── miscale.py │ ├── miscale2.py │ ├── myfox.py │ ├── niu.py │ ├── noke.py │ ├── nut.py │ ├── parrotplant.py │ ├── pixoo │ │ ├── __init__.py │ │ ├── divoom_image.py │ │ ├── fonts │ │ │ ├── font.ttf │ │ │ ├── font1.ttf │ │ │ ├── font2.ttf │ │ │ ├── font3.ttf │ │ │ └── font4.ttf │ │ ├── images │ │ │ ├── black.bmp │ │ │ └── noir.png │ │ ├── messages.py │ │ ├── timebox.py │ │ └── timeboximage.py │ ├── playbulb.py │ ├── ropot.py │ ├── ruuvi.py │ ├── smartplug.py │ ├── tb05.py │ ├── ticatag.py │ ├── tile.py │ ├── timebox │ │ ├── __init__.py │ │ ├── divoom_image.py │ │ ├── fonts │ │ │ ├── 11x7 Matrix.bmp │ │ │ ├── 11x7 Matrix.ttf │ │ │ ├── 5 9x9 Strict Sans.ttf │ │ │ ├── Electronic scale.bmp │ │ │ ├── Electronic scale.ttf │ │ │ ├── LED SCREEN GTAMBLOG CAPS+ 2.0.ttf │ │ │ ├── Translux Slim 11x96.ttf │ │ │ ├── default.bmp │ │ │ ├── slkscr.bdf │ │ │ ├── slkscr.pbm │ │ │ ├── slkscr.pil │ │ │ ├── slkscr.ttf │ │ │ ├── tallround.bmp │ │ │ └── tallround.ttf │ │ ├── images │ │ │ └── black.bmp │ │ ├── messages.py │ │ ├── timebox.py │ │ └── timeboximage.py │ ├── wistiki.py │ ├── xiaomiht.py │ ├── yeelight.py │ └── yeelightcandela.py ├── globals.py ├── jeedom │ ├── __init__.py │ └── jeedom.py ├── multiconnect.py ├── notification.py └── utils.py ├── install.sh ├── install_apt.sh └── syncconf.sh /.github/workflows/work.yml: -------------------------------------------------------------------------------- 1 | on: 2 | # Workflows check plugin Jeedom 3 | push: 4 | branches: 5 | - beta 6 | pull_request: 7 | branches: 8 | - beta 9 | - master 10 | 11 | name : 'Full Workflows Plugin Jeedom' 12 | 13 | jobs: 14 | plugin: 15 | uses: jeedom/workflows/.github/workflows/plugin.yml@main 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | nbproject/ 2 | test.php 3 | core/config/common.config.php 4 | plugins 5 | sftp-config.json 6 | .project 7 | *.pyc 8 | .vscode/settings.json 9 | -------------------------------------------------------------------------------- /3rdparty/antenna-ko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/antenna-ko.png -------------------------------------------------------------------------------- /3rdparty/antenna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/antenna.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/css/colorpicker.css: -------------------------------------------------------------------------------- 1 | .colorpicker { 2 | width: 356px; 3 | height: 176px; 4 | overflow: hidden; 5 | position: absolute; 6 | background: url(../images/colorpicker_background.png); 7 | font-family: Arial, Helvetica, sans-serif; 8 | display: none; 9 | } 10 | .colorpicker_color { 11 | width: 150px; 12 | height: 150px; 13 | left: 14px; 14 | top: 13px; 15 | position: absolute; 16 | background: #f00; 17 | overflow: hidden; 18 | cursor: crosshair; 19 | } 20 | .colorpicker_color div { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | width: 150px; 25 | height: 150px; 26 | background: url(../images/colorpicker_overlay.png); 27 | } 28 | .colorpicker_color div div { 29 | position: absolute; 30 | top: 0; 31 | left: 0; 32 | width: 11px; 33 | height: 11px; 34 | overflow: hidden; 35 | background: url(../images/colorpicker_select.gif); 36 | margin: -5px 0 0 -5px; 37 | } 38 | .colorpicker_hue { 39 | position: absolute; 40 | top: 13px; 41 | left: 171px; 42 | width: 35px; 43 | height: 150px; 44 | cursor: n-resize; 45 | } 46 | .colorpicker_hue div { 47 | position: absolute; 48 | width: 35px; 49 | height: 9px; 50 | overflow: hidden; 51 | background: url(../images/colorpicker_indic.gif) left top; 52 | margin: -4px 0 0 0; 53 | left: 0px; 54 | } 55 | .colorpicker_new_color { 56 | position: absolute; 57 | width: 60px; 58 | height: 30px; 59 | left: 213px; 60 | top: 13px; 61 | background: #f00; 62 | } 63 | .colorpicker_current_color { 64 | position: absolute; 65 | width: 60px; 66 | height: 30px; 67 | left: 283px; 68 | top: 13px; 69 | background: #f00; 70 | } 71 | .colorpicker input { 72 | background-color: transparent; 73 | border: 1px solid transparent; 74 | position: absolute; 75 | font-size: 10px; 76 | font-family: Arial, Helvetica, sans-serif; 77 | color: #898989; 78 | top: 4px; 79 | right: 11px; 80 | text-align: right; 81 | margin: 0; 82 | padding: 0; 83 | height: 11px; 84 | } 85 | .colorpicker_hex { 86 | position: absolute; 87 | width: 72px; 88 | height: 22px; 89 | background: url(../images/colorpicker_hex.png) top; 90 | left: 212px; 91 | top: 142px; 92 | } 93 | .colorpicker_hex input { 94 | right: 6px; 95 | } 96 | .colorpicker_field { 97 | height: 22px; 98 | width: 62px; 99 | background-position: top; 100 | position: absolute; 101 | } 102 | .colorpicker_field span { 103 | position: absolute; 104 | width: 12px; 105 | height: 22px; 106 | overflow: hidden; 107 | top: 0; 108 | right: 0; 109 | cursor: n-resize; 110 | } 111 | .colorpicker_rgb_r { 112 | background-image: url(../images/colorpicker_rgb_r.png); 113 | top: 52px; 114 | left: 212px; 115 | } 116 | .colorpicker_rgb_g { 117 | background-image: url(../images/colorpicker_rgb_g.png); 118 | top: 82px; 119 | left: 212px; 120 | } 121 | .colorpicker_rgb_b { 122 | background-image: url(../images/colorpicker_rgb_b.png); 123 | top: 112px; 124 | left: 212px; 125 | } 126 | .colorpicker_hsb_h { 127 | background-image: url(../images/colorpicker_hsb_h.png); 128 | top: 52px; 129 | left: 282px; 130 | } 131 | .colorpicker_hsb_s { 132 | background-image: url(../images/colorpicker_hsb_s.png); 133 | top: 82px; 134 | left: 282px; 135 | } 136 | .colorpicker_hsb_b { 137 | background-image: url(../images/colorpicker_hsb_b.png); 138 | top: 112px; 139 | left: 282px; 140 | } 141 | .colorpicker_submit { 142 | position: absolute; 143 | width: 22px; 144 | height: 22px; 145 | background: url(../images/colorpicker_submit.png) top; 146 | left: 322px; 147 | top: 142px; 148 | overflow: hidden; 149 | } 150 | .colorpicker_focus { 151 | background-position: center; 152 | } 153 | .colorpicker_hex.colorpicker_focus { 154 | background-position: bottom; 155 | } 156 | .colorpicker_submit.colorpicker_focus { 157 | background-position: bottom; 158 | } 159 | .colorpicker_slider { 160 | background-position: bottom; 161 | } 162 | -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/Thumbs.db -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/blank.gif -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_background.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_hex.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_hsb_b.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_hsb_h.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_hsb_s.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_indic.gif -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_overlay.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_rgb_b.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_rgb_g.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_rgb_r.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_select.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_select.gif -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/colorpicker_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/colorpicker_submit.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_background.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_hex.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_hsb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_hsb_b.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_hsb_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_hsb_h.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_hsb_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_hsb_s.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_indic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_indic.gif -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_rgb_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_rgb_b.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_rgb_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_rgb_g.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_rgb_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_rgb_r.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/custom_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/custom_submit.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/select.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/select2.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/images/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/colorpicker/images/slider.png -------------------------------------------------------------------------------- /3rdparty/colorpicker/js/eye.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Zoomimage 4 | * Author: Stefan Petre www.eyecon.ro 5 | * 6 | */ 7 | (function($){ 8 | var EYE = window.EYE = function() { 9 | var _registered = { 10 | init: [] 11 | }; 12 | return { 13 | init: function() { 14 | $.each(_registered.init, function(nr, fn){ 15 | fn.call(); 16 | }); 17 | }, 18 | extend: function(prop) { 19 | for (var i in prop) { 20 | if (prop[i] != undefined) { 21 | this[i] = prop[i]; 22 | } 23 | } 24 | }, 25 | register: function(fn, type) { 26 | if (!_registered[type]) { 27 | _registered[type] = []; 28 | } 29 | _registered[type].push(fn); 30 | } 31 | }; 32 | }(); 33 | $(EYE.init); 34 | })(jQuery); 35 | -------------------------------------------------------------------------------- /3rdparty/colorpicker/js/layout.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | var initLayout = function() { 3 | var hash = window.location.hash.replace('#', ''); 4 | var currentTab = $('ul.navigationTabs a') 5 | .bind('click', showTab) 6 | .filter('a[rel=' + hash + ']'); 7 | if (currentTab.size() == 0) { 8 | currentTab = $('ul.navigationTabs a:first'); 9 | } 10 | showTab.apply(currentTab.get(0)); 11 | $('#colorpickerHolder').ColorPicker({flat: true}); 12 | $('#colorpickerHolder2').ColorPicker({ 13 | flat: true, 14 | color: '#00ff00', 15 | onSubmit: function(hsb, hex, rgb) { 16 | $('#colorSelector2 div').css('backgroundColor', '#' + hex); 17 | } 18 | }); 19 | $('#colorpickerHolder2>div').css('position', 'absolute'); 20 | var widt = false; 21 | $('#colorSelector2').bind('click', function() { 22 | $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500); 23 | widt = !widt; 24 | }); 25 | $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({ 26 | onSubmit: function(hsb, hex, rgb, el) { 27 | $(el).val(hex); 28 | $(el).ColorPickerHide(); 29 | }, 30 | onBeforeShow: function () { 31 | $(this).ColorPickerSetColor(this.value); 32 | } 33 | }) 34 | .bind('keyup', function(){ 35 | $(this).ColorPickerSetColor(this.value); 36 | }); 37 | $('#colorSelector').ColorPicker({ 38 | color: '#0000ff', 39 | onShow: function (colpkr) { 40 | $(colpkr).fadeIn(500); 41 | return false; 42 | }, 43 | onHide: function (colpkr) { 44 | $(colpkr).fadeOut(500); 45 | return false; 46 | }, 47 | onChange: function (hsb, hex, rgb) { 48 | $('#colorSelector div').css('backgroundColor', '#' + hex); 49 | } 50 | }); 51 | }; 52 | 53 | var showTab = function(e) { 54 | var tabIndex = $('ul.navigationTabs a') 55 | .removeClass('active') 56 | .index(this); 57 | $(this) 58 | .addClass('active') 59 | .blur(); 60 | $('div.tab') 61 | .hide() 62 | .eq(tabIndex) 63 | .show(); 64 | }; 65 | 66 | EYE.register(initLayout, 'init'); 67 | })(jQuery) -------------------------------------------------------------------------------- /3rdparty/jeeblue-ko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/jeeblue-ko.png -------------------------------------------------------------------------------- /3rdparty/jeeblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/jeeblue.png -------------------------------------------------------------------------------- /3rdparty/jeedom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/3rdparty/jeedom.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # plugin-blea 2 | 3 | -------------------------------------------------------------------------------- /core/class/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /core/config/blea.config.ini: -------------------------------------------------------------------------------- 1 | [blea] 2 | socketport = 55008 3 | scaninterval = 29 4 | absentnumber = 4 5 | port = none -------------------------------------------------------------------------------- /core/config/devices/amazfit/amazfitgtr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/amazfit/amazfitgtr.jpg -------------------------------------------------------------------------------- /core/config/devices/amazfit/amazfitgtr.json: -------------------------------------------------------------------------------- 1 | { 2 | "amazfitgtr": { 3 | "name": "Amazfit GTR", 4 | "groupe" : "Santé", 5 | "configuration" : { 6 | "name" : "amazfitgtr", 7 | "battery_type" : "Batterie", 8 | "xiaomi" : 1 9 | }, 10 | "commands": [ 11 | ], 12 | "compatibility": [ 13 | { 14 | "manufacturer": "Huami", 15 | "name": "Amazfit GTR", 16 | "doc": "", 17 | "type": "Santé", 18 | "battery_type": "Batterie", 19 | "ref" : "", 20 | "comlink": "", 21 | "remark": "Uniquement de la présence pour le moment", 22 | "inclusion" : "Mode inclusion", 23 | "imglink": "amazfitgtr" 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/config/devices/aqualin/aqualin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/aqualin/aqualin.jpg -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/README.md: -------------------------------------------------------------------------------- 1 | La doc est dans le README du sous répertoire [doc](./doc/README.md) -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/awox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/awox.jpg -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/awox_eglo_fueva.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/awox_eglo_fueva.jpg -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/awox_smartlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/awox_smartlight.jpg -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/awoxremote.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/awoxremote.jpg -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/awoxremote.json: -------------------------------------------------------------------------------- 1 | { 2 | "awoxremote": { 3 | "name": "Awox / Eglo - Télécommande", 4 | "groupe" : "Lumières", 5 | "configuration" : { 6 | "cancontrol" : 1, 7 | "name" : "awoxmesh", 8 | "refreshlist" : {}, 9 | "canbelocked" : 1, 10 | "needsrefresh" : 0, 11 | "specificmodal" : 0, 12 | "specificclass" : 0 13 | }, 14 | "commands": [ 15 | { 16 | "name": "Batterie", 17 | "type": "info", 18 | "subtype": "numeric", 19 | "display": { 20 | "generic_type": "GENERIC" 21 | }, 22 | "isVisible": 1, 23 | "isHistorized": 0, 24 | "logicalId": "battery", 25 | "template": { 26 | "dashboard": "line", 27 | "mobile": "line" 28 | } 29 | }, 30 | { 31 | "name": "Debug", 32 | "type": "info", 33 | "subtype": "string", 34 | "isVisible": 0, 35 | "isHistorized": 0, 36 | "logicalId": "debug", 37 | "display": { 38 | "generic_type": "DONT" 39 | }, 40 | "template": { 41 | "dashboard": "line", 42 | "mobile": "line" 43 | } 44 | }, 45 | { 46 | "name": "Rafraichir", 47 | "type": "action", 48 | "subtype": "other", 49 | "isVisible": 1, 50 | "logicalId": "refresh" 51 | }, 52 | { 53 | "name": "New Pairing", 54 | "type": "action", 55 | "subtype": "other", 56 | "isVisible": 1, 57 | "logicalId": "name:awoxmesh,cmd:setNewPairing,value:0" 58 | }, 59 | { 60 | "name": "Reset Pairing", 61 | "type": "action", 62 | "subtype": "other", 63 | "isVisible": 1, 64 | "logicalId": "name:awoxmesh,cmd:resetMesh,value:0" 65 | } 66 | ], 67 | "compatibility": [ 68 | { 69 | "manufacturer": "Awox Eglo", 70 | "name": "Télécommande", 71 | "doc": "", 72 | "type": "Lumières", 73 | "ref" : "", 74 | "comlink": "", 75 | "remark": "Compatible avec Awox Mesh technologie. Il faut activer le mode bluetooth pour utiliser les commande.", 76 | "inclusion" : "Mode inclusion. Appuyer sur le bouton ON et BLEU pendant 3 secondes pour activer le mode bluetooth avant pairage.", 77 | "imglink": "awoxremote" 78 | } 79 | ] 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/awoxmeshdoc.php: -------------------------------------------------------------------------------- 1 | text($markdown); 11 | 12 | ?> 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh.png -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh2.png -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh_group.png -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh_group2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh_group2.png -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh_resetmanuel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh_resetmanuel.png -------------------------------------------------------------------------------- /core/config/devices/awoxmesh/doc/img/capture_awoxmesh_scenario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/awoxmesh/doc/img/capture_awoxmesh_scenario.png -------------------------------------------------------------------------------- /core/config/devices/beagle/beagle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/beagle/beagle.jpg -------------------------------------------------------------------------------- /core/config/devices/beagle/beagle.json: -------------------------------------------------------------------------------- 1 | { 2 | "beagle": { 3 | "name": "Interrupteur Beagle", 4 | "groupe" : "Boutons", 5 | "configuration" : { 6 | "resetRssis" : 0, 7 | "name" : "beagle" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "BoutonID", 12 | "type": "info", 13 | "subtype": "numeric", 14 | "isVisible": 0, 15 | "isHistorized": 0, 16 | "template": { 17 | "mobile": "badge", 18 | "dashboard" : "badge" 19 | }, 20 | "configuration": { 21 | "repeatEventManagement" : "always" 22 | }, 23 | "unite": "", 24 | "logicalId": "value" 25 | }, 26 | { 27 | "name": "Boutons", 28 | "type": "info", 29 | "subtype": "string", 30 | "isVisible": 1, 31 | "isHistorized": 1, 32 | "unite": "", 33 | "configuration": { 34 | "repeatEventManagement" : "always" 35 | }, 36 | "logicalId": "label" 37 | } 38 | ], 39 | "compatibility": [ 40 | 41 | ] 42 | } 43 | } -------------------------------------------------------------------------------- /core/config/devices/beewismartdoor/beewismartdoor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/beewismartdoor/beewismartdoor.jpg -------------------------------------------------------------------------------- /core/config/devices/beewismartdoor/beewismartdoor.json: -------------------------------------------------------------------------------- 1 | { 2 | "beewismartdoor": { 3 | "name": "BeeWi Smart Door", 4 | "groupe" : "Porte", 5 | "configuration" : { 6 | "needsrefresh" : 0, 7 | "name" : "beewismartdoor", 8 | "battery_type" : "1x3V CR2032", 9 | "delay" : 120, 10 | "cancontrol" : 0 11 | }, 12 | "commands": [ 13 | { 14 | "name": "Status", 15 | "type": "info", 16 | "subtype": "binary", 17 | "isVisible": 1, 18 | "isHistorized": 0, 19 | "logicalId": "status", 20 | "template": { 21 | "dashboard": "door", 22 | "mobile": "door" 23 | } 24 | }, 25 | { 26 | "name": "Batterie", 27 | "type": "info", 28 | "subtype": "numeric", 29 | "isVisible": 1, 30 | "isHistorized": 0, 31 | "unite": "%", 32 | "display": { 33 | "icon": "<\/i>", 34 | "generic_type": "DONT" 35 | }, 36 | "logicalId": "battery", 37 | "template": { 38 | "dashboard": "line", 39 | "mobile": "line" 40 | } 41 | } 42 | ], 43 | "compatibility": [ 44 | { 45 | "manufacturer": "BeeWi", 46 | "name": "capteur d'ouverture", 47 | "doc": "", 48 | "type": "Capteurs", 49 | "battery_type": "1x3V CR2032", 50 | "ref" : "", 51 | "comlink": "", 52 | "remark": "Capteurs d'ouverture de porte", 53 | "inclusion" : "Mode inclusion", 54 | "imglink": "beewismartdoor" 55 | } 56 | ] 57 | } 58 | } -------------------------------------------------------------------------------- /core/config/devices/blpnr/blpnr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/blpnr/blpnr.jpg -------------------------------------------------------------------------------- /core/config/devices/default/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/default/default.jpg -------------------------------------------------------------------------------- /core/config/devices/default/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": { 3 | "name": "Inconnu", 4 | "groupe" : "Inconnu", 5 | "configuration" : { 6 | "name" : "default", 7 | "cancontrol" : 1 8 | }, 9 | "commands": [ 10 | ], 11 | "compatibility": [ 12 | { 13 | "manufacturer": "Inconnu", 14 | "name": "Inconnu", 15 | "doc": "", 16 | "type": "Defaut", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour les équipements non encore rajouté dans le plugin, pour a minima avoir la présence et les rssi ainsi que la data brute", 20 | "inclusion" : "Mode inclusion avec option 'Inconnu'", 21 | "imglink": "default" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/divoompixoo/divoompixoo_blanc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/divoompixoo/divoompixoo_blanc.jpg -------------------------------------------------------------------------------- /core/config/devices/divoompixoo/divoompixoo_noir.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/divoompixoo/divoompixoo_noir.jpg -------------------------------------------------------------------------------- /core/config/devices/divoompixoo/divoompixoo_tivoo_noir.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/divoompixoo/divoompixoo_tivoo_noir.jpg -------------------------------------------------------------------------------- /core/config/devices/divoomtimeboxmini/divoomtimeboxmini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/divoomtimeboxmini/divoomtimeboxmini.jpg -------------------------------------------------------------------------------- /core/config/devices/dotti/ajax/dotti.ajax.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | try { 20 | require_once dirname(__FILE__) . '/../../../../../../../core/php/core.inc.php'; 21 | require_once dirname(__FILE__) . '/../class/dotti.class.php'; 22 | include_file('core', 'authentification', 'php'); 23 | 24 | if (!isConnect('admin')) { 25 | throw new Exception(__('401 - Accès non autorisé', __FILE__)); 26 | } 27 | 28 | if (init('action') == 'loadImage') { 29 | $name = init('name'); 30 | ajax::success(dottiblea::loadImage($name)); 31 | } 32 | 33 | if (init('action') == 'renameImage') { 34 | $oriname = init('oriname'); 35 | $newname = init('newname'); 36 | ajax::success(dottiblea::renameImage($oriname,$newname)); 37 | } 38 | 39 | if (init('action') == 'saveImage') { 40 | $id = init('id'); 41 | if ($id ==''){ 42 | $id = eqLogic::byType('dotti')[0]->getId(); 43 | } 44 | log::add('dotti','debug',print_r(eqLogic::byType('dotti'),true)); 45 | $name = init('name'); 46 | $data = init('data'); 47 | if ($name == ''){ 48 | ajax::error('Veuillez choisir un nom pour votre image'); 49 | } else { 50 | ajax::success(dottiblea::saveImage($id,$name,$data)); 51 | } 52 | } 53 | 54 | if (init('action') == 'saveImagejson') { 55 | $id = init('id'); 56 | $name = init('name'); 57 | $data = init('data'); 58 | if ($name == ''){ 59 | ajax::error('Veuillez choisir un nom pour votre image'); 60 | } else { 61 | ajax::success(dottiblea::saveImage($id,$name,$data,true)); 62 | } 63 | } 64 | 65 | if (init('action') == 'delImage') { 66 | $name = init('name'); 67 | ajax::success(dottiblea::delImage($name)); 68 | } 69 | 70 | if (init('action') == 'loadMemoryList') { 71 | ajax::success(dottiblea::listMemory()); 72 | } 73 | 74 | if (init('action') == 'sendPixelArray') { 75 | $array = init('array'); 76 | $id = init('id'); 77 | if ($id ==''){ 78 | $id = eqLogic::byType('blea')[0]->getId(); 79 | } 80 | ajax::success(dottiblea::sendDataRealTime($array,$id)); 81 | } 82 | 83 | if (init('action') == 'getImageCode') { 84 | $name = init('name'); 85 | ajax::success(dottiblea::getImageCode($name)); 86 | } 87 | 88 | if (init('action') == 'loadImageCode') { 89 | $name = init('name'); 90 | $data = init('data'); 91 | ajax::success(dottiblea::loadImageCode($name,$data)); 92 | } 93 | 94 | throw new Exception(__('Aucune méthode correspondante à : ', __FILE__) . init('action')); 95 | /* * *********Catch exeption*************** */ 96 | } catch (Exception $e) { 97 | ajax::error(displayExeption($e), $e->getCode()); 98 | } 99 | ?> 100 | -------------------------------------------------------------------------------- /core/config/devices/dotti/dotti.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/dotti/dotti.jpg -------------------------------------------------------------------------------- /core/config/devices/dreamscreen/dreamscreen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/dreamscreen/dreamscreen.jpg -------------------------------------------------------------------------------- /core/config/devices/dreamscreen/dreamscreen.json: -------------------------------------------------------------------------------- 1 | { 2 | "dreamscreen": { 3 | "name": "DreamScreen", 4 | "groupe" : "Lumières", 5 | "configuration" : { 6 | "cancontrol" : 1, 7 | "name": "dreamscreen" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Idle", 12 | "type": "action", 13 | "subtype": "other", 14 | "isVisible": 1, 15 | "unite": "", 16 | "logicalId": "name:dreamscreen,handle:0x25,value:234277305C72,type:mode" 17 | }, 18 | { 19 | "name": "Video", 20 | "type": "action", 21 | "subtype": "other", 22 | "isVisible": 1, 23 | "unite": "", 24 | "logicalId": "name:dreamscreen,handle:0x25,value:234277315C72,type:mode" 25 | }, 26 | { 27 | "name": "Music", 28 | "type": "action", 29 | "subtype": "other", 30 | "isVisible": 1, 31 | "unite": "", 32 | "logicalId": "name:dreamscreen,handle:0x25,value:234277325C72,type:mode" 33 | }, 34 | { 35 | "name": "Color", 36 | "type": "action", 37 | "subtype": "color", 38 | "isVisible": 1, 39 | "unite": "", 40 | "logicalId": "name:dreamscreen,handle:0x25,value:#color#,type:color", 41 | "display": { 42 | "forceReturnLineBefore": 1 43 | } 44 | }, 45 | { 46 | "name": "Brightness", 47 | "type": "action", 48 | "subtype": "slider", 49 | "isVisible": 1, 50 | "unite": "", 51 | "logicalId": "name:dreamscreen,handle:0x25,value:#slider#,type:brightness", 52 | "configuration":{ 53 | "minValue":"0", 54 | "maxValue":"100" 55 | }, 56 | "display": { 57 | "forceReturnLineAfter": 1 58 | } 59 | }, 60 | { 61 | "name": "Thème prédéfini", 62 | "type": "action", 63 | "subtype": "select", 64 | "display": { 65 | "generic_type": "DONT" 66 | }, 67 | "configuration" : { 68 | "switch" : "mid", 69 | "listValue" : "31|Fire;32|Twinkle;33|Ocean;34|Rainbow;35|July;36|Holliday;37|Pop;38|Forest" 70 | }, 71 | "isVisible": 1, 72 | "logicalId": "name:dreamscreen,handle:0x25,type:ambient,value:#listValue#" 73 | } 74 | ], 75 | "compatibility": [ 76 | { 77 | "manufacturer": "DreamScreen", 78 | "name": "DreamScreen", 79 | "doc": "", 80 | "type": "Lumières", 81 | "battery_type": "", 82 | "ref" : "", 83 | "comlink": "", 84 | "remark": "", 85 | "inclusion" : "Mode inclusion", 86 | "imglink": "dreamscreen" 87 | } 88 | ] 89 | } 90 | } -------------------------------------------------------------------------------- /core/config/devices/fitbit/fitbit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/fitbit/fitbit.jpg -------------------------------------------------------------------------------- /core/config/devices/fitbit/fitbit.json: -------------------------------------------------------------------------------- 1 | { 2 | "fitbit": { 3 | "name": "Fitbit", 4 | "groupe" : "Santé", 5 | "configuration" : { 6 | "name": "fitbit" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Fitbit", 13 | "name": "Badge", 14 | "doc": "", 15 | "type": "Bracelet", 16 | "battery_type": "1x3V CR2032", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour de la présence", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "fitbit" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/flowerpower/flowerpower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/flowerpower/flowerpower.jpg -------------------------------------------------------------------------------- /core/config/devices/gigaset/gigaset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/gigaset/gigaset.jpg -------------------------------------------------------------------------------- /core/config/devices/gigaset/gigaset.json: -------------------------------------------------------------------------------- 1 | { 2 | "gigaset": { 3 | "name": "Gigaset G-Tag", 4 | "groupe" : "Présence", 5 | "configuration" : { 6 | "needsrefresh" : 1, 7 | "name" : "Gigaset G-Tag", 8 | "battery_type" : "1x3V CR2032", 9 | "delay" : 18000, 10 | "cancontrol" : 1 11 | }, 12 | "commands": [ 13 | { 14 | "name": "Présence", 15 | "type": "info", 16 | "subtype": "binary", 17 | "display": { 18 | "generic_type": "PRESENCE" 19 | }, 20 | "isVisible": 1, 21 | "isHistorized": 0, 22 | "unite": "", 23 | "logicalId": "present" 24 | }, 25 | { 26 | "name": "Refresh", 27 | "type": "action", 28 | "subtype": "other", 29 | "display": { 30 | "icon": "<\/i>", 31 | "generic_type": "Generic" 32 | }, 33 | "isVisible": 1, 34 | "isHistorized": 0, 35 | "unite": "", 36 | "logicalId": "refresh" 37 | }, 38 | { 39 | "name": "Batterie", 40 | "type": "info", 41 | "subtype": "numeric", 42 | "display": { 43 | "icon": "<\/i>", 44 | "generic_type": "BATTERY" 45 | }, 46 | "isVisible": 1, 47 | "isHistorized": 0, 48 | "unite": "%", 49 | "logicalId": "battery" 50 | } 51 | 52 | ], 53 | "compatibility": [ 54 | { 55 | "manufacturer": "Gigaset", 56 | "name": "G-Tag", 57 | "doc": "", 58 | "type": "Présence", 59 | "battery_type": "1x3V CR2032", 60 | "ref" : "", 61 | "comlink": "", 62 | "remark": "Uniquement pour de la présence", 63 | "inclusion" : "Mode inclusion", 64 | "imglink": "gigaset" 65 | } 66 | ] 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /core/config/devices/hector/hector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/hector/hector.jpg -------------------------------------------------------------------------------- /core/config/devices/hector/hector.json: -------------------------------------------------------------------------------- 1 | { 2 | "hector": { 3 | "name": "Hector", 4 | "groupe" : "Capteurs", 5 | "configuration" : { 6 | "needsrefresh" : 1, 7 | "cancontrol" : 1, 8 | "name" : "hector", 9 | "delay" : 18000, 10 | "battery_type" : "1x3V CR2032" 11 | }, 12 | "commands": [ 13 | { 14 | "name": "Température", 15 | "type": "info", 16 | "subtype": "numeric", 17 | "display": { 18 | "icon": "<\/i>", 19 | "generic_type": "DONT" 20 | }, 21 | "isVisible": 1, 22 | "isHistorized": 0, 23 | "unite": "°C", 24 | "logicalId": "temperature", 25 | "template": { 26 | "dashboard": "line", 27 | "mobile": "line" 28 | } 29 | }, 30 | { 31 | "name": "Humidité", 32 | "type": "info", 33 | "subtype": "numeric", 34 | "display": { 35 | "icon": "<\/i>", 36 | "generic_type": "DONT" 37 | }, 38 | "isVisible": 1, 39 | "isHistorized": 0, 40 | "unite": "%", 41 | "logicalId": "humidity", 42 | "template": { 43 | "dashboard": "line", 44 | "mobile": "line" 45 | } 46 | }, 47 | { 48 | "name": "Pression", 49 | "type": "info", 50 | "subtype": "numeric", 51 | "display": { 52 | "icon": "<\/i>", 53 | "generic_type": "DONT" 54 | }, 55 | "isVisible": 1, 56 | "isHistorized": 0, 57 | "unite": "hPa", 58 | "logicalId": "pressure", 59 | "template": { 60 | "dashboard": "line", 61 | "mobile": "line" 62 | } 63 | }, 64 | { 65 | "name": "Batterie", 66 | "type": "info", 67 | "subtype": "numeric", 68 | "display": { 69 | "icon": "<\/i>", 70 | "generic_type": "DONT" 71 | }, 72 | "isVisible": 0, 73 | "isHistorized": 0, 74 | "unite": "%", 75 | "logicalId": "battery", 76 | "template": { 77 | "dashboard": "line", 78 | "mobile": "line" 79 | } 80 | }, 81 | { 82 | "name": "Pile Voltage", 83 | "type": "info", 84 | "subtype": "numeric", 85 | "display": { 86 | "icon": "<\/i>", 87 | "generic_type": "DONT" 88 | }, 89 | "isVisible": 1, 90 | "isHistorized": 0, 91 | "unite": "V", 92 | "logicalId": "batteryvoltage", 93 | "template": { 94 | "dashboard": "line", 95 | "mobile": "line" 96 | } 97 | }, 98 | { 99 | "name": "Refresh", 100 | "type": "action", 101 | "subtype": "other", 102 | "display": { 103 | "generic_type": "GENERIC" 104 | }, 105 | "isVisible": 1, 106 | "isHistorized": 0, 107 | "unite": "", 108 | "logicalId": "refresh" 109 | } 110 | ], 111 | "compatibility": [ 112 | { 113 | "manufacturer": "Hector", 114 | "name": "Hector", 115 | "doc": "", 116 | "type": "Capteurs", 117 | "battery_type": "1x3V CR2032", 118 | "ref" : "", 119 | "comlink": "", 120 | "remark": "Ne doit pas rester connecté en permanence sur votre téléphone si vous voulez l'interaction dans Jeedom", 121 | "inclusion" : "Mode inclusion", 122 | "imglink": "hector" 123 | } 124 | ] 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /core/config/devices/ibbq4/ibbq4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/ibbq4/ibbq4.jpg -------------------------------------------------------------------------------- /core/config/devices/ibbq6/ibbq6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/ibbq6/ibbq6.jpg -------------------------------------------------------------------------------- /core/config/devices/itag/itag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/itag/itag.jpg -------------------------------------------------------------------------------- /core/config/devices/itag/itag_blanc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/itag/itag_blanc.jpg -------------------------------------------------------------------------------- /core/config/devices/itag/itag_bleu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/itag/itag_bleu.jpg -------------------------------------------------------------------------------- /core/config/devices/itag/itag_rose.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/itag/itag_rose.jpg -------------------------------------------------------------------------------- /core/config/devices/itag/itag_vert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/itag/itag_vert.jpg -------------------------------------------------------------------------------- /core/config/devices/jinlin/jinlin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/jinlin/jinlin.jpg -------------------------------------------------------------------------------- /core/config/devices/jinlin/jinlin.json: -------------------------------------------------------------------------------- 1 | { 2 | "jinlin": { 3 | "name": "Jinlin", 4 | "groupe" : "Lumières", 5 | "configuration" : { 6 | "name" : "jinlin" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Lyl Smart", 13 | "name": "Jinlin", 14 | "doc": "", 15 | "type": "Lumière", 16 | "battery_type": "Batterie", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour de la présence (le reste viendra)", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "jinlin" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/kst1/kst1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/kst1/kst1.jpg -------------------------------------------------------------------------------- /core/config/devices/kst1/kst1.json: -------------------------------------------------------------------------------- 1 | { 2 | "kst1": { 3 | "name": "Thermomètre Koogeek KST1", 4 | "groupe" : "Santé", 5 | "configuration" : { 6 | "name" : "kst1" 7 | }, 8 | "commands": [ 9 | { 10 | "name": "Temperature", 11 | "type": "info", 12 | "subtype": "numeric", 13 | "isVisible": 1, 14 | "isHistorized": 1, 15 | "unite": "°C", 16 | "logicalId": "temperature", 17 | "display": { 18 | "icon": "<\/i>", 19 | "generic_type": "DONT" 20 | }, 21 | "template": { 22 | "dashboard": "line", 23 | "mobile": "line" 24 | } 25 | }, 26 | { 27 | "name": "Mode", 28 | "type": "info", 29 | "subtype": "string", 30 | "isVisible": 1, 31 | "isHistorized": 1, 32 | "unite": "", 33 | "logicalId": "mode", 34 | "display": { 35 | "icon": "<\/i>", 36 | "generic_type": "DONT" 37 | }, 38 | "template": { 39 | "dashboard": "line", 40 | "mobile": "line" 41 | } 42 | } 43 | ], 44 | "compatibility": [ 45 | { 46 | "manufacturer": "Koogeek", 47 | "name": "Kst1", 48 | "doc": "", 49 | "type": "Santé", 50 | "battery_type": "1x3V CR2032", 51 | "ref" : "", 52 | "comlink": "", 53 | "remark": "", 54 | "inclusion" : "Mode inclusion auto et appui sur le bouton. Se connecte pendant 20 secondes lorsque le thermometre est allumé pour etre notifié d'une température. Certaines mesures peuvent passer à la trappe", 55 | "imglink": "kst1" 56 | } 57 | ] 58 | } 59 | } -------------------------------------------------------------------------------- /core/config/devices/logiswitch/logiswitch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/logiswitch/logiswitch.jpg -------------------------------------------------------------------------------- /core/config/devices/logiswitch/logiswitch.json: -------------------------------------------------------------------------------- 1 | { 2 | "logiswitch": { 3 | "name": "Logitech Pop", 4 | "groupe" : "Boutons", 5 | "configuration" : { 6 | "battery_type": "Batterie", 7 | "name" : "logiswitch" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "BoutonID", 12 | "type": "info", 13 | "subtype": "numeric", 14 | "isVisible": 0, 15 | "isHistorized": 0, 16 | "template": { 17 | "mobile": "badge", 18 | "dashboard" : "badge" 19 | }, 20 | "configuration": { 21 | "repeatEventManagement" : "always" 22 | }, 23 | "unite": "", 24 | "logicalId": "button" 25 | }, 26 | { 27 | "name": "Boutons", 28 | "type": "info", 29 | "subtype": "string", 30 | "isVisible": 1, 31 | "isHistorized": 1, 32 | "unite": "", 33 | "configuration": { 34 | "repeatEventManagement" : "always" 35 | }, 36 | "logicalId": "buttonlabel" 37 | } 38 | ], 39 | "compatibility": [ 40 | { 41 | "manufacturer": "Logitech", 42 | "name": "Logitech Pop rouge", 43 | "doc": "", 44 | "type": "Boutons", 45 | "ref" : "", 46 | "comlink": "", 47 | "remark": "Ne doit absolument pas être connecté sur un autre appareil", 48 | "inclusion" : "Mode inclusion et appui sur le bouton", 49 | "imglink": "logiswitch" 50 | }, 51 | { 52 | "manufacturer": "Logitech", 53 | "name": "Logitech Pop blanc", 54 | "doc": "", 55 | "type": "Boutons", 56 | "ref" : "", 57 | "comlink": "", 58 | "remark": "Ne doit absolument pas être connecté sur un autre appareil", 59 | "inclusion" : "Mode inclusion et appui sur le bouton", 60 | "imglink": "logiswitch_blanc" 61 | }, 62 | { 63 | "manufacturer": "Logitech", 64 | "name": "Logitech Pop vert", 65 | "doc": "", 66 | "type": "Boutons", 67 | "ref" : "", 68 | "comlink": "", 69 | "remark": "Ne doit absolument pas être connecté sur un autre appareil", 70 | "inclusion" : "Mode inclusion et appui sur le bouton", 71 | "imglink": "logiswitch_vert" 72 | }, 73 | { 74 | "manufacturer": "Logitech", 75 | "name": "Logitech Pop gris", 76 | "doc": "", 77 | "type": "Boutons", 78 | "ref" : "", 79 | "comlink": "", 80 | "remark": "Ne doit absolument pas être connecté sur un autre appareil", 81 | "inclusion" : "Mode inclusion et appui sur le bouton", 82 | "imglink": "logiswitch_gris" 83 | } 84 | ] 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /core/config/devices/logiswitch/logiswitch_blanc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/logiswitch/logiswitch_blanc.jpg -------------------------------------------------------------------------------- /core/config/devices/logiswitch/logiswitch_gris.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/logiswitch/logiswitch_gris.jpg -------------------------------------------------------------------------------- /core/config/devices/logiswitch/logiswitch_vert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/logiswitch/logiswitch_vert.jpg -------------------------------------------------------------------------------- /core/config/devices/lywsd02/lywsd02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/lywsd02/lywsd02.jpg -------------------------------------------------------------------------------- /core/config/devices/lywsd02/lywsd02.json: -------------------------------------------------------------------------------- 1 | { 2 | "lywsd02": { 3 | "name": "Xiaomi Lywsd02", 4 | "groupe" : "Température", 5 | "configuration" : { 6 | "needsrefresh" : 0, 7 | "name" : "lywsd02", 8 | "battery_type" : "1x3V CR2032", 9 | "xiaomi" : 1, 10 | "delay" : 1800, 11 | "cancontrol" : 0 12 | }, 13 | "commands": [ 14 | { 15 | "name": "Température", 16 | "type": "info", 17 | "subtype": "numeric", 18 | "display": { 19 | "icon": "<\/i>", 20 | "generic_type": "DONT" 21 | }, 22 | "isVisible": 1, 23 | "isHistorized": 0, 24 | "unite": "°C", 25 | "logicalId": "temperature", 26 | "template": { 27 | "dashboard": "line", 28 | "mobile": "line" 29 | } 30 | }, 31 | { 32 | "name": "Humidité", 33 | "type": "info", 34 | "subtype": "numeric", 35 | "display": { 36 | "icon": "<\/i>", 37 | "generic_type": "DONT" 38 | }, 39 | "isVisible": 1, 40 | "isHistorized": 0, 41 | "unite": "%", 42 | "logicalId": "moisture", 43 | "template": { 44 | "dashboard": "line", 45 | "mobile": "line" 46 | } 47 | }, 48 | { 49 | "name": "Batterie", 50 | "type": "info", 51 | "subtype": "numeric", 52 | "display": { 53 | "icon": "<\/i>", 54 | "generic_type": "DONT" 55 | }, 56 | "isVisible": 0, 57 | "isHistorized": 0, 58 | "unite": "%", 59 | "logicalId": "battery", 60 | "template": { 61 | "dashboard": "line", 62 | "mobile": "line" 63 | } 64 | }, 65 | { 66 | "name": "Firmware", 67 | "type": "info", 68 | "subtype": "string", 69 | "display": { 70 | "generic_type": "GENERIC" 71 | }, 72 | "isVisible": 0, 73 | "isHistorized": 0, 74 | "unite": "", 75 | "logicalId": "firmware" 76 | }, 77 | { 78 | "name": "Refresh", 79 | "type": "action", 80 | "subtype": "other", 81 | "display": { 82 | "generic_type": "GENERIC" 83 | }, 84 | "isVisible": 1, 85 | "isHistorized": 0, 86 | "unite": "", 87 | "logicalId": "refresh" 88 | } 89 | ], 90 | "compatibility": [ 91 | { 92 | "manufacturer": "Xiaomi", 93 | "name": "Température Humidité", 94 | "doc": "", 95 | "type": "Capteurs", 96 | "battery_type": "1x3V CR2032", 97 | "ref" : "", 98 | "comlink": "", 99 | "remark": "Capteurs de Température Humidité avec écran (Lywsd02)", 100 | "inclusion" : "Mode inclusion", 101 | "imglink": "xiaomiht" 102 | } 103 | ] 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /core/config/devices/lywsd03/lywsd03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/lywsd03/lywsd03.jpg -------------------------------------------------------------------------------- /core/config/devices/lywsd03/lywsd03.json: -------------------------------------------------------------------------------- 1 | { 2 | "lywsd03": { 3 | "name": "Xiaomi Lywsd03", 4 | "groupe" : "Température", 5 | "configuration" : { 6 | "needsrefresh" : 1, 7 | "name" : "lywsd03", 8 | "battery_type" : "1x3V CR2032", 9 | "xiaomi" : 1, 10 | "delay" : 900, 11 | "cancontrol" : 0 12 | }, 13 | "commands": [ 14 | { 15 | "name": "Température", 16 | "type": "info", 17 | "subtype": "numeric", 18 | "display": { 19 | "icon": "<\/i>", 20 | "generic_type": "DONT" 21 | }, 22 | "isVisible": 1, 23 | "isHistorized": 0, 24 | "unite": "°C", 25 | "logicalId": "temperature", 26 | "template": { 27 | "dashboard": "line", 28 | "mobile": "line" 29 | } 30 | }, 31 | { 32 | "name": "Humidité", 33 | "type": "info", 34 | "subtype": "numeric", 35 | "display": { 36 | "icon": "<\/i>", 37 | "generic_type": "DONT" 38 | }, 39 | "isVisible": 1, 40 | "isHistorized": 0, 41 | "unite": "%", 42 | "logicalId": "moisture", 43 | "template": { 44 | "dashboard": "line", 45 | "mobile": "line" 46 | } 47 | }, 48 | { 49 | "name": "Batterie", 50 | "type": "info", 51 | "subtype": "numeric", 52 | "display": { 53 | "icon": "<\/i>", 54 | "generic_type": "DONT" 55 | }, 56 | "isVisible": 0, 57 | "isHistorized": 0, 58 | "unite": "%", 59 | "logicalId": "battery", 60 | "template": { 61 | "dashboard": "line", 62 | "mobile": "line" 63 | } 64 | }, 65 | { 66 | "name": "Refresh", 67 | "type": "action", 68 | "subtype": "other", 69 | "display": { 70 | "generic_type": "GENERIC" 71 | }, 72 | "isVisible": 1, 73 | "isHistorized": 0, 74 | "unite": "", 75 | "logicalId": "refresh" 76 | } 77 | ], 78 | "compatibility": [ 79 | { 80 | "manufacturer": "Xiaomi", 81 | "name": "Température Humidité", 82 | "doc": "", 83 | "type": "Capteurs", 84 | "battery_type": "1x3V CR2032", 85 | "ref" : "", 86 | "comlink": "", 87 | "remark": "Capteurs de Température Humidité avec écran (Lywsd03)", 88 | "inclusion" : "Mode inclusion, le module doit avoir été ajouté au moins une fois à Mihome pour qu'il soit activé", 89 | "imglink": "xiaomiht" 90 | } 91 | ] 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdom2analog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/meyerdom/meyerdom2analog.jpg -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdom2analog.json: -------------------------------------------------------------------------------- 1 | { 2 | "meyerdom2analog": { 3 | "name": "MeyerDOM 2 analogiques", 4 | "groupe" : "Contacteurs", 5 | "configuration" : { 6 | "name" : "meyerdom2analog", 7 | "battery_type" : "1x3V CR2450" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Analog 1", 12 | "type": "info", 13 | "subtype": "numeric", 14 | "isVisible": 1, 15 | "isHistorized": 0, 16 | "logicalId": "analog1", 17 | "template": { 18 | "dashboard": "line", 19 | "mobile": "line" 20 | } 21 | }, 22 | { 23 | "name": "Analog 2", 24 | "type": "info", 25 | "subtype": "numeric", 26 | "isVisible": 1, 27 | "isHistorized": 0, 28 | "logicalId": "analog2", 29 | "template": { 30 | "dashboard": "line", 31 | "mobile": "line" 32 | } 33 | }, 34 | { 35 | "name": "Voltage", 36 | "type": "info", 37 | "subtype": "numeric", 38 | "isVisible": 1, 39 | "isHistorized": 0, 40 | "unite":"V", 41 | "logicalId": "voltage", 42 | "template": { 43 | "dashboard": "line", 44 | "mobile": "line" 45 | } 46 | } 47 | ], 48 | "compatibility": [ 49 | { 50 | "manufacturer": "MeyerDom", 51 | "name": "2 Analogiques", 52 | "doc": "", 53 | "type": "Contacteurs", 54 | "battery_type": "1x3V CR2450", 55 | "ref" : "", 56 | "comlink": "", 57 | "remark": "2 analogiques", 58 | "inclusion" : "Mode inclusion", 59 | "imglink": "meyerdom2analog" 60 | } 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdom4contacts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/meyerdom/meyerdom4contacts.jpg -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdom4contacts.json: -------------------------------------------------------------------------------- 1 | { 2 | "meyerdom4contacts": { 3 | "name": "MeyerDOM 4 contacts", 4 | "groupe" : "Contacteurs", 5 | "configuration" : { 6 | "name" : "meyerdom4contacts", 7 | "battery_type" : "1x3V CR2450" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Contact 1", 12 | "type": "info", 13 | "subtype": "binary", 14 | "isVisible": 1, 15 | "isHistorized": 0, 16 | "logicalId": "contact1", 17 | "template": { 18 | "dashboard": "line", 19 | "mobile": "line" 20 | } 21 | }, 22 | { 23 | "name": "Contact 2", 24 | "type": "info", 25 | "subtype": "binary", 26 | "isVisible": 1, 27 | "isHistorized": 0, 28 | "logicalId": "contact2", 29 | "template": { 30 | "dashboard": "line", 31 | "mobile": "line" 32 | } 33 | }, 34 | { 35 | "name": "Contact 3", 36 | "type": "info", 37 | "subtype": "binary", 38 | "isVisible": 1, 39 | "isHistorized": 0, 40 | "logicalId": "contact3", 41 | "template": { 42 | "dashboard": "line", 43 | "mobile": "line" 44 | } 45 | }, 46 | { 47 | "name": "Contact 4", 48 | "type": "info", 49 | "subtype": "binary", 50 | "isVisible": 1, 51 | "isHistorized": 0, 52 | "logicalId": "contact4", 53 | "template": { 54 | "dashboard": "line", 55 | "mobile": "line" 56 | } 57 | }, 58 | { 59 | "name": "Voltage", 60 | "type": "info", 61 | "subtype": "numeric", 62 | "isVisible": 1, 63 | "isHistorized": 0, 64 | "unite":"V", 65 | "logicalId": "voltage", 66 | "template": { 67 | "dashboard": "line", 68 | "mobile": "line" 69 | } 70 | } 71 | ], 72 | "compatibility": [ 73 | { 74 | "manufacturer": "MeyerDom", 75 | "name": "4 contacteurs", 76 | "doc": "", 77 | "type": "Contacteurs", 78 | "battery_type": "1x3V CR2450", 79 | "ref" : "", 80 | "comlink": "", 81 | "remark": "4 contacteurs", 82 | "inclusion" : "Mode inclusion", 83 | "imglink": "meyerdom4contacts" 84 | } 85 | ] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdomcontactvocal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/meyerdom/meyerdomcontactvocal.jpg -------------------------------------------------------------------------------- /core/config/devices/meyerdom/meyerdomcontactvocal.json: -------------------------------------------------------------------------------- 1 | { 2 | "meyerdomcontactvocal": { 3 | "name": "MeyerDOM contact vocal", 4 | "groupe" : "Contacteurs", 5 | "configuration" : { 6 | "name" : "meyerdomcontactvocal", 7 | "battery_type" : "1x3V CR2450" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Contact", 12 | "type": "info", 13 | "subtype": "binary", 14 | "isVisible": 1, 15 | "isHistorized": 0, 16 | "logicalId": "contact1", 17 | "template": { 18 | "dashboard": "line", 19 | "mobile": "line" 20 | } 21 | }, 22 | { 23 | "name": "Voltage", 24 | "type": "info", 25 | "subtype": "numeric", 26 | "isVisible": 1, 27 | "isHistorized": 0, 28 | "unite":"V", 29 | "logicalId": "voltage", 30 | "template": { 31 | "dashboard": "line", 32 | "mobile": "line" 33 | } 34 | } 35 | ], 36 | "compatibility": [ 37 | { 38 | "manufacturer": "MeyerDom", 39 | "name": "Contact Vocal", 40 | "doc": "", 41 | "type": "Contacteurs", 42 | "battery_type": "1x3V CR2450", 43 | "ref" : "", 44 | "comlink": "", 45 | "remark": "Contacteur Vocal", 46 | "inclusion" : "Mode inclusion", 47 | "imglink": "meyerdomcontactvocal" 48 | } 49 | ] 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /core/config/devices/meyerdom4contacts/meyerdom4contacts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/meyerdom4contacts/meyerdom4contacts.jpg -------------------------------------------------------------------------------- /core/config/devices/meyerdom4contacts/meyerdom4contacts.json: -------------------------------------------------------------------------------- 1 | { 2 | "meyerdom4contacts": { 3 | "name": "MeyerDOM 4 contacts", 4 | "groupe" : "Contacteurs", 5 | "configuration" : { 6 | "name" : "meyerdom4contacts", 7 | "battery_type" : "1x3V CR2450" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Contact 1", 12 | "type": "info", 13 | "subtype": "binary", 14 | "isVisible": 1, 15 | "isHistorized": 0, 16 | "logicalId": "contact1", 17 | "template": { 18 | "dashboard": "line", 19 | "mobile": "line" 20 | } 21 | }, 22 | { 23 | "name": "Contact 2", 24 | "type": "info", 25 | "subtype": "binary", 26 | "isVisible": 1, 27 | "isHistorized": 0, 28 | "logicalId": "contact2", 29 | "template": { 30 | "dashboard": "line", 31 | "mobile": "line" 32 | } 33 | }, 34 | { 35 | "name": "Contact 3", 36 | "type": "info", 37 | "subtype": "binary", 38 | "isVisible": 1, 39 | "isHistorized": 0, 40 | "logicalId": "contact3", 41 | "template": { 42 | "dashboard": "line", 43 | "mobile": "line" 44 | } 45 | }, 46 | { 47 | "name": "Contact 4", 48 | "type": "info", 49 | "subtype": "binary", 50 | "isVisible": 1, 51 | "isHistorized": 0, 52 | "logicalId": "contact4", 53 | "template": { 54 | "dashboard": "line", 55 | "mobile": "line" 56 | } 57 | }, 58 | { 59 | "name": "Analog 1", 60 | "type": "info", 61 | "subtype": "numeric", 62 | "isVisible": 1, 63 | "isHistorized": 0, 64 | "logicalId": "analog1", 65 | "template": { 66 | "dashboard": "line", 67 | "mobile": "line" 68 | } 69 | }, 70 | { 71 | "name": "Analog 2", 72 | "type": "info", 73 | "subtype": "numeric", 74 | "isVisible": 1, 75 | "isHistorized": 0, 76 | "logicalId": "analog2", 77 | "template": { 78 | "dashboard": "line", 79 | "mobile": "line" 80 | } 81 | }, 82 | { 83 | "name": "Voltage", 84 | "type": "info", 85 | "subtype": "numeric", 86 | "isVisible": 1, 87 | "isHistorized": 0, 88 | "unite":"V", 89 | "logicalId": "voltage", 90 | "template": { 91 | "dashboard": "line", 92 | "mobile": "line" 93 | } 94 | } 95 | ], 96 | "compatibility": [ 97 | { 98 | "manufacturer": "MeyerDom", 99 | "name": "4 contacteurs", 100 | "doc": "", 101 | "type": "Contacteurs", 102 | "battery_type": "1x3V CR2450", 103 | "ref" : "", 104 | "comlink": "", 105 | "remark": "4 contacteurs et 2 analogiques", 106 | "inclusion" : "Mode inclusion", 107 | "imglink": "meyerdom4contacts" 108 | } 109 | ] 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /core/config/devices/miband/miband1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/miband1.jpg -------------------------------------------------------------------------------- /core/config/devices/miband/miband1s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/miband1s.jpg -------------------------------------------------------------------------------- /core/config/devices/miband/miband2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/miband2.jpg -------------------------------------------------------------------------------- /core/config/devices/miband/miband3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/miband3.jpg -------------------------------------------------------------------------------- /core/config/devices/miband/miband3.json: -------------------------------------------------------------------------------- 1 | { 2 | "miband3": { 3 | "name": "Miband 3", 4 | "groupe" : "Santé", 5 | "configuration" : { 6 | "name" : "miband3", 7 | "battery_type" : "Batterie", 8 | "xiaomi" : 1 9 | }, 10 | "commands": [ 11 | ], 12 | "compatibility": [ 13 | { 14 | "manufacturer": "Xiaomi", 15 | "name": "Miband 3", 16 | "doc": "", 17 | "type": "Santé", 18 | "battery_type": "Batterie", 19 | "ref" : "", 20 | "comlink": "", 21 | "remark": "Uniquement de la présence pour le moment", 22 | "inclusion" : "Mode inclusion", 23 | "imglink": "miband3" 24 | } 25 | ] 26 | } 27 | } -------------------------------------------------------------------------------- /core/config/devices/miband/miband4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/miband4.jpg -------------------------------------------------------------------------------- /core/config/devices/miband/miband4.json: -------------------------------------------------------------------------------- 1 | { 2 | "miband4": { 3 | "name": "Miband 4", 4 | "groupe" : "Santé", 5 | "configuration" : { 6 | "name" : "miband4", 7 | "battery_type" : "Batterie", 8 | "xiaomi" : 1 9 | }, 10 | "commands": [ 11 | ], 12 | "compatibility": [ 13 | { 14 | "manufacturer": "Xiaomi", 15 | "name": "Miband 4", 16 | "doc": "", 17 | "type": "Santé", 18 | "battery_type": "Batterie", 19 | "ref" : "", 20 | "comlink": "", 21 | "remark": "Uniquement de la présence pour le moment", 22 | "inclusion" : "Mode inclusion", 23 | "imglink": "miband4" 24 | } 25 | ] 26 | } 27 | } -------------------------------------------------------------------------------- /core/config/devices/miband/mibandcolor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miband/mibandcolor.jpg -------------------------------------------------------------------------------- /core/config/devices/miflora/miflora.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miflora/miflora.jpg -------------------------------------------------------------------------------- /core/config/devices/miflora/miflora_ropot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miflora/miflora_ropot.jpg -------------------------------------------------------------------------------- /core/config/devices/miscale/ajax/miscale.ajax.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | try { 20 | require_once dirname(__FILE__) . '/../../../../../../../core/php/core.inc.php'; 21 | require_once dirname(__FILE__) . '/../class/miscale.class.php'; 22 | include_file('core', 'authentification', 'php'); 23 | 24 | if (!isConnect('admin')) { 25 | throw new Exception('401 Unauthorized'); 26 | } 27 | 28 | ajax::init(); 29 | 30 | if (init('action') == 'saveUserList') { 31 | $blea = blea::byId(init('id')); 32 | if (!is_object($blea)) { 33 | ajax::success(array()); 34 | } 35 | ajax::success(miscaleblea::saveUserList(init('id'),init('userList'))); 36 | } 37 | 38 | throw new Exception('Aucune methode correspondante'); 39 | /* * *********Catch exeption*************** */ 40 | } catch (Exception $e) { 41 | ajax::error(displayExeption($e), $e->getCode()); 42 | } 43 | ?> 44 | -------------------------------------------------------------------------------- /core/config/devices/miscale/miscale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miscale/miscale.jpg -------------------------------------------------------------------------------- /core/config/devices/miscale/miscale_2019.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miscale/miscale_2019.jpg -------------------------------------------------------------------------------- /core/config/devices/miscale2/ajax/miscale2.ajax.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | try { 20 | require_once dirname(__FILE__) . '/../../../../../../../core/php/core.inc.php'; 21 | require_once dirname(__FILE__) . '/../class/miscale2.class.php'; 22 | include_file('core', 'authentification', 'php'); 23 | 24 | if (!isConnect('admin')) { 25 | throw new Exception('401 Unauthorized'); 26 | } 27 | 28 | ajax::init(); 29 | 30 | if (init('action') == 'saveUserList') { 31 | $blea = blea::byId(init('id')); 32 | if (!is_object($blea)) { 33 | ajax::success(array()); 34 | } 35 | ajax::success(miscale2blea::saveUserList(init('id'),init('userList'))); 36 | } 37 | 38 | throw new Exception('Aucune methode correspondante'); 39 | /* * *********Catch exeption*************** */ 40 | } catch (Exception $e) { 41 | ajax::error(displayExeption($e), $e->getCode()); 42 | } 43 | ?> 44 | -------------------------------------------------------------------------------- /core/config/devices/miscale2/miscale2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/miscale2/miscale2.jpg -------------------------------------------------------------------------------- /core/config/devices/myfox/myfox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/myfox/myfox.jpg -------------------------------------------------------------------------------- /core/config/devices/myfox/myfox.json: -------------------------------------------------------------------------------- 1 | { 2 | "myfox": { 3 | "name": "Myfox", 4 | "groupe" : "Sécurité", 5 | "configuration" : { 6 | "name" : "myfox" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Myfox", 13 | "name": "Badge", 14 | "doc": "", 15 | "type": "Présence", 16 | "battery_type": "1x3V CR2032", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour de la présence", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "myfox" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/niu/niu.json: -------------------------------------------------------------------------------- 1 | { 2 | "niu": { 3 | "name": "Niu", 4 | "groupe" : "Boutons", 5 | "configuration" : { 6 | "resetRssis" : 0, 7 | "battery_type" : "1x3V CR2032", 8 | "name" : "niu" 9 | }, 10 | "commands": [ 11 | { 12 | "name": "BoutonID", 13 | "type": "info", 14 | "subtype": "numeric", 15 | "isVisible": 0, 16 | "isHistorized": 0, 17 | "template": { 18 | "mobile": "badge", 19 | "dashboard" : "badge" 20 | }, 21 | "configuration": { 22 | "repeatEventManagement" : "always" 23 | }, 24 | "unite": "", 25 | "logicalId": "buttonid" 26 | }, 27 | { 28 | "name": "Boutons", 29 | "type": "info", 30 | "subtype": "string", 31 | "isVisible": 1, 32 | "isHistorized": 1, 33 | "unite": "", 34 | "configuration": { 35 | "repeatEventManagement" : "always" 36 | }, 37 | "logicalId": "button" 38 | }, 39 | { 40 | "name": "Batterie", 41 | "type": "info", 42 | "subtype": "numeric", 43 | "display": { 44 | "generic_type": "GENERIC" 45 | }, 46 | "isVisible": 0, 47 | "isHistorized": 0, 48 | "unite": "%", 49 | "logicalId": "battery" 50 | } 51 | ], 52 | "compatibility": [ 53 | { 54 | "manufacturer": "Nodon", 55 | "name": "Niu Wazabi", 56 | "doc": "", 57 | "type": "Boutons", 58 | "battery_type": "1x3V CR2032", 59 | "ref" : "", 60 | "comlink": "", 61 | "remark": "Disponible en plusieurs coloris", 62 | "inclusion" : "Mode inclusion et appui sur le bouton", 63 | "imglink": "niu_wazabi" 64 | }, 65 | { 66 | "manufacturer": "Nodon", 67 | "name": "Niu Gris", 68 | "doc": "", 69 | "type": "Boutons", 70 | "battery_type": "1x3V CR2032", 71 | "ref" : "", 72 | "comlink": "", 73 | "remark": "Disponible en plusieurs coloris", 74 | "inclusion" : "Mode inclusion et appui sur le bouton", 75 | "imglink": "niu_cozygrey" 76 | }, 77 | { 78 | "manufacturer": "Nodon", 79 | "name": "Niu Lagoon", 80 | "doc": "", 81 | "type": "Boutons", 82 | "battery_type": "1x3V CR2032", 83 | "ref" : "", 84 | "comlink": "", 85 | "remark": "Disponible en plusieurs coloris", 86 | "inclusion" : "Mode inclusion et appui sur le bouton", 87 | "imglink": "niu_lagoon" 88 | }, 89 | { 90 | "manufacturer": "Nodon", 91 | "name": "Niu Softberry", 92 | "doc": "", 93 | "type": "Boutons", 94 | "battery_type": "1x3V CR2032", 95 | "ref" : "", 96 | "comlink": "", 97 | "remark": "Disponible en plusieurs coloris", 98 | "inclusion" : "Mode inclusion et appui sur le bouton", 99 | "imglink": "niu_softberry" 100 | }, 101 | { 102 | "manufacturer": "Nodon", 103 | "name": "Niu Techblue", 104 | "doc": "", 105 | "type": "Boutons", 106 | "battery_type": "1x3V CR2032", 107 | "ref" : "", 108 | "comlink": "", 109 | "remark": "Disponible en plusieurs coloris", 110 | "inclusion" : "Mode inclusion et appui sur le bouton", 111 | "imglink": "niu_techblue" 112 | }, 113 | { 114 | "manufacturer": "Nodon", 115 | "name": "Niu Blanc", 116 | "doc": "", 117 | "type": "Boutons", 118 | "battery_type": "1x3V CR2032", 119 | "ref" : "", 120 | "comlink": "", 121 | "remark": "Disponible en plusieurs coloris", 122 | "inclusion" : "Mode inclusion et appui sur le bouton", 123 | "imglink": "niu_white" 124 | } 125 | ] 126 | } 127 | } -------------------------------------------------------------------------------- /core/config/devices/niu/niu_cozygrey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_cozygrey.jpg -------------------------------------------------------------------------------- /core/config/devices/niu/niu_lagoon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_lagoon.jpg -------------------------------------------------------------------------------- /core/config/devices/niu/niu_softberry.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_softberry.jpg -------------------------------------------------------------------------------- /core/config/devices/niu/niu_techblue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_techblue.jpg -------------------------------------------------------------------------------- /core/config/devices/niu/niu_wazabi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_wazabi.jpg -------------------------------------------------------------------------------- /core/config/devices/niu/niu_white.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/niu/niu_white.jpg -------------------------------------------------------------------------------- /core/config/devices/noke/noke.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/noke/noke.jpg -------------------------------------------------------------------------------- /core/config/devices/noke/noke.json: -------------------------------------------------------------------------------- 1 | { 2 | "noke": { 3 | "name": "Noke", 4 | "groupe" : "Cadenas", 5 | "configuration" : { 6 | "name" : "noke" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Noke", 13 | "name": "Noke", 14 | "doc": "", 15 | "type": "Cadenas", 16 | "battery_type": "1x3V CR2032", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Visible que sur appui du bouton (peut fonctionner via un hack des trames pour récupérer la clé) mais ne sera pas fait car illégal", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "noke" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/nut/nut.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut.json: -------------------------------------------------------------------------------- 1 | { 2 | "nut": { 3 | "name": "Nut", 4 | "groupe" : "Présence", 5 | "configuration" : { 6 | "name" : "nut", 7 | "battery_type" : "1x3V CR2032" 8 | }, 9 | "commands": [ 10 | { 11 | "name": "Présence", 12 | "type": "info", 13 | "subtype": "binary", 14 | "display": { 15 | "generic_type": "PRESENCE" 16 | }, 17 | "isVisible": 1, 18 | "isHistorized": 0, 19 | "unite": "", 20 | "logicalId": "present" 21 | }, 22 | { 23 | "name": "Batterie", 24 | "type": "info", 25 | "subtype": "numeric", 26 | "display": { 27 | "icon": "<\/i>", 28 | "generic_type": "BATTERY" 29 | }, 30 | "isVisible": 0, 31 | "isHistorized": 0, 32 | "unite": "%", 33 | "logicalId": "battery", 34 | "template": { 35 | "dashboard": "line", 36 | "mobile": "line" 37 | } 38 | }, 39 | { 40 | "name": "Refresh", 41 | "type": "action", 42 | "subtype": "other", 43 | "display": { 44 | "icon": "<\/i>", 45 | "generic_type": "GENERIC" 46 | }, 47 | "isVisible": 1, 48 | "isHistorized": 0, 49 | "unite": "", 50 | "logicalId": "refresh" 51 | } 52 | ], 53 | "compatibility": [ 54 | { 55 | "manufacturer": "Nut", 56 | "name": "Nut", 57 | "doc": "", 58 | "type": "Présence", 59 | "battery_type": "1x3V CR2032", 60 | "ref" : "", 61 | "comlink": "", 62 | "remark": "Uniquement pour de la présence", 63 | "inclusion" : "Mode inclusion", 64 | "imglink": "nut" 65 | }, 66 | { 67 | "manufacturer": "Nut", 68 | "name": "Nut Mini Bleu", 69 | "doc": "", 70 | "type": "Présence", 71 | "battery_type": "1x3V CR2032", 72 | "ref" : "", 73 | "comlink": "", 74 | "remark": "", 75 | "inclusion" : "Mode inclusion", 76 | "imglink": "nut_mini_bleu" 77 | } 78 | ] 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /core/config/devices/nut/nut_ale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_ale.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_find_3_blanc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_find_3_blanc.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_find_3_gris.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_find_3_gris.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_find_3_rose.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_find_3_rose.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_find_3_vert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_find_3_vert.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_mini_blanc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_mini_blanc.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_mini_bleu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_mini_bleu.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_mini_rose.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_mini_rose.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_mini_vert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_mini_vert.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_nutale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_nutale.jpg -------------------------------------------------------------------------------- /core/config/devices/nut/nut_orange.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/nut/nut_orange.jpg -------------------------------------------------------------------------------- /core/config/devices/parrotpot/parrotpot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/parrotpot/parrotpot.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_bluelabel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_bluelabel.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_candle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_candle.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_garden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_garden.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_original.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_rainbow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_rainbow.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_smart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_smart.jpg -------------------------------------------------------------------------------- /core/config/devices/playbulb/playbulb_sphere.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/playbulb/playbulb_sphere.jpg -------------------------------------------------------------------------------- /core/config/devices/ropot/ropot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/ropot/ropot.jpg -------------------------------------------------------------------------------- /core/config/devices/ruuvi/ruuvi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/ruuvi/ruuvi.jpg -------------------------------------------------------------------------------- /core/config/devices/smartplug/smartplug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/smartplug/smartplug.jpg -------------------------------------------------------------------------------- /core/config/devices/smartplug/smartplug.json: -------------------------------------------------------------------------------- 1 | { 2 | "smartplug": { 3 | "name": "Smartplug", 4 | "groupe" : "Prises", 5 | "configuration" : { 6 | "needsrefresh" : 1, 7 | "name" : "smartplug", 8 | "delay" : 120, 9 | "cancontrol" : 1, 10 | "canbelocked" : 1 11 | }, 12 | "commands": [ 13 | { 14 | "name": "Statut", 15 | "type": "info", 16 | "subtype": "binary", 17 | "display": { 18 | "generic_type": "GENERIC" 19 | }, 20 | "isVisible": 1, 21 | "isHistorized": 0, 22 | "unite": "", 23 | "logicalId": "status" 24 | }, 25 | { 26 | "name": "Consommation", 27 | "type": "info", 28 | "subtype": "numeric", 29 | "isVisible": 1, 30 | "isHistorized": 0, 31 | "template": { 32 | "mobile": "badge", 33 | "dashboard" : "badge" 34 | }, 35 | "unite": "", 36 | "logicalId": "power" 37 | }, 38 | { 39 | "name": "On", 40 | "type": "action", 41 | "subtype": "other", 42 | "isVisible": 1, 43 | "logicalId": "name:smp-b16-fr,handle:0x2b,value:0f06030001000005ffff" 44 | }, 45 | { 46 | "name": "Off", 47 | "type": "action", 48 | "subtype": "other", 49 | "isVisible": 1, 50 | "logicalId": "name:smp-b16-fr,handle:0x2b,value:0f06030000000004ffff" 51 | }, 52 | { 53 | "name": "Rafraichir", 54 | "type": "action", 55 | "subtype": "other", 56 | "isVisible": 1, 57 | "logicalId": "refresh" 58 | } 59 | ], 60 | "compatibility": [ 61 | { 62 | "manufacturer": "Awox", 63 | "name": "Smartplug", 64 | "doc": "", 65 | "type": "Prises", 66 | "battery_type": "", 67 | "ref" : "", 68 | "comlink": "", 69 | "remark": "", 70 | "inclusion" : "Mode inclusion", 71 | "imglink": "smartplug" 72 | } 73 | ] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /core/config/devices/tb05/tb05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/tb05/tb05.jpg -------------------------------------------------------------------------------- /core/config/devices/ticatag/ticatag.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/ticatag/ticatag.jpg -------------------------------------------------------------------------------- /core/config/devices/ticatag/ticatag.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticatag": { 3 | "name": "Ticatag", 4 | "groupe" : "Boutons", 5 | "configuration" : { 6 | "cancontrol" : 1, 7 | "battery_type" : "1x3V CR2032", 8 | "name" : "ticatag" 9 | }, 10 | "commands": [ 11 | { 12 | "name": "Température", 13 | "type": "info", 14 | "subtype": "numeric", 15 | "display": { 16 | "generic_type": "GENERIC" 17 | }, 18 | "isVisible": 1, 19 | "isHistorized": 0, 20 | "unite": "°C", 21 | "logicalId": "temperature", 22 | "display": { 23 | "icon": "<\/i>", 24 | "generic_type": "DONT" 25 | }, 26 | "template": { 27 | "dashboard": "line", 28 | "mobile": "line" 29 | } 30 | }, 31 | { 32 | "name": "BoutonID", 33 | "type": "info", 34 | "subtype": "numeric", 35 | "isVisible": 0, 36 | "isHistorized": 0, 37 | "template": { 38 | "mobile": "badge", 39 | "dashboard" : "badge" 40 | }, 41 | "configuration": { 42 | "repeatEventManagement" : "always" 43 | }, 44 | "unite": "", 45 | "logicalId": "buttonid" 46 | }, 47 | { 48 | "name": "Boutons", 49 | "type": "info", 50 | "subtype": "string", 51 | "isVisible": 1, 52 | "isHistorized": 1, 53 | "unite": "", 54 | "logicalId": "button", 55 | "display": { 56 | "icon": "<\/i>", 57 | "generic_type": "DONT" 58 | }, 59 | "configuration": { 60 | "repeatEventManagement" : "always" 61 | }, 62 | "template": { 63 | "dashboard": "line", 64 | "mobile": "line" 65 | } 66 | }, 67 | { 68 | "name": "Bip", 69 | "type": "action", 70 | "subtype": "other", 71 | "isVisible": 1, 72 | "logicalId": "name:ticatag,handle:0x12,value:01", 73 | "display": { 74 | "icon": "<\/i>", 75 | "generic_type": "DONT" 76 | } 77 | }, 78 | { 79 | "name": "Batterie", 80 | "type": "info", 81 | "subtype": "numeric", 82 | "display": { 83 | "generic_type": "GENERIC" 84 | }, 85 | "isVisible": 0, 86 | "isHistorized": 0, 87 | "unite": "%", 88 | "logicalId": "battery" 89 | } 90 | ], 91 | "compatibility": [ 92 | { 93 | "manufacturer": "Tibe", 94 | "name": "Ticatag", 95 | "doc": "", 96 | "type": "Boutons", 97 | "battery_type": "1x3V CR2032", 98 | "ref" : "", 99 | "comlink": "", 100 | "remark": "Le relachement est envoyé même après un appui simple ou appui double", 101 | "inclusion" : "Mode inclusion et appui sur le bouton", 102 | "imglink": "ticatag" 103 | } 104 | ] 105 | } 106 | } -------------------------------------------------------------------------------- /core/config/devices/tile/tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/tile/tile.jpg -------------------------------------------------------------------------------- /core/config/devices/tile/tile.json: -------------------------------------------------------------------------------- 1 | { 2 | "tile": { 3 | "name": "Tile", 4 | "groupe" : "Présence", 5 | "configuration" : { 6 | "name" : "tile" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Tile", 13 | "name": "Tile", 14 | "doc": "", 15 | "type": "Présence", 16 | "battery_type": "1x3V CR2032", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour de la présence", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "tile" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/wistiki/wistiki.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/wistiki/wistiki.jpg -------------------------------------------------------------------------------- /core/config/devices/wistiki/wistiki.json: -------------------------------------------------------------------------------- 1 | { 2 | "wistiki": { 3 | "name": "Wistiki", 4 | "groupe" : "Présence", 5 | "configuration" : { 6 | "name" : "wistiki" 7 | }, 8 | "commands": [ 9 | ], 10 | "compatibility": [ 11 | { 12 | "manufacturer": "Wistiki", 13 | "name": "Wistiki", 14 | "doc": "", 15 | "type": "Présence", 16 | "battery_type": "1x3V CR2032", 17 | "ref" : "", 18 | "comlink": "", 19 | "remark": "Uniquement pour de la présence", 20 | "inclusion" : "Mode inclusion", 21 | "imglink": "wistiki" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /core/config/devices/xiaomiht/xiaomiht.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/xiaomiht/xiaomiht.jpg -------------------------------------------------------------------------------- /core/config/devices/xiaomiht/xiaomiht.json: -------------------------------------------------------------------------------- 1 | { 2 | "xiaomiht": { 3 | "name": "Xiaomi Température Humidité", 4 | "groupe" : "Température", 5 | "models" : {"xiaomiht/xiaomiht_cleargrass" : {"configuration" :{"battery_type" : "1x3V CR2430"}}}, 6 | "configuration" : { 7 | "needsrefresh" : 0, 8 | "name" : "xiaomiht", 9 | "battery_type" : "1x1.5V AAA", 10 | "xiaomi" : 1, 11 | "delay" : 1800, 12 | "cancontrol" : 0 13 | }, 14 | "commands": [ 15 | { 16 | "name": "Température", 17 | "type": "info", 18 | "subtype": "numeric", 19 | "display": { 20 | "icon": "<\/i>", 21 | "generic_type": "TEMPERATURE" 22 | }, 23 | "isVisible": 1, 24 | "isHistorized": 0, 25 | "unite": "°C", 26 | "logicalId": "temperature", 27 | "template": { 28 | "dashboard": "line", 29 | "mobile": "line" 30 | } 31 | }, 32 | { 33 | "name": "Humidité", 34 | "type": "info", 35 | "subtype": "numeric", 36 | "display": { 37 | "icon": "<\/i>", 38 | "generic_type": "HUMIDITY" 39 | }, 40 | "isVisible": 1, 41 | "isHistorized": 0, 42 | "unite": "%", 43 | "logicalId": "moisture", 44 | "template": { 45 | "dashboard": "line", 46 | "mobile": "line" 47 | } 48 | }, 49 | { 50 | "name": "Batterie", 51 | "type": "info", 52 | "subtype": "numeric", 53 | "display": { 54 | "icon": "<\/i>", 55 | "generic_type": "BATTERY" 56 | }, 57 | "isVisible": 0, 58 | "isHistorized": 0, 59 | "unite": "%", 60 | "logicalId": "battery", 61 | "template": { 62 | "dashboard": "line", 63 | "mobile": "line" 64 | } 65 | }, 66 | { 67 | "name": "Firmware", 68 | "type": "info", 69 | "subtype": "string", 70 | "display": { 71 | "generic_type": "GENERIC" 72 | }, 73 | "isVisible": 0, 74 | "isHistorized": 0, 75 | "unite": "", 76 | "logicalId": "firmware" 77 | }, 78 | { 79 | "name": "Refresh", 80 | "type": "action", 81 | "subtype": "other", 82 | "display": { 83 | "icon": "<\/i>", 84 | "generic_type": "GENERIC" 85 | }, 86 | "isVisible": 1, 87 | "isHistorized": 0, 88 | "unite": "", 89 | "logicalId": "refresh" 90 | } 91 | ], 92 | "compatibility": [ 93 | { 94 | "manufacturer": "Xiaomi", 95 | "name": "Température Humidité", 96 | "doc": "", 97 | "type": "Capteurs", 98 | "battery_type": "1x1.5V AAA", 99 | "ref" : "", 100 | "comlink": "", 101 | "remark": "Capteurs de Température Humidité avec écran", 102 | "inclusion" : "Mode inclusion", 103 | "imglink": "xiaomiht" 104 | }, 105 | { 106 | "manufacturer": "Xiaomi", 107 | "name": "Température Humidité Cleargrass", 108 | "doc": "", 109 | "type": "Micromodule", 110 | "ref" : "", 111 | "comlink": "", 112 | "remark": "Capteurs de Température Humidité avec écran e-ink", 113 | "inclusion" : "Mode inclusion", 114 | "imglink": "xiaomiht_cleargrass" 115 | } 116 | ] 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /core/config/devices/xiaomiht/xiaomiht_cleargrass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/xiaomiht/xiaomiht_cleargrass.jpg -------------------------------------------------------------------------------- /core/config/devices/yeelight/yeelight_bed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/core/config/devices/yeelight/yeelight_bed.jpg -------------------------------------------------------------------------------- /core/config/devices/yeelight/yeelight_bed.json: -------------------------------------------------------------------------------- 1 | { 2 | "yeelight_bed": { 3 | "name": "Yeelight - Bed", 4 | "groupe" : "Lumières", 5 | "configuration" : { 6 | "cancontrol" : 1, 7 | "name" : "yeelight_bed", 8 | "xiaomi" : 1, 9 | "canbelocked" : 1 10 | }, 11 | "commands": [ 12 | { 13 | "name": "Couleur", 14 | "type": "action", 15 | "subtype": "color", 16 | "isVisible": 1, 17 | "unite": "", 18 | "logicalId": "name:yeelight_bed,handle:0x12,value:#color#,type:color", 19 | "display": { 20 | "forceReturnLineBefore": 1 21 | } 22 | }, 23 | { 24 | "name": "On", 25 | "type": "action", 26 | "subtype": "other", 27 | "isVisible": 1, 28 | "unite": "", 29 | "logicalId": "name:yeelight_bed,handle:0x12,value:434001,type:switch", 30 | "display": { 31 | "icon": "<\/i>" 32 | } 33 | }, 34 | { 35 | "name": "Off", 36 | "type": "action", 37 | "subtype": "other", 38 | "isVisible": 1, 39 | "unite": "", 40 | "logicalId": "name:yeelight_bed,handle:0x12,value:434002,type:switch", 41 | "display": { 42 | "icon": "<\/i>" 43 | } 44 | }, 45 | { 46 | "name": "Pair", 47 | "type": "action", 48 | "subtype": "other", 49 | "isVisible": 0, 50 | "unite": "", 51 | "logicalId": "name:yeelight_bed,handle:0x12,value:4341FF000000FF,type:pair" 52 | }, 53 | { 54 | "name": "Luminosité", 55 | "type": "action", 56 | "subtype": "slider", 57 | "isVisible": 1, 58 | "unite": "", 59 | "logicalId": "name:yeelight_bed,handle:0x12,value:#slider#,type:brightness", 60 | "configuration": { 61 | "minValue": 1, 62 | "maxValue": 100 63 | } 64 | }, 65 | { 66 | "name": "Blanc", 67 | "type": "action", 68 | "subtype": "slider", 69 | "isVisible": 1, 70 | "unite": "", 71 | "logicalId": "name:yeelight_bed,handle:0x12,value:#slider#,type:white", 72 | "configuration": { 73 | "minValue": 1700, 74 | "maxValue": 6500 75 | } 76 | } 77 | ], 78 | "compatibility": [ 79 | { 80 | "manufacturer": "Yeelight", 81 | "name": "Bed", 82 | "doc": "", 83 | "type": "Lumières", 84 | "battery_type": "", 85 | "ref" : "", 86 | "comlink": "", 87 | "remark": "Il faut valider l'appairage en appuyant sur le bouton. Si éteint il faut allumer avant de choisir une couleur", 88 | "inclusion" : "Mode inclusion", 89 | "imglink": "yeelight_bed" 90 | } 91 | ] 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /core/i18n/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /core/template/dashboard/cmd.action.message.default.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | #name_display# 6 |
7 | 26 |
27 | -------------------------------------------------------------------------------- /core/template/dashboard/dotti.html: -------------------------------------------------------------------------------- 1 |
2 | 11 | 12 |
#name_display#
13 | 14 |
15 |
16 | 17 | 18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 | 27 |
28 |
29 |
30 | 31 | 60 |
61 | -------------------------------------------------------------------------------- /core/template/mobile/divoomtimeboxmini.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
#name_display# #object_name#
4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
17 |
19 |
20 |
21 |
22 | 23 | 48 |
49 | -------------------------------------------------------------------------------- /core/template/mobile/dotti.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
#name_display# #object_name#
4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 |
15 |
17 |
18 |
19 |
20 | 21 | 46 |
47 | -------------------------------------------------------------------------------- /data/collection_dotti_sample.json: -------------------------------------------------------------------------------- 1 | {"coeur":{"1":"#000000","2":"#000000","3":"#ff0000","4":"#000000","5":"#000000","6":"#ff0000","7":"#000000","8":"#000000","9":"#000000","10":"#ff0000","11":"#000000","12":"#ff0000","13":"#ff0000","14":"#000000","15":"#ff0000","16":"#000000","17":"#ff0000","18":"#000000","19":"#000000","20":"#ff0000","21":"#ff0000","22":"#000000","23":"#000000","24":"#ff0000","25":"#ff0000","26":"#000000","27":"#000000","28":"#000000","29":"#000000","30":"#000000","31":"#000000","32":"#ff0000","33":"#ff0000","34":"#000000","35":"#000000","36":"#000000","37":"#000000","38":"#000000","39":"#000000","40":"#ff0000","41":"#000000","42":"#ff0000","43":"#000000","44":"#000000","45":"#000000","46":"#000000","47":"#ff0000","48":"#000000","49":"#000000","50":"#000000","51":"#ff0000","52":"#000000","53":"#000000","54":"#ff0000","55":"#000000","56":"#000000","57":"#000000","58":"#000000","59":"#000000","60":"#ff0000","61":"#ff0000","62":"#000000","63":"#000000","64":"#000000"},"luigi":{"1":"#000000","2":"#000000","3":"#000000","4":"#00ff00","5":"#00ff00","6":"#00ff00","7":"#ffffff","8":"#000000","9":"#000000","10":"#000000","11":"#000000","12":"#00ff00","13":"#00ff00","14":"#00ff00","15":"#00ff00","16":"#00ff00","17":"#000000","18":"#000000","19":"#201000","20":"#201000","21":"#201000","22":"#ffff80","23":"#ffff80","24":"#000000","25":"#000000","26":"#000000","27":"#201000","28":"#ffff80","29":"#201000","30":"#000000","31":"#ffff80","32":"#000000","33":"#000000","34":"#000000","35":"#000000","36":"#ffff80","37":"#ffff80","38":"#201000","39":"#201000","40":"#ffff80","41":"#000000","42":"#00ff00","43":"#00ff00","44":"#ffff00","45":"#ffff80","46":"#ffff80","47":"#ffff80","48":"#000000","49":"#ffffff","50":"#000000","51":"#0000ff","52":"#0000ff","53":"#0000ff","54":"#0000ff","55":"#0000ff","56":"#ffffff","57":"#000000","58":"#000000","59":"#201000","60":"#000000","61":"#000000","62":"#000000","63":"#201000","64":"#000000"}} -------------------------------------------------------------------------------- /desktop/modal/syncconf.blea.php: -------------------------------------------------------------------------------- 1 | . 16 | */ 17 | if (!isConnect('admin')) { 18 | throw new Exception('{{401 - Accès non autorisé}}'); 19 | } 20 | ?> 21 | 22 | {{Pause}} 23 | 24 |


25 |
26 | Arrêt du démon en cours
27 | 
28 | 29 | -------------------------------------------------------------------------------- /docs/images/blea_commands_niu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_commands_niu.jpg -------------------------------------------------------------------------------- /docs/images/blea_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_icon.png -------------------------------------------------------------------------------- /docs/images/blea_screenshot1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot1.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot2.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot3.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot4.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot5.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot6.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot7.jpg -------------------------------------------------------------------------------- /docs/images/blea_screenshot8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/blea_screenshot8.jpg -------------------------------------------------------------------------------- /docs/images/gestion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/docs/images/gestion.jpg -------------------------------------------------------------------------------- /mobile/html/blea.html: -------------------------------------------------------------------------------- 1 | 17 | 29 | 30 |
31 |
32 | 38 |
39 |
40 | 41 |
42 |
{{Lancer Scan}}
43 |
44 |
45 | {{Santé}} 46 | {{Réseau}} 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
{{Image}}{{Nom}}{{Batterie}}{{Présent}}{{Dernière comm}}
60 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /plugin_info/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | 3 | allow from all 4 | 5 | Deny from all -------------------------------------------------------------------------------- /plugin_info/blea_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/plugin_info/blea_icon.png -------------------------------------------------------------------------------- /plugin_info/install.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | require_once dirname(__FILE__) . '/../../../core/php/core.inc.php'; 20 | 21 | function blea_install() { 22 | $sql = file_get_contents(dirname(__FILE__) . '/install.sql'); 23 | DB::Prepare($sql, array(), DB::FETCH_TYPE_ROW); 24 | foreach (blea::byType('blea') as $blea) { 25 | $blea->save(); 26 | } 27 | config::save('version',blea::$_version,'blea'); 28 | } 29 | 30 | function blea_update() { 31 | $sql = file_get_contents(dirname(__FILE__) . '/install.sql'); 32 | DB::Prepare($sql, array(), DB::FETCH_TYPE_ROW); 33 | foreach (blea::byType('blea') as $blea) { 34 | $blea->save(); 35 | } 36 | message::add('blea','Pensez à mettre à jour vos antennes et relancer leurs dépendances si besoin ...'); 37 | config::save('version',blea::$_version,'blea'); 38 | if (config::byKey('allowUpdateAntennas','blea',0) == 1) { 39 | log::add('blea','info','Mise à jour des fichiers de toutes les antennes'); 40 | blea::send_allremotes(); 41 | } 42 | } 43 | 44 | function blea_remove() { 45 | DB::Prepare('DROP TABLE IF EXISTS `blea_remote`', array(), DB::FETCH_TYPE_ROW); 46 | } 47 | 48 | ?> 49 | -------------------------------------------------------------------------------- /plugin_info/install.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `blea_remote` ( 2 | `id` int(11) NOT NULL AUTO_INCREMENT, 3 | `remoteName` varchar(128) DEFAULT NULL, 4 | `configuration` TEXT DEFAULT NULL, 5 | PRIMARY KEY (`id`) 6 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -------------------------------------------------------------------------------- /resources/.htaccess: -------------------------------------------------------------------------------- 1 | Order allow,deny 2 | Deny from all -------------------------------------------------------------------------------- /resources/blead/devices/__init__.py: -------------------------------------------------------------------------------- 1 | import pkgutil 2 | import logging 3 | __path__ = pkgutil.extend_path(__path__, __name__) 4 | for importer, modname, ispkg in pkgutil.walk_packages(path=__path__, prefix=__name__+'.'): 5 | logging.info("LOADER------Import de la configuration " + modname) 6 | try: 7 | __import__(modname) 8 | except Exception as e: 9 | logging.debug('Impossible d\'importer ' + modname + ' : ' + str(e)) 10 | -------------------------------------------------------------------------------- /resources/blead/devices/amazfitgtr.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | 7 | class AmazfitGtr(): 8 | def __init__(self): 9 | self.name = 'amazfitgtr' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() in ['amazfit gtr',self.name]: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | return action 20 | 21 | globals.COMPATIBILITY.append(AmazfitGtr) 22 | -------------------------------------------------------------------------------- /resources/blead/devices/beagle.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Beagle(): 7 | def __init__(self): 8 | self.name = 'beagle' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | if manuf.lower()[0:8] == 'b6028e44': 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | logging.debug('Parsing data ' + manuf) 20 | cf= manuf[12:14] 21 | if cf == '00' and mac.upper() in globals.KNOWN_DEVICES: 22 | action['present'] = 1 23 | action['firmware'] = manuf[24:30] 24 | if manuf[22:24] == '00': 25 | action['value'] = '0' 26 | action['label'] = 'Off' 27 | elif manuf[22:24] == '01': 28 | action['value'] = '1' 29 | action['label'] = 'On' 30 | elif manuf[22:24] == '02': 31 | action['value'] = '2' 32 | action['label'] = 'Toggle' 33 | elif manuf[22:24] == '03': 34 | action['value'] = '3' 35 | action['label'] = 'Dim Up' 36 | elif manuf[22:24] == '04': 37 | action['value'] = '4' 38 | action['label'] = 'Dim Down' 39 | elif manuf[22:24] == '05': 40 | action['value'] = '5' 41 | action['label'] = 'Haut' 42 | elif manuf[22:24] == '06': 43 | action['value'] = '6' 44 | action['label'] = 'Bas' 45 | elif manuf[22:24] == '07': 46 | action['value'] = '7' 47 | action['label'] = 'Stop' 48 | elif manuf[22:24] == '08': 49 | action['value'] = '8' 50 | action['label'] = 'Scene User' 51 | elif manuf[22:24] == '09': 52 | action['value'] = '9' 53 | action['label'] = 'Scene In' 54 | elif manuf[22:24] == '0a': 55 | action['value'] = '10' 56 | action['label'] = 'Scene Out' 57 | elif cf == '01' and mac.upper() not in globals.KNOWN_DEVICES: 58 | action['present'] = 1 59 | else: 60 | action['bind'] = False 61 | return action 62 | return action 63 | 64 | globals.COMPATIBILITY.append(Beagle) -------------------------------------------------------------------------------- /resources/blead/devices/beewismartdoor.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | import struct 6 | import datetime 7 | from multiconnect import Connector 8 | from notification import Notification 9 | import binascii 10 | 11 | from multiconnect import Connector 12 | from notification import Notification 13 | 14 | class BeeWiSmartDoor(): 15 | def __init__(self): 16 | self.name = 'beewi smart door' 17 | self.ignoreRepeat = False 18 | 19 | def isvalid(self,name,manuf='',data='',mac=''): 20 | if manuf[0:8] == '0d00080c': 21 | return True 22 | if name.lower() == self.name: 23 | return True 24 | 25 | def parse(self,data,mac,name,manuf): 26 | action={} 27 | action['present'] = 1 28 | logging.debug('PARSE: manuf[4:9]= ' + manuf[4:9] ) 29 | status = manuf[9:10] 30 | if status == '1': 31 | status = '0' 32 | elif status == '0': 33 | status = '1' 34 | battery = manuf[12:14] 35 | action['status'] = status 36 | action['battery'] = int(battery,16) 37 | logging.debug('BeeWi PARSE: status = ' + status ) 38 | return action 39 | 40 | def read(self,mac): 41 | result={} 42 | try: 43 | conn = Connector(mac) 44 | conn.connect() 45 | if not conn.isconnected: 46 | conn.connect() 47 | if not conn.isconnected: 48 | return 49 | 50 | #check pairing state first 51 | pairing = conn.readCharacteristic('0x3a') # check pairing state 52 | if pairing: 53 | #initiate pairing sequence 54 | conn.writeCharacteristic('0x3a','00',response=True) # set pairing state to 0 55 | conn.writeCharacteristic('0x33','0100',response=True) # tbd?? 56 | conn.writeCharacteristic('0x32','00',response=True) # reset history days 57 | firmw = str(conn.readCharacteristic('0x18')) # get fw version 58 | name = str(conn.readCharacteristic('0x28')) # get name 59 | conn.writeCharacteristic('0x42','0100',response=True) # tbd?? 60 | curdate = datetime.datetime.today().strftime('%y%m%d%H%M%S') 61 | conn.writeCharacteristic('0x2b', binascii.hexlify(curdate),response=True) #set current time ascii: aammddhhmmss 62 | conn.writeCharacteristic('0x41','00000000',response=True) 63 | conn.writeCharacteristic('0x42','0000',response=True) # tbd?? 64 | notification = Notification(conn,BeeWiSmartDoor) 65 | logging.debug('BeeWi read firmw=' + str(firmw) + ' Name: ' + str(name)) 66 | notification.subscribe(2) 67 | else: 68 | battery = ord(conn.readCharacteristic('0x25')) 69 | result['battery'] = battery 70 | logging.debug('BeeWi read Battery=' + str(battery)) 71 | 72 | result['id'] = mac 73 | return result 74 | except Exception as e: 75 | logging.error(str(e)) 76 | return result 77 | 78 | def handlenotification(self,conn,handle,data,action={}): 79 | result={} 80 | logging.debug('BeeWiiSmartDoor--Handle: '+str(ord(handle))) 81 | 82 | globals.COMPATIBILITY.append(BeeWiSmartDoor) -------------------------------------------------------------------------------- /resources/blead/devices/dreamscreen.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | 7 | class DreamScreen(): 8 | def __init__(self): 9 | self.name = 'dreamscreen' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() in [self.name]: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | return action 20 | 21 | def action(self,message): 22 | mac = message['device']['id'] 23 | handle = message['command']['handle'] 24 | value = message['command']['value'] 25 | type = message['command']['type'] 26 | conn = Connector(mac) 27 | conn.connect() 28 | if not conn.isconnected: 29 | conn.connect() 30 | if not conn.isconnected: 31 | return 32 | try: 33 | if type == 'color': 34 | if value == '000000': 35 | conn.writeCharacteristic(handle,'234277305C72') 36 | else: 37 | value=self.intToStr(int(value[0:2], 16))+self.intToStr(int(value[2:4], 16))+self.intToStr(int(value[4:6], 16)) 38 | conn.writeCharacteristic(handle,'234577'+value+'5C72') 39 | elif type == 'ambient': 40 | conn.writeCharacteristic(handle,'234D77'+value+'5C72') 41 | elif type == 'brightness': 42 | conn.writeCharacteristic(handle,'234377'+self.intToStr(int(value))+'5C72') 43 | else: 44 | conn.writeCharacteristic(handle,value) 45 | conn.disconnect() 46 | except Exception as e: 47 | logging.error('Oups ' +str(e)) 48 | conn.disconnect() 49 | return 50 | def intToStr(self,s): 51 | return "".join("{:02x}".format(ord(c)) for c in str(s).rjust(3,'0')) 52 | 53 | globals.COMPATIBILITY.append(DreamScreen) 54 | -------------------------------------------------------------------------------- /resources/blead/devices/fitbit.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Fitbit(): 7 | def __init__(self): 8 | self.name = 'fitbit' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | if name.lower() == 'charge hr': 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | return action 21 | 22 | globals.COMPATIBILITY.append(Fitbit) -------------------------------------------------------------------------------- /resources/blead/devices/gigaset.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | 7 | class Gigaset(): 8 | def __init__(self): 9 | self.name = 'gigaset g-tag' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() == self.name: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | return action 20 | def read(self,mac): 21 | result={} 22 | try: 23 | conn = Connector(mac) 24 | conn.connect() 25 | if not conn.isconnected: 26 | conn.connect() 27 | if not conn.isconnected: 28 | return 29 | batterytrame = conn.readCharacteristic('0x1b') 30 | logging.debug('GIGASET------Parsing data ' + batterytrame) 31 | battery = int(batterytrame.encode("hex"), 16) 32 | result['battery'] = battery 33 | result['present'] = 1 34 | except Exception as e: 35 | logging.error(str(e)) 36 | conn.disconnect() 37 | conn.disconnect() 38 | result['id'] = mac 39 | return result 40 | globals.COMPATIBILITY.append(Gigaset) 41 | -------------------------------------------------------------------------------- /resources/blead/devices/hector.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | import struct 6 | from multiconnect import Connector 7 | 8 | class Hector(): 9 | def __init__(self): 10 | self.name = 'hector' 11 | self.ignoreRepeat = False 12 | 13 | def isvalid(self,name,manuf='',data='',mac=''): 14 | if name.lower() == self.name: 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | return action 21 | 22 | def read(self,mac): 23 | result={} 24 | try: 25 | conn = Connector(mac) 26 | conn.connect(type='random') 27 | if not conn.isconnected: 28 | conn.connect(type='random') 29 | if not conn.isconnected: 30 | return 31 | battery = struct.unpack('2B',conn.readCharacteristic('0x2e')) 32 | battery = int(str(hex(battery[0])[2:].zfill(2) + hex(battery[1])[2:].zfill(2)),16) 33 | temperature = struct.unpack('2B',conn.readCharacteristic('0x34')) 34 | temperature = int(str(hex(temperature[0])[2:].zfill(2) + hex(temperature[1])[2:].zfill(2)),16) 35 | humidity = struct.unpack('2B',conn.readCharacteristic('0x3c')) 36 | humidity = int(str(hex(humidity[0])[2:].zfill(2) + hex(humidity[1])[2:].zfill(2)),16) 37 | # If pression == Ox00014601 (83457) -> read again at least for 3 attempts 38 | # Hector's sensor seems to always return Ox00014601 at first read attempt 39 | pression = struct.unpack('4B',conn.readCharacteristic('0x44')) 40 | pression = int(str(hex(pression[0])[2:].zfill(2) + hex(pression[1])[2:].zfill(2)+ hex(pression[2])[2:].zfill(2)+ hex(pression[3])[2:].zfill(2)),16) 41 | pression_read = 0 42 | while (pression <= 83457 and pression_read < 3): 43 | time.sleep(0.2) 44 | logging.debug('Hector ----- read ' + str(pression_read)) 45 | pression = struct.unpack('4B',conn.readCharacteristic('0x44')) 46 | pression = int(str(hex(pression[0])[2:].zfill(2) + hex(pression[1])[2:].zfill(2)+ hex(pression[2])[2:].zfill(2)+ hex(pression[3])[2:].zfill(2)),16) 47 | pression_read += 1 48 | logging.debug('Hector -----'+str(pression)) 49 | result['temperature'] = float(temperature)/10 50 | result['humidity'] = float(humidity)/10 51 | result['pressure'] = float(pression)/100 52 | result['batteryvoltage'] = round(float(battery)*0.00051029,2) 53 | if round(float(battery)*0.00051029,2) > 3: 54 | battery = 100 55 | elif round(float(battery)*0.00051029,2) < 2: 56 | battery = 0 57 | else: 58 | battery = round((float(battery)*0.00051029 - 2) *100,0) 59 | result['battery'] = battery 60 | except Exception as e: 61 | logging.error('HECTOR------'+str(e)) 62 | conn.disconnect() 63 | conn.disconnect() 64 | result['id'] = mac 65 | return result 66 | 67 | globals.COMPATIBILITY.append(Hector) 68 | -------------------------------------------------------------------------------- /resources/blead/devices/ibbq4.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | import struct 7 | from multiconnect import Connector 8 | from notification import Notification 9 | 10 | class Ibbq4(): 11 | def __init__(self): 12 | self.name = 'ibbq4' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower() in [self.name,'ibbq']: 17 | return True 18 | 19 | def parse(self,data,mac,name,manuf): 20 | logging.debug('IBBQ ' + data +' '+manuf) 21 | action={} 22 | t1 = manuf[22:24] + manuf[20:22] 23 | t2 = manuf[26:28] + manuf[24:26] 24 | t3 = manuf[30:32] + manuf[28:30] 25 | t4 = manuf[34:36] + manuf[32:34] 26 | temp1=int(t1,16)/10.0 27 | temp2=int(t2,16)/10.0 28 | temp3=int(t3,16)/10.0 29 | temp4=int(t4,16)/10.0 30 | if temp1 < 1500: 31 | action['temp1'] = temp1 32 | else: 33 | action['temp1'] = -1 34 | if temp2 < 1500: 35 | action['temp2'] = temp2 36 | else: 37 | action['temp2'] = -1 38 | if temp3 < 1500: 39 | action['temp3'] = temp3 40 | else: 41 | action['temp3'] = -1 42 | if temp4 < 1500: 43 | action['temp4'] = temp4 44 | else: 45 | action['temp4'] = -1 46 | action['present'] = 1 47 | return action 48 | 49 | def read(self,mac): 50 | result={} 51 | #account verify : 0x29 52 | #realtimedata : 0x30 53 | #settings : 0x34 54 | #settingsresult : 0x25 55 | #historydata : 0x2c 56 | # 57 | #credentials : 0x21, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0xb8, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00 58 | # 59 | #enablerealtime : 0x0B, 0x01, 0x00, 0x00, 0x00, 0x00 60 | # 61 | #units celcisu : 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 62 | # defini seuil : dans 0x34 ecrire 010X48f4YYYY avec x numero de sonde (commencant a 0) et y temperature x10 inverse 63 | # 64 | #0x31 0100 activer notif temp 65 | #batterie 0x34 082400000000 66 | try: 67 | conn = Connector(mac) 68 | conn.connect() 69 | if not conn.isconnected: 70 | conn.connect() 71 | if not conn.isconnected: 72 | return 73 | conn.writeCharacteristic('0x29','2107060504030201b8220000000000',response=True) 74 | notification = Notification(conn,Ibbq4) 75 | conn.writeCharacteristic('0x26','0100',response=True) 76 | conn.writeCharacteristic('0x34','082400000000',response=True) 77 | notification.subscribe(10) 78 | return result 79 | except Exception as e: 80 | logging.error(str(e)) 81 | return result 82 | 83 | def action(self,message): 84 | if 'type' in message['command']: 85 | type = message['command']['type'] 86 | mac = message['device']['id'] 87 | data={} 88 | data['source'] = globals.daemonname 89 | data['id'] = mac 90 | data['sendstatus'] = '-' 91 | globals.JEEDOM_COM.add_changes('devices::'+mac,data) 92 | handle = message['command']['handle'] 93 | value = message['command']['value'] 94 | conn = Connector(mac) 95 | conn.connect() 96 | if not conn.isconnected: 97 | data['sendstatus'] = 'KO' 98 | globals.JEEDOM_COM.add_changes('devices::'+mac,data) 99 | return 100 | conn.writeCharacteristic('0x29','2107060504030201b8220000000000',response=True) 101 | if type == 'setTarget': 102 | logging.debug('IBBQ set Target for probe ' + message['command']['probe'] + ' value ' + value) 103 | valuetohex = hex(int(value)*10)[2:].zfill(4) 104 | towrite = '010'+message['command']['probe']+'48f4'+valuetohex[2:4]+valuetohex[0:2] 105 | logging.debug('IBBQ writing ' + towrite + ' on handle ' + handle) 106 | conn.writeCharacteristic(handle,towrite,response=True) 107 | data['sendstatus'] = 'OK' 108 | globals.JEEDOM_COM.add_changes('devices::'+mac,data) 109 | conn.disconnect() 110 | return 111 | 112 | def handlenotification(self,conn,handle,data,action={}): 113 | result={} 114 | logging.debug('IBBQ NOTIFICATION :' +str(handle) + ' '+ str(data.hex())) 115 | 116 | globals.COMPATIBILITY.append(Ibbq4) 117 | -------------------------------------------------------------------------------- /resources/blead/devices/itag.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | from notification import Notification 7 | 8 | class Itag(): 9 | def __init__(self): 10 | self.name = 'itag' 11 | self.ignoreRepeat = False 12 | 13 | def isvalid(self,name,manuf='',data='',mac=''): 14 | if name.lower() in [self.name,'mle-15']: 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | if mac.upper() in globals.KNOWN_DEVICES and globals.KNOWN_DEVICES[mac.upper()]['emitterallowed'] == globals.daemonname and globals.KNOWN_DEVICES[mac.upper()]['islocked'] == 1: 21 | conn = Connector(mac) 22 | conn.connect() 23 | if not conn.isconnected: 24 | conn.connect() 25 | if not conn.isconnected: 26 | return action 27 | conn.writeCharacteristic('0x36','0100') 28 | notification = Notification(conn,Itag) 29 | notification.subscribe() 30 | globals.KEEPED_CONNECTION[mac.upper()]=conn 31 | return action 32 | 33 | def action(self,message): 34 | mac = message['device']['id'] 35 | handle = message['command']['handle'] 36 | value = message['command']['value'] 37 | conn = Connector(mac) 38 | conn.connect() 39 | if not conn.isconnected: 40 | return 41 | conn.writeCharacteristic(handle,value) 42 | conn.disconnect() 43 | return 44 | 45 | def handlenotification(self,conn,handle,data,action={}): 46 | result={} 47 | result['button'] = 1 48 | result['id'] = conn.mac 49 | result['source'] = globals.daemonname 50 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 51 | 52 | globals.COMPATIBILITY.append(Itag) 53 | -------------------------------------------------------------------------------- /resources/blead/devices/jinlin.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Jinlin(): 7 | def __init__(self): 8 | self.name = 'jinlin' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | 15 | def parse(self,data,mac,name,manuf): 16 | action={} 17 | action['present'] = 1 18 | return action 19 | 20 | globals.COMPATIBILITY.append(Jinlin) -------------------------------------------------------------------------------- /resources/blead/devices/kst1.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | from notification import Notification 7 | 8 | 9 | NOTIFICATION_CHARACTERISTIC_UUID=btle.UUID("0000fff3-0000-1000-8000-00805f9b34fb") 10 | 11 | class KST1(): 12 | def __init__(self): 13 | self.name = 'kst1' 14 | self.ignoreRepeat = False 15 | 16 | def isvalid(self,name,manuf='',data='',mac=''): 17 | if 'ks-t1' in name.lower() or name.lower()==self.name: 18 | return True 19 | 20 | def parse(self,data,mac,name,manuf): 21 | action={} 22 | action['present'] = 1 23 | try: 24 | conn = Connector(mac) 25 | conn.connect() 26 | if not conn.isconnected: 27 | return 28 | notification = Notification(conn,KST1) 29 | conn.writeCharacteristic('0x2c','0100',response=True) 30 | batteryData = (conn.readCharacteristic('0x3a')).hex() 31 | logging.debug(str(batteryData)) 32 | action['battery']= int(batteryData,16) 33 | notification.subscribe(20) 34 | except Exception as e: 35 | logging.error(str(e)) 36 | return action 37 | 38 | def handlenotification(self,conn,handle,data,action={}): 39 | result={} 40 | logging.debug('KST01 NOTIFICATION ' + str(data.hex())) 41 | if hex(handle) == '0x2b': 42 | received = data.hex() 43 | type = str(received[-2:]) 44 | result['mode'] = 'Oreille' 45 | if type == '02': 46 | result['mode'] = 'Front' 47 | temperature = round((float(int(received[4:6],16))*2.56) + (float(int(received[2:4],16))/100),2) 48 | result['id'] = conn.mac 49 | result['temperature'] = str(temperature) 50 | result['source'] = globals.daemonname 51 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 52 | globals.COMPATIBILITY.append(KST1) 53 | -------------------------------------------------------------------------------- /resources/blead/devices/logiswitch.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | from notification import Notification 7 | 8 | class LogiSwitch(): 9 | def __init__(self): 10 | self.name = 'logiswitch' 11 | self.ignoreRepeat = False 12 | 13 | def isvalid(self,name,manuf='',data='',mac=''): 14 | if 'logi switch' in name.lower(): 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | result={} 19 | result['present'] = 1 20 | try: 21 | conn = Connector(mac) 22 | conn.connect() 23 | if not conn.isconnected: 24 | conn.connect() 25 | if not conn.isconnected: 26 | return 27 | notification = Notification(conn,LogiSwitch) 28 | notification.subscribe(2) 29 | except Exception as e: 30 | logging.error(str(e)) 31 | return result 32 | 33 | def handlenotification(self,conn,handle,data,action={}): 34 | result={} 35 | if hex(handle) == '0x28': 36 | received = bytearray(data) 37 | button = str(received[0]) 38 | if button == '2': 39 | result['button'] = 1 40 | result['buttonlabel'] = 'appui simple' 41 | elif button == '4': 42 | result['button'] = 2 43 | result['buttonlabel'] = 'appui double' 44 | elif button == '3': 45 | result['button'] = 3 46 | result['buttonlabel'] = 'appui long' 47 | result['id'] = conn.mac 48 | result['source'] = globals.daemonname 49 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 50 | 51 | globals.COMPATIBILITY.append(LogiSwitch) -------------------------------------------------------------------------------- /resources/blead/devices/lywsd02.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | import struct 7 | from multiconnect import Connector 8 | from notification import Notification 9 | 10 | class Lywsd02(): 11 | def __init__(self): 12 | self.name = 'lywsd02' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower() in [self.name]: 17 | return True 18 | if data.lower().startswith("95fe") and (mac.lower().startswith("3f:59:c8")): 19 | #broadcasted advertising data 20 | return True 21 | 22 | def parse(self,data,mac,name,manuf): 23 | action={} 24 | action['present'] = 1 25 | if data.lower().startswith("95fe"): 26 | ##todo parse data 27 | logging.debug('Lywsd02 PARSE data: ' + data ) 28 | val_type = data[28:30].lower() 29 | val_len = data[32:34] 30 | val_data = data[34:42] 31 | if val_type in ['04']: # type: temperature 32 | t_data = val_data[2:4] + val_data[0:2] 33 | temp = int(t_data,16)/10.0 34 | logging.debug('Lywsd02------ Advertising Data=> Temp' + str(temp)) 35 | action['temperature'] = temp 36 | elif val_type in ['06']: # type: moisture 37 | h_data = val_data[2:4] + val_data[0:2] 38 | hum = int(h_data,16)/10.0 39 | logging.debug('Lywsd02------ Advertising Data=> Moist: ' + str(hum)) 40 | action['moisture'] = hum 41 | elif val_type in ['0a']: # type: battery 42 | b_data = val_data[0:2] 43 | batt = int(b_data,16) 44 | logging.debug('Lywsd02------ Advertising Data=> Batt: ' + str(batt)) 45 | action['battery'] = batt 46 | elif val_type in ['0d']: # type: temp&moist 47 | t_data = val_data[2:4] + val_data[0:2] 48 | temp = int(t_data,16)/10.0 49 | h_data = val_data[6:8] + val_data[4:6] 50 | hum = int(h_data,16)/10.0 51 | logging.debug('Lywsd02------ Advertising Data=> Temp: ' + str(temp) + ' Moist: ' + str(hum)) 52 | action['temperature'] = temp 53 | action['moisture'] = hum 54 | return action 55 | 56 | def read(self,mac): 57 | result={} 58 | try: 59 | conn = Connector(mac) 60 | conn.connect() 61 | if not conn.isconnected: 62 | conn.connect() 63 | if not conn.isconnected: 64 | return 65 | Firm = bytearray(conn.readCharacteristic('0x24')) 66 | batt = bytearray(conn.readCharacteristic('0x18')) 67 | battery = batt[0] 68 | firmware = "".join(map(chr, Firm)) 69 | notification = Notification(conn,XiaomiHT) 70 | conn.writeCharacteristic('0x10','0100',response=True) 71 | notification.subscribe(2) 72 | result['battery'] = battery 73 | result['firmware'] = firmware 74 | result['id'] = mac 75 | logging.debug('XIAOMIHT------'+str(result)) 76 | return result 77 | except Exception as e: 78 | logging.error(str(e)) 79 | return result 80 | 81 | def handlenotification(self,conn,handle,data,action={}): 82 | result={} 83 | if hex(handle) == '0xe': 84 | received = bytearray(data) 85 | temp,hum = "".join(map(chr, received)).replace("T=", "").replace("H=", "").rstrip(' \t\r\n\0').split(" ") 86 | result['moisture'] = hum 87 | result['temperature'] = temp 88 | result['id'] = conn.mac 89 | result['source'] = globals.daemonname 90 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 91 | 92 | globals.COMPATIBILITY.append(Lywsd02) 93 | -------------------------------------------------------------------------------- /resources/blead/devices/lywsd03.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | import struct 7 | from multiconnect import Connector 8 | from notification import Notification 9 | 10 | class Lywsd03(): 11 | def __init__(self): 12 | self.name = 'lywsd03' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower() in [self.name]: 17 | return True 18 | if data.lower().startswith("95fe") and (mac.lower().startswith("a4:c1:38")): 19 | #broadcasted advertising data 20 | return True 21 | 22 | def parse(self,data,mac,name,manuf): 23 | action={} 24 | action['present'] = 1 25 | return action 26 | 27 | def read(self,mac): 28 | result={} 29 | try: 30 | conn = Connector(mac) 31 | conn.connect() 32 | if not conn.isconnected: 33 | conn.connect() 34 | if not conn.isconnected: 35 | return 36 | batt = bytearray(conn.readCharacteristic('0x3a')) 37 | battery = batt[0] 38 | conn.writeCharacteristic('0x38','0100',response=True) 39 | conn.writeCharacteristic('0x46','f40100',response=True) 40 | notification = Notification(conn,Lywsd03) 41 | notification.subscribe(10) 42 | result['battery'] = battery 43 | result['id'] = mac 44 | logging.debug('LYWSD03------'+str(result)) 45 | return result 46 | except Exception as e: 47 | logging.error(str(e)) 48 | return result 49 | 50 | def handlenotification(self,conn,handle,data,action={}): 51 | result={} 52 | if hex(handle) == '0x36': 53 | received = bytearray(data) 54 | temperature = float(received[1] * 256 + received[0]) / 100 55 | moisture = received[2] 56 | result['moisture'] = moisture 57 | result['temperature'] = temperature 58 | result['id'] = conn.mac 59 | result['source'] = globals.daemonname 60 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 61 | 62 | globals.COMPATIBILITY.append(Lywsd03) -------------------------------------------------------------------------------- /resources/blead/devices/lywsd03.py_beta: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | import struct 7 | from multiconnect import Connector 8 | from notification import Notification 9 | 10 | class Lywsd03(): 11 | def __init__(self): 12 | self.name = 'lywsd03' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower() in [self.name]: 17 | return True 18 | if data.lower().startswith("95fe") and (mac.lower().startswith("a4:c1:38")): 19 | #broadcasted advertising data 20 | return True 21 | 22 | def parse(self,data,mac,name,manuf): 23 | action={} 24 | action['present'] = 1 25 | if data.lower().startswith("95fe"): 26 | ##todo parse data 27 | logging.debug('Lywsd03 PARSE data: ' + data ) 28 | val_type = data[28:30].lower() 29 | val_len = data[32:34] 30 | val_data = data[34:42] 31 | if val_type in ['04']: # type: temperature 32 | t_data = val_data[2:4] + val_data[0:2] 33 | temp = int(t_data,16)/10.0 34 | logging.debug('Lywsd03------ Advertising Data=> Temp' + str(temp)) 35 | action['temperature'] = temp 36 | elif val_type in ['06']: # type: moisture 37 | h_data = val_data[2:4] + val_data[0:2] 38 | hum = int(h_data,16)/10.0 39 | logging.debug('Lywsd03------ Advertising Data=> Moist: ' + str(hum)) 40 | action['moisture'] = hum 41 | elif val_type in ['0a']: # type: battery 42 | b_data = val_data[0:2] 43 | batt = int(b_data,16) 44 | logging.debug('Lywsd03------ Advertising Data=> Batt: ' + str(batt)) 45 | action['battery'] = batt 46 | elif val_type in ['0d']: # type: temp&moist 47 | t_data = val_data[2:4] + val_data[0:2] 48 | temp = int(t_data,16)/10.0 49 | h_data = val_data[6:8] + val_data[4:6] 50 | hum = int(h_data,16)/10.0 51 | logging.debug('Lywsd03------ Advertising Data=> Temp: ' + str(temp) + ' Moist: ' + str(hum)) 52 | action['temperature'] = temp 53 | action['moisture'] = hum 54 | return action 55 | 56 | def read(self,mac): 57 | result={} 58 | try: 59 | conn = Connector(mac) 60 | conn.connect() 61 | if not conn.isconnected: 62 | conn.connect() 63 | if not conn.isconnected: 64 | return 65 | batt = bytearray(conn.readCharacteristic('0x3a')) 66 | battery = batt[0] 67 | notification = Notification(conn,Lywsd03) 68 | notification.subscribe(10) 69 | result['battery'] = battery 70 | result['id'] = mac 71 | logging.debug('LYWSD03------'+str(result)) 72 | return result 73 | except Exception as e: 74 | logging.error(str(e)) 75 | return result 76 | 77 | def handlenotification(self,conn,handle,data,action={}): 78 | result={} 79 | if hex(handle) == '0x36': 80 | received = bytearray(data) 81 | temperature = float(received[1] * 256 + received[0]) / 100 82 | moisture = received[2] 83 | result['moisture'] = moisture 84 | result['temperature'] = temperature 85 | result['id'] = conn.mac 86 | result['source'] = globals.daemonname 87 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 88 | 89 | globals.COMPATIBILITY.append(Lywsd03) 90 | -------------------------------------------------------------------------------- /resources/blead/devices/meyerdom2analog.py: -------------------------------------------------------------------------------- 1 | import time 2 | import logging 3 | import globals 4 | 5 | class Meyerdom2Analog(): 6 | def __init__(self): 7 | self.name = 'meyerdom2analog' 8 | self.ignoreRepeat = False 9 | 10 | def isvalid(self,name,manuf='',data='',mac=''): 11 | if 'meyerdom 2 contacteurs analog' in name.lower() or name.lower()==self.name: 12 | return True 13 | 14 | def parse(self,data,mac,name,manuf): 15 | action={} 16 | action['present'] = 1 17 | try: 18 | action['analog1'] = int(bytearray.fromhex(manuf[8:16]).decode()) 19 | action['analog2'] = int(bytearray.fromhex( manuf[16:24]).decode()) 20 | action['voltage'] = float(bytearray.fromhex(manuf[24:]).decode()) 21 | except Exception as e: 22 | logging.error(str(e)) 23 | logging.debug(str(action)) 24 | return action 25 | globals.COMPATIBILITY.append(Meyerdom2Analog) 26 | -------------------------------------------------------------------------------- /resources/blead/devices/meyerdom4contacts.py: -------------------------------------------------------------------------------- 1 | import time 2 | import logging 3 | import globals 4 | 5 | class Meyerdom4contacts(): 6 | def __init__(self): 7 | self.name = 'meyerdom4contacts' 8 | self.ignoreRepeat = False 9 | 10 | def isvalid(self,name,manuf='',data='',mac=''): 11 | if 'meyerdom 4 contacteurs' in name.lower() or name.lower()==self.name: 12 | return True 13 | 14 | def parse(self,data,mac,name,manuf): 15 | action={} 16 | action['present'] = 1 17 | try: 18 | action['contact1'] = 0 19 | action['contact2'] = 0 20 | action['contact3'] = 0 21 | action['contact4'] = 0 22 | if manuf[0:2] == '31': 23 | action['contact1'] = 1 24 | if manuf[2:4] == '31': 25 | action['contact2'] = 1 26 | if manuf[4:6] == '31': 27 | action['contact3'] = 1 28 | if manuf[6:8] == '31': 29 | action['contact4'] = 1 30 | action['voltage'] = float(bytearray.fromhex(manuf[24:]).decode()) 31 | except Exception as e: 32 | logging.error(str(e)) 33 | logging.debug(str(action)) 34 | return action 35 | globals.COMPATIBILITY.append(Meyerdom4contacts) 36 | -------------------------------------------------------------------------------- /resources/blead/devices/meyerdomcontactvocal.py: -------------------------------------------------------------------------------- 1 | import time 2 | import logging 3 | import globals 4 | 5 | class MeyerdomContactVocal(): 6 | def __init__(self): 7 | self.name = 'meyerdomcontactvocal' 8 | self.ignoreRepeat = False 9 | 10 | def isvalid(self,name,manuf='',data='',mac=''): 11 | if 'meyerdom contacteur vocal' in name.lower() or name.lower()==self.name: 12 | return True 13 | 14 | def parse(self,data,mac,name,manuf): 15 | action={} 16 | action['present'] = 1 17 | try: 18 | action['contact1'] = 0 19 | if manuf[0:2] == '31': 20 | action['contact1'] = 1 21 | action['voltage'] = float(bytearray.fromhex(manuf[24:]).decode()) 22 | except Exception as e: 23 | logging.error(str(e)) 24 | logging.debug(str(action)) 25 | return action 26 | globals.COMPATIBILITY.append(MeyerdomContactVocal) 27 | -------------------------------------------------------------------------------- /resources/blead/devices/miband3.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | 7 | class Miband3(): 8 | def __init__(self): 9 | self.name = 'miband3' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() in ['mi band 3',self.name]: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | return action 20 | 21 | globals.COMPATIBILITY.append(Miband3) 22 | -------------------------------------------------------------------------------- /resources/blead/devices/miband4.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | 7 | class Miband4(): 8 | def __init__(self): 9 | self.name = 'miband4' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() in ['mi smart band 4',self.name]: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | return action 20 | 21 | globals.COMPATIBILITY.append(Miband4) 22 | -------------------------------------------------------------------------------- /resources/blead/devices/myfox.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Myfox(): 7 | def __init__(self): 8 | self.name = 'myfox' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | if name.lower().find("myfox") != -1: 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | return action 21 | 22 | globals.COMPATIBILITY.append(Myfox) -------------------------------------------------------------------------------- /resources/blead/devices/niu.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Niu(): 7 | def __init__(self): 8 | self.name = 'niu' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | 15 | def parse(self,data,mac,name,manuf): 16 | action={} 17 | logging.debug('Parsing data ' + data) 18 | buttontrame = data[34:36] 19 | batterytrame = data[28:30] 20 | colortrame = data[24:28] 21 | battery = str(int(batterytrame,16)) 22 | if colortrame == '0001': 23 | color = 'No color' 24 | elif colortrame == '0002': 25 | color = 'White' 26 | elif colortrame == '0003': 27 | color = 'TechBlue' 28 | elif colortrame == '0004': 29 | color = 'CozyGrey' 30 | elif colortrame == '0005': 31 | color = 'Wazabi' 32 | elif colortrame == '0006': 33 | color = 'Lagoon' 34 | elif colortrame == '0007': 35 | color = 'Softberry' 36 | else: 37 | color = 'No color' 38 | if buttontrame == '01': 39 | button = 'simple appui' 40 | elif buttontrame == '02': 41 | button = 'double appui' 42 | elif buttontrame == '03': 43 | button = 'appui long' 44 | elif buttontrame == '04': 45 | button = 'relachement' 46 | elif buttontrame == '05': 47 | buttontrame = '05' 48 | button = 'triple appui' 49 | elif buttontrame == '06': 50 | buttontrame = '06' 51 | button = 'quadruple appui' 52 | elif buttontrame == '07': 53 | buttontrame = '07' 54 | button = 'quintuple appui' 55 | else: 56 | button = '' 57 | action['color'] = color 58 | action['battery'] = battery 59 | action['button'] = button 60 | action['buttonid'] = buttontrame[1:2] 61 | return action 62 | 63 | globals.COMPATIBILITY.append(Niu) -------------------------------------------------------------------------------- /resources/blead/devices/noke.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | from notification import Notification 7 | 8 | class Noke(): 9 | def __init__(self): 10 | self.name = 'noke' 11 | self.ignoreRepeat = False 12 | 13 | def isvalid(self,name,manuf='',data='',mac=''): 14 | if 'noke' in name.lower(): 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | return action 21 | 22 | globals.COMPATIBILITY.append(Noke) 23 | -------------------------------------------------------------------------------- /resources/blead/devices/nut.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | 7 | BATTERY_CHARACTERISTIC_UUID=btle.UUID("00002a19-0000-1000-8000-00805f9b34fb") 8 | 9 | class Nut(): 10 | def __init__(self): 11 | self.name = 'nut' 12 | self.ignoreRepeat = False 13 | 14 | def isvalid(self,name,manuf='',data='',mac=''): 15 | if name.lower() == self.name: 16 | return True 17 | 18 | def parse(self,data,mac,name,manuf): 19 | action={} 20 | action['present'] = 1 21 | return action 22 | 23 | def findCharacteristics(self,mac,conn=''): 24 | logging.debug("Searching characteristics") 25 | if conn == '': 26 | conn = Connector(mac) 27 | conn.connect(type='random') 28 | if not conn.isconnected: 29 | return 30 | value='' 31 | characteristics=[] 32 | try: 33 | characteristics = conn.conn.getCharacteristics(0x0001) 34 | except Exception as e: 35 | logging.debug(str(e)) 36 | try: 37 | characteristics = conn.conn.getCharacteristics(0x0001) 38 | except Exception as e: 39 | logging.debug(str(e)) 40 | try: 41 | characteristics = conn.conn.getCharacteristics(0x0001) 42 | except Exception as e: 43 | logging.debug(str(e)) 44 | conn.disconnect() 45 | battery_characteristic = next(iter(filter(lambda el: el.uuid == BATTERY_CHARACTERISTIC_UUID, characteristics))) 46 | logging.debug('Found ' + hex(battery_characteristic.getHandle())) 47 | return [hex(battery_characteristic.getHandle())] 48 | 49 | def read(self,mac,connection=''): 50 | result={} 51 | chars=[] 52 | try: 53 | if mac in globals.KEEPED_CONNECTION: 54 | logging.debug('Already a connection for ' + mac + ' use it') 55 | conn = globals.KEEPED_CONNECTION[mac] 56 | else: 57 | if connection != '': 58 | conn = connection 59 | else: 60 | logging.debug('Creating a new connection for ' + mac) 61 | conn = Connector(mac) 62 | conn.connect(type='random') 63 | if not conn.isconnected: 64 | return 65 | if (mac in globals.KNOWN_DEVICES): 66 | if ('specificconfiguration' in globals.KNOWN_DEVICES[mac] and len(globals.KNOWN_DEVICES[mac]['specificconfiguration'])>0): 67 | logging.debug('Already known handles ' + str(globals.KNOWN_DEVICES[mac]['specificconfiguration'])) 68 | chars = [globals.KNOWN_DEVICES[mac]['specificconfiguration']['batteryhandle']] 69 | if chars == []: 70 | logging.debug('Not known handles searching') 71 | chars = self.findCharacteristics(mac,conn) 72 | globals.JEEDOM_COM.add_changes('devices::'+mac,{"id" : mac,"specificconfiguration" : {"batteryhandle" : chars[0]}}) 73 | char = chars[0] 74 | batteryDatas = bytearray(conn.readCharacteristic(char,type='random')) 75 | logging.debug(str(batteryDatas)) 76 | result['battery'] = batteryDatas[0] 77 | result['id'] = mac 78 | logging.debug(str(result)) 79 | return result 80 | except Exception as e: 81 | logging.error(str(e)) 82 | conn.disconnect() 83 | conn.disconnect() 84 | return result 85 | 86 | def action(self,message): 87 | mac = message['device']['id'] 88 | handle = message['command']['handle'] 89 | value = message['command']['value'] 90 | conn = Connector(mac) 91 | conn.connect(type='random') 92 | if not conn.isconnected: 93 | conn.connect(type='random') 94 | if not conn.isconnected: 95 | return 96 | conn.writeCharacteristic(handle,value,type='random') 97 | conn.disconnect() 98 | return 99 | 100 | globals.COMPATIBILITY.append(Nut) -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/__init__.py -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/fonts/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/fonts/font.ttf -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/fonts/font1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/fonts/font1.ttf -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/fonts/font2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/fonts/font2.ttf -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/fonts/font3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/fonts/font3.ttf -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/fonts/font4.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/fonts/font4.ttf -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/images/black.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/images/black.bmp -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/images/noir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/pixoo/images/noir.png -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/messages.py: -------------------------------------------------------------------------------- 1 | """ Provides Message class to construct messages for the TimeBox """ 2 | import logging 3 | class TimeBoxMessages: 4 | """Support the formation of messages to communicatie with the TimeBox.""" 5 | 6 | def checksum(self, payload): 7 | """Compute the payload checksum. Returned as list with LSM, MSB""" 8 | logging.debug('Calculate checksum') 9 | 10 | csum = sum(payload) 11 | lsb = csum & 0b11111111 12 | msb = csum >> 8 13 | return [lsb, msb] 14 | 15 | def _extend_with_checksum(self, payload): 16 | """Extend the payload with two byte with its checksum.""" 17 | logging.debug('Extend with checksum') 18 | return payload + self.checksum(payload) 19 | 20 | def make_message(self, payload): 21 | """Make a complete message from the paload data. Add leading 0x01 and 22 | trailing check sum and 0x02 and escape the payload""" 23 | cs_payload = self._extend_with_checksum(payload) 24 | logging.debug('Message built') 25 | return [0x01] + cs_payload + [0x02] 26 | -------------------------------------------------------------------------------- /resources/blead/devices/pixoo/timeboximage.py: -------------------------------------------------------------------------------- 1 | """Module defines the TimeBoxImage class. """ 2 | 3 | 4 | class TimeBoxImage: 5 | """ An image to be display on the TimeBox """ 6 | width = 16 7 | height = 16 8 | image = 0 9 | 10 | def __init__(self, height=16, width=16): 11 | self.height = height 12 | self.width = width 13 | self.image = \ 14 | [[[0 for c in range(3)] for x in range(self.width)] for y in range(self.height)] 15 | 16 | def get_pixel_data(self, xix, yix, cix): 17 | """ return value of pixel (xix, yix) nd color c (0..2) """ 18 | return self.image[yix][xix][cix] 19 | 20 | def put_pixel(self, xix, yix, rval, gval, bval): 21 | """Set a pixel in the image.""" 22 | self.image[yix][xix][0] = rval 23 | self.image[yix][xix][1] = gval 24 | self.image[yix][xix][2] = bval 25 | -------------------------------------------------------------------------------- /resources/blead/devices/ropot.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | import struct 6 | from multiconnect import Connector 7 | from notification import Notification 8 | 9 | class Ropot(): 10 | def __init__(self): 11 | self.name = 'ropot' 12 | self.ignoreRepeat = False 13 | 14 | def isvalid(self,name,manuf='',data='',mac=''): 15 | validname = [self.name] 16 | if name in validname: 17 | return True 18 | def parse(self,data,mac,name,manuf): 19 | action={} 20 | action['present'] = 1 21 | return action 22 | 23 | def read(self,mac): 24 | result={} 25 | try: 26 | conn = Connector(mac) 27 | conn.connect() 28 | if not conn.isconnected: 29 | conn.connect() 30 | if not conn.isconnected: 31 | return 32 | batteryFirm = bytearray(conn.readCharacteristic('0x38')) 33 | conn.writeCharacteristic('0x33','a01f',response=True) 34 | battery = batteryFirm[0] 35 | firmware = "".join(map(chr, batteryFirm[2:])) 36 | notification = Notification(conn,Ropot) 37 | conn.writeCharacteristic('0x36','0100',response=True) 38 | notification.subscribe(2) 39 | result['battery'] = battery 40 | result['firmware'] = firmware 41 | result['id'] = mac 42 | logging.debug(str(result)) 43 | return result 44 | except Exception as e: 45 | logging.error(str(e)) 46 | return result 47 | 48 | def handlenotification(self,conn,handle,data,action={}): 49 | result={} 50 | if hex(handle) == '0x35': 51 | received = bytearray(data) 52 | temperature = float(received[1] * 256 + received[0]) / 10 53 | sunlight = received[4] * 256 + received[3] 54 | moisture = received[7] 55 | fertility = received[9] * 256 + received[8] 56 | result['sunlight'] = sunlight 57 | result['moisture'] = moisture 58 | result['fertility'] = fertility 59 | result['temperature'] = temperature 60 | result['id'] = conn.mac 61 | result['source'] = globals.daemonname 62 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 63 | 64 | globals.COMPATIBILITY.append(Ropot) -------------------------------------------------------------------------------- /resources/blead/devices/ruuvi.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | import struct 6 | import base64 7 | import math 8 | import utils 9 | from multiconnect import Connector 10 | from notification import Notification 11 | 12 | class Ruuvi(): 13 | def __init__(self): 14 | self.name = 'ruuvi' 15 | self.ignoreRepeat = False 16 | 17 | def isvalid(self,name,manuf='',data='',mac=''): 18 | if data[0:4] == 'aafe' or manuf[0:4] in ['9904'] or name.lower() == self.name: 19 | return True 20 | 21 | def parse(self,data,mac,name,manuf): 22 | action={} 23 | action['present'] = 1 24 | if data and data[0:4] == 'aafe': 25 | toanalyze ='' 26 | base16_split = [data[i:i + 2] for i in range(0, len(data), 2)] 27 | selected_hexs = filter(lambda x: int(x, 16) < 128, base16_split) 28 | characters = [chr(int(c, 16)) for c in selected_hexs] 29 | joined = ''.join(characters) 30 | index = joined.find('ruu.vi/#') 31 | if index > -1: 32 | toanalyze = joined[(index + 8):] 33 | else: 34 | index = joined.find('r/') 35 | if index > -1: 36 | toanalyze = joined[(index + 2):] 37 | if toanalyze != '': 38 | toanalyze=toanalyze[:8] 39 | decoded = bytearray(base64.b64decode(toanalyze, '-_')) 40 | temp = (decoded[2] & 127) + decoded[3] / 100.00 41 | sign = (decoded[2] >> 7) & 1 42 | if sign == 0: 43 | temp = round(temp, 2) 44 | else: 45 | temp = round(-1 * temp, 2) 46 | humidity = decoded[1] * 0.5 47 | pres = (((decoded[4] << 8) + decoded[5]) + 50000) /100.00 48 | action['temperature'] = temp 49 | action['humidity'] = humidity 50 | action['pression'] = pres 51 | elif manuf and "990403" in manuf : 52 | payload_start = manuf.index("990403") + 4 53 | string = manuf[payload_start:] 54 | analyze = bytearray.fromhex(string) 55 | temp = (analyze[2] & ~(1 << 7)) + (analyze[3] / 100.00) 56 | sign = (analyze[2] >> 7) & 1 57 | if sign == 0: 58 | temp = round(temp, 2) 59 | else: 60 | temp = round(-1 * temp, 2) 61 | humidity = analyze[1] * 0.5 62 | pres = ((analyze[4] << 8) + analyze[5] + 50000)/100.00 63 | accx = utils.twos_complement((analyze[6] << 8) + analyze[7], 16)/1000.00 64 | accy = utils.twos_complement((analyze[8] << 8) + analyze[9], 16)/1000.00 65 | accz = utils.twos_complement((analyze[10] << 8) + analyze[11], 16)/1000.00 66 | battery = ((analyze[12] << 8) + analyze[13])/1000.00 67 | action['temperature'] = temp 68 | action['humidity'] = humidity 69 | action['pression'] = pres 70 | action['accx'] = accx 71 | action['accy'] = accy 72 | action['accz'] = accz 73 | action['acceleration'] = round(math.sqrt(accx * accx + accy * accy + accz * accz),2) 74 | action['battery'] = battery 75 | elif manuf and "990405" in manuf : 76 | payload_start = manuf.index("990405") + 4 77 | string = manuf[payload_start:] 78 | analyze = bytearray.fromhex(string) 79 | if analyze[1:2] == 0x7FFF: 80 | temp = None 81 | else : 82 | temperature = utils.twos_complement((analyze[1] << 8) + analyze[2], 16) / 200 83 | temp = round(temperature,2) 84 | if analyze[3:4] == 0xFFFF: 85 | humidity = None 86 | else: 87 | humidity = round(((analyze[3] & 0xFF) << 8 | analyze[4] & 0xFF) / 400,2) 88 | if analyze[5:6] == 0xFFFF: 89 | pres = None 90 | else : 91 | pressure = ((data[5] & 0xFF) << 8 | data[6] & 0xFF) + 50000 92 | pres = round((pressure / 100), 2) 93 | return action 94 | 95 | 96 | globals.COMPATIBILITY.append(Ruuvi) -------------------------------------------------------------------------------- /resources/blead/devices/smartplug.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | import binascii 6 | from multiconnect import Connector 7 | from notification import Notification 8 | import struct 9 | 10 | class Smartplug(): 11 | def __init__(self): 12 | self.name = 'smartplug' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower().startswith("smp-b16-") or name.lower() == self.name: 17 | return True 18 | 19 | def parse(self,data,mac,name,manuf): 20 | action={} 21 | action['present'] = 1 22 | return action 23 | 24 | def connect(self,mac): 25 | logging.debug('Connecting : '+str(mac) + ' with bluetooth ' + str(globals.IFACE_DEVICE)) 26 | i=0 27 | while True: 28 | i = i + 1 29 | try: 30 | conn = btle.Peripheral(mac,iface=globals.IFACE_DEVICE) 31 | break 32 | except Exception as e: 33 | logging.error(str(e)) 34 | if i >= 4 : 35 | return 36 | return conn 37 | 38 | def action(self,message): 39 | mac = message['device']['id'] 40 | handle = message['command']['handle'] 41 | value = message['command']['value'] 42 | if mac in globals.KEEPED_CONNECTION: 43 | logging.debug('Already a connection for ' + mac + ' use it') 44 | conn = globals.KEEPED_CONNECTION[mac] 45 | else: 46 | logging.debug('Creating a new connection for ' + mac) 47 | conn = Connector(mac) 48 | globals.KEEPED_CONNECTION[mac]=conn 49 | conn.connect() 50 | if not conn.isconnected: 51 | conn.connect() 52 | if not conn.isconnected: 53 | return 54 | conn.writeCharacteristic(handle,value) 55 | logging.debug('Value ' + value + ' written in handle ' +handle) 56 | logging.debug('Refreshing ... ') 57 | result = self.read(mac) 58 | return result 59 | 60 | def read(self,mac): 61 | global result 62 | result={} 63 | try: 64 | if mac in globals.KEEPED_CONNECTION: 65 | logging.debug('Already a connection for ' + mac + ' use it') 66 | conn = globals.KEEPED_CONNECTION[mac] 67 | else: 68 | logging.debug('Creating a new connection for ' + mac) 69 | conn = Connector(mac) 70 | globals.KEEPED_CONNECTION[mac]=conn 71 | conn.connect() 72 | if not conn.isconnected: 73 | conn.connect() 74 | if not conn.isconnected: 75 | return 76 | notification = Notification(conn,Smartplug) 77 | conn.writeCharacteristic('0x2b','0f050400000005ffff') 78 | notification.subscribe(2) 79 | return 80 | except Exception as e: 81 | try: 82 | conn.disconnect() 83 | except Exception as e: 84 | pass 85 | logging.error(str(e)) 86 | return 87 | 88 | def handlenotification(self,conn,handle,data,action={}): 89 | state = False 90 | result = {} 91 | bytes_data = bytearray(data) 92 | if bytes_data[0:3] == bytearray([0x0f, 0x0f, 0x04]): 93 | state = bytes_data[4] == 1 94 | power = int(binascii.hexlify(bytes_data[6:10]), 16) / 1000 95 | result['power'] = power 96 | if state: 97 | result['status'] = 1 98 | else: 99 | result['status'] = 0 100 | result['id'] = conn.mac 101 | result['source'] = globals.daemonname 102 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 103 | 104 | globals.COMPATIBILITY.append(Smartplug) -------------------------------------------------------------------------------- /resources/blead/devices/tb05.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | import binascii 6 | from multiconnect import Connector 7 | 8 | class Tb05(): 9 | def __init__(self): 10 | self.name = 'tb05' 11 | self.ignoreRepeat = True 12 | 13 | def isvalid(self,name,manuf='',data='',mac=''): 14 | if name.lower() in [self.name,'bt05']: 15 | return True 16 | 17 | def parse(self,data,mac,name,manuf): 18 | action={} 19 | action['present'] = 1 20 | return action 21 | 22 | def action(self,message): 23 | mac = message['device']['id'] 24 | handle = message['command']['handle'] 25 | value = message['command']['value'] 26 | repeat=0 27 | if 'repeat' in message['command']: 28 | repeat = int(message['command']['repeat']) 29 | if mac in globals.KEEPED_CONNECTION: 30 | logging.debug('Already a connection for ' + mac + ' use it') 31 | conn = globals.KEEPED_CONNECTION[mac] 32 | else: 33 | logging.debug('Creating a new connection for ' + mac) 34 | conn = Connector(mac) 35 | globals.KEEPED_CONNECTION[mac]=conn 36 | conn.connect() 37 | if not conn.isconnected: 38 | conn.connect() 39 | if not conn.isconnected: 40 | return 41 | if repeat != 0: 42 | conn.writeCharacteristic('0x25','010000000000000000000d0a') 43 | time.sleep(2) 44 | for x in range(repeat): 45 | conn.writeCharacteristic(handle,value) 46 | time.sleep(0.4) 47 | else: 48 | conn.writeCharacteristic(handle,value) 49 | conn.disconnect() 50 | return 51 | 52 | globals.COMPATIBILITY.append(Tb05) -------------------------------------------------------------------------------- /resources/blead/devices/ticatag.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | from multiconnect import Connector 6 | 7 | class Ticatag(): 8 | def __init__(self): 9 | self.name = 'ticatag' 10 | self.ignoreRepeat = False 11 | 12 | def isvalid(self,name,manuf='',data='',mac=''): 13 | if name.lower() == self.name: 14 | return True 15 | 16 | def parse(self,data,mac,name,manuf): 17 | action={} 18 | action['present'] = 1 19 | if globals.SCAN_MODE == 'active': 20 | temperaturetrame = data[32:34] 21 | temperature = str(int(temperaturetrame,16)) 22 | action['temperature'] = temperature 23 | batterytrame = data[28:30] 24 | battery = str(int(batterytrame,16)) 25 | action['battery'] = battery 26 | buttontrame = data[35:36] 27 | if buttontrame == '1': 28 | button = 'simple appui' 29 | elif buttontrame == '2': 30 | button = 'double appui' 31 | elif buttontrame == '3': 32 | button = 'appui long' 33 | elif buttontrame == '0': 34 | button = 'relachement' 35 | else: 36 | button = '' 37 | action['button'] = button 38 | action['buttonid'] = buttontrame 39 | return action 40 | 41 | def action(self,message): 42 | mac = message['device']['id'] 43 | handle = message['command']['handle'] 44 | value = message['command']['value'] 45 | conn = Connector(mac) 46 | conn.connect() 47 | if not conn.isconnected: 48 | return 49 | conn.writeCharacteristic(handle,value) 50 | conn.disconnect() 51 | return 52 | 53 | globals.COMPATIBILITY.append(Ticatag) 54 | -------------------------------------------------------------------------------- /resources/blead/devices/tile.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Tile(): 7 | def __init__(self): 8 | self.name = 'tile' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | 15 | def parse(self,data,mac,name,manuf): 16 | action={} 17 | action['present'] = 1 18 | return action 19 | 20 | globals.COMPATIBILITY.append(Tile) 21 | -------------------------------------------------------------------------------- /resources/blead/devices/timebox/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/__init__.py -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/11x7 Matrix.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/11x7 Matrix.bmp -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/11x7 Matrix.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/11x7 Matrix.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/5 9x9 Strict Sans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/5 9x9 Strict Sans.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/Electronic scale.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/Electronic scale.bmp -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/Electronic scale.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/Electronic scale.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/LED SCREEN GTAMBLOG CAPS+ 2.0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/LED SCREEN GTAMBLOG CAPS+ 2.0.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/Translux Slim 11x96.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/Translux Slim 11x96.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/default.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/default.bmp -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/slkscr.pbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/slkscr.pbm -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/slkscr.pil: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/slkscr.pil -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/slkscr.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/slkscr.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/tallround.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/tallround.bmp -------------------------------------------------------------------------------- /resources/blead/devices/timebox/fonts/tallround.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/fonts/tallround.ttf -------------------------------------------------------------------------------- /resources/blead/devices/timebox/images/black.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/devices/timebox/images/black.bmp -------------------------------------------------------------------------------- /resources/blead/devices/timebox/timeboximage.py: -------------------------------------------------------------------------------- 1 | """Module defines the TimeBoxImage class. """ 2 | 3 | 4 | class TimeBoxImage: 5 | """ An image to be display on the TimeBox """ 6 | width = 11 7 | height = 11 8 | image = 0 9 | 10 | gamma_value = None 11 | gamma_table = None 12 | 13 | def __init__(self, height=11, width=11): 14 | self.height = height 15 | self.width = width 16 | self.image = \ 17 | [[[0 for c in range(3)] for x in range(self.width)] for y in range(self.height)] 18 | 19 | def _gamma_correction(self, k): 20 | """ Determine the pixel value for pixel with brightness k, 0<=k<256, considering gamma.""" 21 | 22 | return int(256.0*pow((k/256.0), 1.0 / self.gamma_value)) >> 4 23 | 24 | def set_gamma(self, new_gamma): 25 | """ Change the gamma value. Reocomputa the table.""" 26 | if self.gamma_value != new_gamma: 27 | self.gamma_value = new_gamma 28 | self.gamma_table = dict() 29 | for k in range(256): 30 | self.gamma_table[k] = self._gamma_correction(k) 31 | 32 | def get_pixel_data(self, xix, yix, cix): 33 | """ return value of pixel (xix, yix) nd color c (0..2) """ 34 | return self.image[yix][xix][cix] 35 | 36 | def put_pixel(self, xix, yix, rval, gval, bval): 37 | """Set a pixel in the image.""" 38 | self.image[yix][xix][0] = rval 39 | self.image[yix][xix][1] = gval 40 | self.image[yix][xix][2] = bval 41 | 42 | def put_pixel_gamma(self, xix, yix, rval, gval, bval): 43 | """Set a pixel in the image, applying gamma correction. 44 | Values between 0 and 255.""" 45 | self.image[yix][xix][0] = self.gamma_table[rval] 46 | self.image[yix][xix][1] = self.gamma_table[gval] 47 | self.image[yix][xix][2] = self.gamma_table[bval] 48 | -------------------------------------------------------------------------------- /resources/blead/devices/wistiki.py: -------------------------------------------------------------------------------- 1 | from bluepy.btle import Scanner, DefaultDelegate 2 | import time 3 | import logging 4 | import globals 5 | 6 | class Wistiki(): 7 | def __init__(self): 8 | self.name = 'wistiki' 9 | self.ignoreRepeat = False 10 | 11 | def isvalid(self,name,manuf='',data='',mac=''): 12 | if name.lower() == self.name: 13 | return True 14 | 15 | def parse(self,data,mac,name,manuf): 16 | action={} 17 | action['present'] = 1 18 | return action 19 | 20 | globals.COMPATIBILITY.append(Wistiki) -------------------------------------------------------------------------------- /resources/blead/devices/xiaomiht.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from bluepy import btle 3 | import time 4 | import logging 5 | import globals 6 | import struct 7 | from multiconnect import Connector 8 | from notification import Notification 9 | 10 | class XiaomiHT(): 11 | def __init__(self): 12 | self.name = 'xiaomiht' 13 | self.ignoreRepeat = False 14 | 15 | def isvalid(self,name,manuf='',data='',mac=''): 16 | if name.lower() in ['mj_ht_v1','cleargrass temp & rh', self.name]: 17 | return True 18 | 19 | def parse(self,data,mac,name,manuf): 20 | action={} 21 | action['present'] = 1 22 | if data.lower().startswith("95fe"): 23 | logging.debug('Xiaomi PARSE data: ' + data ) 24 | val_type = data[26:30].lower() 25 | val_len = data[30:32] 26 | val_data = data[32:40] 27 | if val_type in ['0410']: # type: temperature 28 | t_data = val_data[2:4] + val_data[0:2] 29 | temp = int(t_data,16)/10.0 30 | logging.debug('XiaomiHT------ Advertising Data=> Temp' + str(temp)) 31 | action['temperature'] = temp 32 | elif val_type in ['0610']: # type: moisture 33 | h_data = val_data[2:4] + val_data[0:2] 34 | hum = int(h_data,16)/10.0 35 | logging.debug('XiaomiHT------ Advertising Data=> Moist: ' + str(hum)) 36 | action['moisture'] = hum 37 | elif val_type in ['0a10']: # type: battery 38 | b_data = val_data[0:2] 39 | batt = int(b_data,16) 40 | logging.debug('XiaomiHT------ Advertising Data=> Batt: ' + str(batt)) 41 | action['battery'] = batt 42 | elif val_type in ['0d10']: # type: temp&moist 43 | t_data = val_data[2:4] + val_data[0:2] 44 | temp = int(t_data,16)/10.0 45 | h_data = val_data[6:8] + val_data[4:6] 46 | hum = int(h_data,16)/10.0 47 | logging.debug('XiaomiHT------ Advertising Data=> Temp: ' + str(temp) + ' Moist: ' + str(hum)) 48 | action['temperature'] = temp 49 | action['moisture'] = hum 50 | if data.lower().startswith("cdfd"): 51 | logging.debug('Xiaomi PARSE data: ' + data ) 52 | t_data = data[26:28] + data[24:26] 53 | temp = int(t_data,16)/10.0 54 | h_data = data[30:32] + data[28:30] 55 | hum = int(h_data,16)/10.0 56 | b_data = data[36:38] 57 | batt = int(b_data,16) 58 | logging.debug('XiaomiHT------ Advertising Data=> Temp: ' + str(temp) + ' Moist: ' + str(hum) + ' Batt : ' + str(batt)) 59 | action['temperature'] = temp 60 | action['moisture'] = hum 61 | action['battery'] = batt 62 | return action 63 | 64 | def read(self,mac): 65 | result={} 66 | try: 67 | conn = Connector(mac) 68 | conn.connect() 69 | if not conn.isconnected: 70 | conn.connect() 71 | if not conn.isconnected: 72 | return 73 | if (mac in globals.KNOWN_DEVICES and globals.KNOWN_DEVICES[mac]['model'] == 'xiaomiht/xiaomiht_cleargrass'): 74 | Firm = bytearray(conn.readCharacteristic('0x2a')) 75 | else : 76 | Firm = bytearray(conn.readCharacteristic('0x24')) 77 | batt = bytearray(conn.readCharacteristic('0x18')) 78 | battery = batt[0] 79 | result['battery'] = battery 80 | firmware = "".join(map(chr, Firm)) 81 | result['firmware'] = firmware 82 | notification = Notification(conn,XiaomiHT) 83 | conn.writeCharacteristic('0x10','0100',response=True) 84 | notification.subscribe(2) 85 | result['id'] = mac 86 | logging.debug('XIAOMIHT------'+str(result)) 87 | return result 88 | except Exception as e: 89 | logging.error(str(e)) 90 | return result 91 | 92 | def handlenotification(self,conn,handle,data,action={}): 93 | result={} 94 | if hex(handle) == '0xe': 95 | received = bytearray(data) 96 | temp,hum = "".join(map(chr, received)).replace("T=", "").replace("H=", "").rstrip(' \t\r\n\0').split(" ") 97 | result['moisture'] = hum 98 | result['temperature'] = temp 99 | result['id'] = conn.mac 100 | result['source'] = globals.daemonname 101 | globals.JEEDOM_COM.add_changes('devices::'+conn.mac,result) 102 | 103 | globals.COMPATIBILITY.append(XiaomiHT) 104 | -------------------------------------------------------------------------------- /resources/blead/globals.py: -------------------------------------------------------------------------------- 1 | import time 2 | CURRENT_DIVOOM_TEXT={} 3 | CURRENT_DIVOOM_SCROLL={} 4 | DAEMON_VERSION = '2.9' 5 | BLUEPY_VERSION = '1.0' 6 | SCAN_MODE = 'passive' 7 | JEEDOM_COM = '' 8 | SCAN_INTERVAL = 29 9 | NOSEEN_NUMBER = 4 10 | START_TIME = int(time.time()) 11 | KNOWN_DEVICES = {} 12 | SEEN_DEVICES = {} 13 | LEARN_MODE = False 14 | LEARN_TYPE = '' 15 | READY = False 16 | LEARN_MODE_ALL = 0 17 | LAST_BLUEPY = int(time.time()) 18 | LAST_VIRTUAL = int(time.time()) 19 | LAST_BEAT = int(time.time()) 20 | LEARN_BEGIN = int(time.time()) 21 | LEARN_END = int(time.time()) 22 | LAST_CLEAR = int(time.time()) 23 | COMPATIBILITY = [] 24 | LAST_STATE={} 25 | PRESENT={} 26 | IGNORE=[] 27 | KEEPED_CONNECTION={} 28 | LAST_STORAGE={} 29 | LAST_TIME_READ = {} 30 | IFACE_DEVICE = 0 31 | SCAN_ERRORS = 0 32 | SCANNER = '' 33 | PENDING_ACTION = False 34 | PENDING_TIME = int(time.time()) 35 | log_level = "error" 36 | pidfile = '/tmp/blead.pid' 37 | apikey = '' 38 | callback = '' 39 | cycle = 0.3 40 | daemonname='' 41 | socketport='' 42 | sockethost='' 43 | -------------------------------------------------------------------------------- /resources/blead/jeedom/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeedom/plugin-blea/d1a9049633dd4ff3ed2cadcd896e89fa17355503/resources/blead/jeedom/__init__.py -------------------------------------------------------------------------------- /resources/blead/notification.py: -------------------------------------------------------------------------------- 1 | from bluepy import btle 2 | import time 3 | import logging 4 | import globals 5 | import threading 6 | import struct 7 | 8 | class Notification(): 9 | def __init__(self,conn,classname,action={}): 10 | self.name = 'notification' 11 | self.conn = conn 12 | self.classname = classname 13 | self.action = action 14 | 15 | def subscribe(self,timer=0,disconnect=True): 16 | try: 17 | logging.debug('Subscribing to notification : '+str(self.conn.mac)) 18 | delegate = NotificationDelegate(self.conn,self.classname,self.action) 19 | self.conn.conn.setDelegate(delegate) 20 | logging.debug('Delegated') 21 | threading.Thread( target=self.waiter, args=(timer,disconnect,)).start() 22 | except Exception as e: 23 | logging.debug(str(e)) 24 | self.conn.disconnect(True) 25 | 26 | def waiter(self,timer=0,disconnect=True): 27 | try: 28 | if timer!=0: 29 | logging.debug('Subscribing for ' +str(timer) + 's') 30 | timeout = time.time() + timer 31 | while time.time() /tmp/dependancy_blea_in_progress 3 | echo "Launch install of blea dependancy" 4 | sudo apt-get update 5 | echo 50 > /tmp/dependancy_blea_in_progress 6 | sudo apt-get install -y python3-pip python-dev build-essential python-requests bluetooth libffi-dev libssl-dev 7 | echo 66 > /tmp/dependancy_blea_in_progress 8 | sudo apt-get install -y libglib2.0-dev git 9 | echo 75 > /tmp/dependancy_blea_in_progress 10 | sudo pip3 install pyudev 11 | sudo pip3 install pyserial 12 | sudo pip3 install requests 13 | sudo pip3 install bluepy 14 | echo 80 > /tmp/dependancy_blea_in_progress 15 | sudo pip3 install cryptography 16 | echo 90 > /tmp/dependancy_blea_in_progress 17 | sudo pip3 install pycrypto 18 | echo 95 > /tmp/dependancy_blea_in_progress 19 | cd /tmp 20 | sudo rm -R /tmp/bluepy >/dev/null 2>&1 21 | sudo git clone https://github.com/sarakha63/bluepy.git 22 | cd /tmp/bluepy 23 | sudo python setup.py build 24 | sudo python setup.py install 25 | sudo connmanctl enable bluetooth >/dev/null 2>&1 26 | sudo hciconfig hci0 up >/dev/null 2>&1 27 | sudo hciconfig hci1 up >/dev/null 2>&1 28 | sudo hciconfig hci2 up >/dev/null 2>&1 29 | sudo rm -R /tmp/bluepy 30 | echo 100 > /tmp/dependancy_blea_in_progress 31 | echo "Everything is successfully installed!" 32 | rm /tmp/dependancy_blea_in_progress 33 | -------------------------------------------------------------------------------- /resources/install_apt.sh: -------------------------------------------------------------------------------- 1 | PROGRESS_FILE=/tmp/dependancy_blea_in_progress 2 | if [ ! -z $1 ]; then 3 | PROGRESS_FILE=$1 4 | fi 5 | touch ${PROGRESS_FILE} 6 | echo 0 >${PROGRESS_FILE} 7 | echo "********************************************************" 8 | echo "* Installation des dépendances *" 9 | echo "********************************************************" 10 | sudo apt-get update 11 | echo 20 >${PROGRESS_FILE} 12 | sudo apt-get install -y python3-dev build-essential python3-requests python3-setuptools python3-serial bluetooth libffi-dev libssl-dev libbluetooth-dev libopenjp2-7 libtiff5 libatlas-base-dev rfkill 13 | sudo apt-get install -y python3 bluez python3-pip --reinstall 14 | sudo pip3 install wheel 15 | sudo pip3 install -U setuptools 16 | echo 40 >${PROGRESS_FILE} 17 | sudo apt-get install -y libglib2.0-dev git 18 | echo 50 >${PROGRESS_FILE} 19 | sudo pip3 install pyserial 20 | sudo pip3 install requests 21 | sudo pip3 install pybluez 22 | sudo pip3 install pillow 23 | sudo pip3 install numpy 24 | sudo pip3 install bluepy 25 | echo 60 >${PROGRESS_FILE} 26 | cd /tmp 27 | sudo rm -R /tmp/bluepy >/dev/null 2>&1 28 | sudo git clone https://github.com/IanHarvey/bluepy.git 29 | cd /tmp/bluepy 30 | sudo python3 setup.py build 31 | sudo python3 setup.py install 32 | sudo connmanctl enable bluetooth >/dev/null 2>&1 33 | sudo rfkill unblock 0 >/dev/null 2>&1 34 | sudo rfkill unblock 1 >/dev/null 2>&1 35 | sudo rfkill unblock 2 >/dev/null 2>&1 36 | sudo hciconfig hci0 up >/dev/null 2>&1 37 | sudo hciconfig hci1 up >/dev/null 2>&1 38 | sudo hciconfig hci2 up >/dev/null 2>&1 39 | sudo rm -R /tmp/bluepy 40 | cd /tmp 41 | echo 85 >${PROGRESS_FILE} 42 | sudo apt-get remove -y python3-cryptography 43 | sudo pip3 uninstall -y cryptography 44 | sudo pip3 install cryptography==2.6.1 45 | echo 90 >${PROGRESS_FILE} 46 | sudo pip3 install pycrypto 47 | echo 100 >${PROGRESS_FILE} 48 | echo "********************************************************" 49 | echo "* Installation terminée *" 50 | echo "********************************************************" 51 | rm ${PROGRESS_FILE} 52 | -------------------------------------------------------------------------------- /resources/syncconf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Lancement de la synchronisation des configurations" 4 | echo "Déplacement dans le répertoire de travail" 5 | cd /tmp 6 | echo "Récupération des sources (cette étape peut durer quelques minutes)" 7 | rm -rf /tmp/plugin-blea > /dev/null 2>&1 8 | sudo git clone -b beta --depth=1 https://github.com/jeedom/plugin-blea.git 9 | if [ $? -ne 0 ]; then 10 | echo "Unable to fetch Jeedom Blea git.Please check your internet connexion and github access" 11 | exit 1 12 | fi 13 | BASEDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 14 | if [ -d ${BASEDIR}/../core/config/devices ]; then 15 | echo "Suppression des configurations Jeedom existantes" 16 | sudo rm -rf ${BASEDIR}/../core/config/devices/* 17 | echo "Copie des nouvelles configurations Jeedom" 18 | cd /tmp/plugin-blea/core/config/devices 19 | ls $1 | while read x; do echo $x; done 20 | sudo mv * ${BASEDIR}/../core/config/devices/ 21 | echo "Suppression des configurations Blea python existantes" 22 | sudo rm -rf ${BASEDIR}/../resources/blead/devices/* 23 | echo "Copie des nouvelles configurations Blea Python" 24 | cd /tmp/plugin-blea/resources/blead/devices 25 | ls $1 | while read x; do echo $x; done 26 | sudo mv * ${BASEDIR}/../resources/blead/devices/ 27 | echo "Nettoyage du répertoire de travail" 28 | sudo rm -R /tmp/plugin-blea 29 | sudo chown -R www-data:www-data ${BASEDIR}/../resources/blead/devices/ 30 | sudo chown -R www-data:www-data ${BASEDIR}/../core/config/devices/ 31 | echo "Vos configurations sont maintenant à jour !" 32 | echo "Le démon va se relancer, vous pouvez fermer cette fenêtre" 33 | else 34 | echo 'Veuillez installer les dépendances' 35 | fi 36 | 37 | --------------------------------------------------------------------------------