M martin mitch Member Licensed User Mar 22, 2019 #1 Hi there Is there a way of interacting with a Bluetooth plug, for example, to switch it on and off? Thanks
Hi there Is there a way of interacting with a Bluetooth plug, for example, to switch it on and off? Thanks
DonManfred Expert Licensed User Longtime User Mar 22, 2019 #2 I don´t think that there is a possibility to Power ON a Bluetooth Device. Same probably applies to power off. Upvote 0
I don´t think that there is a possibility to Power ON a Bluetooth Device. Same probably applies to power off.
M martin mitch Member Licensed User Mar 22, 2019 #3 Thanks for your reply. So are you saying its probably not possible through B4A? So needs to be done through a different language? Cheers Upvote 0
Thanks for your reply. So are you saying its probably not possible through B4A? So needs to be done through a different language? Cheers
DonManfred Expert Licensed User Longtime User Mar 22, 2019 #4 martin mitch said: So needs to be done through a different language? Click to expand... 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
martin mitch said: So needs to be done through a different language? Click to expand... 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.
MarkusR Well-Known Member Licensed User Longtime User Mar 22, 2019 #5 what kind of "Bluetooth plug" do you speak? Upvote 0
M martin mitch Member Licensed User Mar 22, 2019 #6 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
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".
MarkusR Well-Known Member Licensed User Longtime User Mar 22, 2019 #7 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
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.
M martin mitch Member Licensed User Mar 22, 2019 #8 For example... Https://www.amazon.co.uk/JOMARTO-Co...F8&qid=1553259596&sr=8-15&keywords=smart+plug Upvote 0
MarkusR Well-Known Member Licensed User Longtime User Mar 22, 2019 #9 WiFi is not Bluetooth ... some WiFi devices using a cloud service means web api with http requests. Upvote 0
M martin mitch Member Licensed User Mar 22, 2019 #10 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
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?
DonManfred Expert Licensed User Longtime User Mar 22, 2019 #11 martin mitch said: So I would need to see if there's an API for the plug to interact with it? Click to expand... Yes Upvote 0
martin mitch said: So I would need to see if there's an API for the plug to interact with it? Click to expand... Yes
MarkusR Well-Known Member Licensed User Longtime User Mar 22, 2019 #12 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
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.
M martin mitch Member Licensed User Mar 22, 2019 #13 I assume if there's an API, it's easy enough to call from within b4a? Any special libraries or commands? Upvote 0
I assume if there's an API, it's easy enough to call from within b4a? Any special libraries or commands?
DonManfred Expert Licensed User Longtime User Mar 22, 2019 #14 martin mitch said: I assume if there's an API, it's easy enough to call from within b4a? Any special libraries or commands? Click to expand... MarkusR said: for web requests u can use the lib OkHttpUtils2 comes with the ide. Click to expand... Upvote 0
martin mitch said: I assume if there's an API, it's easy enough to call from within b4a? Any special libraries or commands? Click to expand... MarkusR said: for web requests u can use the lib OkHttpUtils2 comes with the ide. Click to expand...
thetahsk Active Member Licensed User Longtime User Mar 22, 2019 #15 martin mitch said: For example... Https://www.amazon.co.uk/JOMARTO-Co...F8&qid=1553259596&sr=8-15&keywords=smart+plug Click to expand... 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
martin mitch said: For example... Https://www.amazon.co.uk/JOMARTO-Co...F8&qid=1553259596&sr=8-15&keywords=smart+plug Click to expand... 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.
thetahsk Active Member Licensed User Longtime User Mar 22, 2019 #16 The Tasmota commands overview: https://github.com/arendst/Sonoff-Tasmota/wiki/Commands Upvote 0