Android Question Interact with Bluetooth plug

I don´t think that there is a possibility to Power ON a Bluetooth Device. Same probably applies to power off.
 
Upvote 0
So needs to be done through a different language?
I don´t see a way to power off or on a Bluetooth Device using code. No matter in which language.

If the device is OFF you (the user) need to power it on to be able to connect to the bluetooth device.
 
Upvote 0
what kind of "Bluetooth plug" do you speak?
 
Upvote 0
You can buy a "smart plug" off Amazon, for example, which you plug into the wall socket and then you plug, say, a lamp into. Then through an app on your phone you can switch the plug "on" or "off".
 
Upvote 0
can u show a amazon product link/url ?

search here for the library BLE 2 - Bluetooth Low Energy

if your smart plug get serial data u need to know the command list.
 
Upvote 0
WiFi is not Bluetooth ...
some WiFi devices using a cloud service means web api with http requests.
 
Upvote 0
Ah, good point. Not sure why I thought Bluetooth, you're right, they're WiFi, aren't they. So I would need to see if there's an API for the plug to interact with it?
 
Upvote 0
i not like web services for this because they are outside of your home, you are dependently on it etc.

for web requests u can use the lib OkHttpUtils2 comes with the ide.
u need a web api description then, yes.

something autonomous home-made you can do with the raspberry pi or arduino microcontroller board.
 
Upvote 0
Don't buy that unknown Amazon crap. First choice, of a fully self controlled home automation system are alway the devices from Sonoff.
https://sonoff.itead.cc/en/
There is a well documentaded API and it's also possible to flash your own Tasmota firmware. The devices are all based on ESP8266 hardware plattorm.
https://github.com/arendst/Sonoff-Tasmota.

Sonoff-Tasmota
Alternative firmware for ESP8266 based devices like iTead Sonoff with web UI, rules and timers, OTA updates, custome device templates and sensors support. Allows control over MQTT, HTTP, Serial and KNX for integrations with smart home systems. Written for Arduino IDE and PlatformIO.
 
Upvote 0
Back
Top