Samsung SmartThings Multipurpose Sensor (F-MLT-US-2) [S254]




https://www.youtube.com/watch?v=v7Lrxuk4FL8



* Specs

- Description

Add a little smartness to your things.

Monitor doors and windows.

Monitor temperature and orientation.

Requires a SmartThings Hub or a compatible device with SmartThings Hub functionality.

Monitor your Multipurpose Sensor and other connected devices with the SmartThings app for iPhone or Android.

Receive alerts from SmartThings if your Multipurpose Sensor detects that doors and windows have been opened or left open, or if the temperature changes.

Automate connected devices with SmartThings and set them to turn on or off if your Multipurpose Sensor detects that doors and windows have been opened or left open, or if the temperature changes.


- Specs

Model number: F-MLT-US-2

Power source: Battery

Color: White

Weight: 0.1 lb

Dimensions: 0.57" x 1.35" x 1.9"

Protocol: ZigBee

Battery type: CR-2450 battery



* Contents

1. Add a Things : Multipurpose Sensor 

- If your device doesn't connect, Then press the Connect Button.


2. Devices found and then Save : Multipurpose Sensor 


3. You can see the Multipurpose Sensor Thing


4. Add a Routine to get push notification when open and close

- write the routine name : Door Open


- Change the mode : home


- Additional settings : Automatically perform "Door Open"

 : Select "Something Opens or Closes"


- Advanced Options : Don't automatically do this if I am in one of these modes : none

- On the push notification 


added "Door Open" Routine


5. When the multipurpose sensor is open or close


- Reference

https://www.samsung.com/us/smart-home/smartthings/

https://www.samsung.com/us/smart-home/smartthings/kits/

https://shop.smartthings.com/products/samsung-smartthings-multipurpose-sensor




Posted by RDIoT
|

Samsung SmartThings Hub (STH-ETH-250) [B195]





https://www.youtube.com/watch?v=ERabX0zL7ag


* Specs

- Description

The brain of your smart home.

Connect wirelessly with a wide range of smart devices and make them work together.

Monitor and control connected devices in your home using a single SmartThings app for iPhone or Android.

Receive alerts from connected devices when there’s unexpected activity in your home.

Automate connected devices in your home and set them to turn on or off when doors are opened, as people come and go, and much more.

Manage connected devices in your home with SmartThings Routines for Good Morning, Goodbye, Good Night, and more.

Control connected devices in your home with voice commands using SmartThings and Amazon Alexa or Google Home.

Requires an internet-connected Wi-Fi router with an available ethernet port, plus the free SmartThings app for Android (4.1 or later) or iPhone (iOS 9.0 or later).


- Specs

Model number: STH-ETH-250

Power source: Battery, Wall-Powered

Color: White

Weight: 7.68 oz

Dimensions: 4.2" x 4.9" x 1.3"

Protocol: ZigBee, Z-Wave, Cloud-to-Cloud, LAN

Battery type: 4 AA batteries


* Contents

1. Install SmartThings Hub

- It needs welcome code (6 digit)

- power : AA battery 4ea or AC


2. Connect to SmartThings Hub and SmartThings Classic Mobile App

- add new SmartThings User


- create Samsung Account 


- After login, Confirm your country



- Enter Code for activate your SmartThings secure Code.


- Connect your Hub 


- Setup your location


- Setting up your hub


- Setup success!


- Adjust Battery Settings


- Finished


- Status Check : Hub is Online in menu


- Reference

https://shop.smartthings.com/products/samsung-smartthings-hub


Posted by RDIoT
|

Pi4J + Amazon S3 REST API + Amazon Athena [P019]






https://www.youtube.com/watch?v=G-Ot7oh4_jk


GitHub : https://github.com/rdiot/rdiot-p019.git


* Parts

- Raspberry Pi2

Temperature and humidity DHT11 sensor module (KY-015) [S008]



* Contents

- Connect 

S - Signal GPIO3

middle - VCC

- - GND


1. Getting sensor value by Pi4J (Java I/O library for the Raspberry Pi) and then upload to amazon s3.

 : Run the java application

$ java -Dpi4j.linking=dynamic -jar pi4j_s3rest-0.0.1-SNAPSHOT.jar


2. Check the upload status in the amazon console. (s3)




3. Setup Amazon Athena .

- add database : pisensor

- add table : temperature


- DDL (add table)

CREATE EXTERNAL TABLE IF NOT EXISTS piSensor.temperature (

  `name` string,

  `value` float 

)

ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'

WITH SERDEPROPERTIES (

  'serialization.format' = '1'

) LOCATION 's3://rdkim-test/'

TBLPROPERTIES ('has_encrypted_data'='false');


4. SQL Query in the Amazon Athena

example : SELECT * FROM "pisensor"."temperature" limit 10;



- Pi4J Java Maven

<dependency>

    <groupId>com.pi4j</groupId>

    <artifactId>pi4j-core</artifactId>

   <version>1.1</version>

</dependency>


- project maven pom.xml 

 : https://github.com/rdiot/rdiot-p019/blob/master/pom.xml


- source : main : https://github.com/rdiot/rdiot-p019/blob/master/pi4j_s3rest/App.java

- source : pi4j : https://github.com/rdiot/rdiot-p019/blob/master/pi4j/dht11.java

- source : s3 rest api header aws sig4 : https://github.com/rdiot/rdiot-p019/blob/master/s3rest/auth/AWS4SignerForAuthorizationHeader.java


- Key Code

     dht11 dht = new dht11();

   

        for (int i=0; i<10; i++) {

            try {

Thread.sleep(2000);

} catch (InterruptedException e) {

e.printStackTrace();

}

            

            objectContent = dht.getTemperature();

            

            if(objectContent != null) {

        System.out.println(objectContent);

        putS3Object(bucketName, regionName, awsAccessKey, awsSecretKey);

            break;

            }            

         }     



- Reference

 : Pi4J Project : http://pi4j.com

 : Pi4J GitHub : https://github.com/Pi4J/pi4j

 : get dht11 : https://stackoverflow.com/questions/28486159/read-temperature-from-dht11-using-pi4j

 : Amazon S3 Rest API : https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html


Posted by RDIoT
|