Coder Social home page Coder Social logo

ilionel / domoticz-mobile-device-detection Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 15 KB

Determine if a device (like a smartphone) is reachable (using Bluetooth or Wifi detection) and sync state with virtual swich

License: GNU General Public License v3.0

Shell 100.00%

domoticz-mobile-device-detection's Introduction

domoticz-mobile-device-detection

Determine if one or many devices (like smartphones) are reachable or not. Check are done using Bluetooth (or Wifi detection) and the state are synced with Domoticz "virtuals switches"

Warrning

Beta version ! This script are done for my home usage. It was only tested on my Raspberry and it's the first release of it. Your are welcome to use it, but with precaution, your are advised !

Script Installation

cd domoticz/scripts
git clone https://github.com/ilionel/domoticz-mobile-device-detection
cd domoticz-mobile-device-detection
sudo chmod +x areDevicesAtHome.sh
sudo chmod +x domoticz-mobile-device-detection.sh

Script Configuration

Personalize devices list :

nano areDevicesAtHome.sh
# List of devices like "devices[myPhone]='BT@Mac;Wifi@IP;DomitoczIDX'"
devices[iPhone]='ab:cd:ef:12:14:56;192.168.1.101;6001'
devices[Samsung]='12:14:56:ab:cd:ef;192.168.1.101;6002'

One line by device. Syntaxe are : 'Bluetooth Mac Address;Device Home Fixed IP;Domitocz switch IDX'

Run as service

Check absolute path to "areDevicesAtHome.sh":

nano domoticz-mobile-device-detection.sh

DAEMON=/home/domoticz/scripts/domoticz-mobile-device-detection/areDevicesAtHome.sh

Add to system services:

# check your path here:
sudo ln -s /home/domoticz/scripts/domoticz-mobile-device-detection/domoticz-mobile-device-detection.sh /etc/init.d/domoticz-mobile-device-detection
# add to startup:
sudo update-rc.d domoticz-mobile-device-detection defaults
sudo systemctl daemon-reload

# check service status
sudo service domoticz-mobile-device-detection status

# to start
sudo service domoticz-mobile-device-detection start

# to stop
sudo service domoticz-mobile-device-detection stop

# if you want to delete from startup:
sudo update-rc.d -f domoticz-mobile-device-detection remove

domoticz-mobile-device-detection's People

Stargazers

Flav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.