Yes, I ended up using an ATOM Lite (ESP32-PICO) with my esp32-MobiusBLE library and it has been working perfectly for me.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
New to Arduino - where can I set -Wno-narrowing flag? Please don't tell me I have to edit the root config for arduino?I took at this library and there are several issues so far:
I played with it for 30 minutes, excluding MAC addresses that didn't work but ultimately I wasn't able to get the coveted "Scene 0" output. The best I got was scene 65535, which is likely an error.
- The narrowing warning you get. Although this can be solved with -Wno-narrowing
- The library incorrectly assumes that 01ff0100-ba5e-f4ee-5ca1-eb1e5e4b1ce0 is specific to Mobius when it's a wireless UART service. I get 8 devices when I do a scan.
- Uses an old deprecated version of the BLE library. For example, the tries to make a call to bool BLERemoteCharacteristic::writeValue when in fact the signature is void.
Not sure if @mard is still around or if I should try to fork and fix the library.
I think the function can be rewritten to remove the narrowing error - but my C is rusty.I took at this library and there are several issues so far:
I played with it for 30 minutes, excluding MAC addresses that didn't work but ultimately I wasn't able to get the coveted "Scene 0" output. The best I got was scene 65535, which is likely an error.
- The narrowing warning you get. Although this can be solved with -Wno-narrowing
- The library incorrectly assumes that 01ff0100-ba5e-f4ee-5ca1-eb1e5e4b1ce0 is specific to Mobius when it's a wireless UART service. I get 8 devices when I do a scan.
- Uses an old deprecated version of the BLE library. For example, the tries to make a call to bool BLERemoteCharacteristic::writeValue when in fact the signature is void.
Not sure if @mard is still around or if I should try to fork and fix the library.
I'm of the opinion that they're saved locally in each device. The reason for that conclusion is how "verify settings" work.Does anyone know if all the scenes information is stored inside each device or only on the Mobius App?
Trying to understand if we can grab all the available scenes using the MobiusBLE library without touching the Mobius App.
Thanks
We have a few options here.I think that the scene is in the mobius app. Device receive the command from the app.
I'm waiting my ATOM Lite to do some test. what is the procedure to grab the mac address of my devices? (2x MP10)
Thank you!
import asyncio
from bleak import BleakScanner
from collections.abc import Iterable
async def main():
devices = await BleakScanner.find_device_by_name('MOBIUS',timeout = 30.0)
if devices is not None:
if isinstance(devices, Iterable):
print('iteract Dev3')
for d3 in devices:
print(d3)
else:
print('Dev3 by Name')
print(type(devices))
print(f"Device: {devices.name}, Address: {devices.address}")
print(devices)
asyncio.run(main())
"""
Service Explorer
----------------
An example showing how to access and print out the services, characteristics and
descriptors of a connected GATT server.
Created on 2019-03-25 by hbldh <[email protected]>
"""
import argparse
import asyncio
import logging
from bleak import BleakClient, BleakScanner
logger = logging.getLogger(__name__)
async def main(args: argparse.Namespace):
logger.info("starting scan...")
if args.address:
device = await BleakScanner.find_device_by_address(
args.address, cb=dict(use_bdaddr=args.macos_use_bdaddr)
)
if device is None:
logger.error("could not find device with address '%s'", args.address)
return
else:
device = await BleakScanner.find_device_by_name(
args.name, cb=dict(use_bdaddr=args.macos_use_bdaddr)
)
if device is None:
logger.error("could not find device with name '%s'", args.name)
return
logger.info("connecting to device...")
async with BleakClient(
device,
services=args.services,
) as client:
logger.info("connected")
for service in client.services:
logger.info("[Service] %s", service)
for char in service.characteristics:
if "read" in char.properties:
try:
value = await client.read_gatt_char(char.uuid)
logger.info(
" [Characteristic] %s (%s), Value: %r",
char,
",".join(char.properties),
value,
)
except Exception as e:
logger.error(
" [Characteristic] %s (%s), Error: %s",
char,
",".join(char.properties),
e,
)
else:
logger.info(
" [Characteristic] %s (%s)", char, ",".join(char.properties)
)
for descriptor in char.descriptors:
try:
value = await client.read_gatt_descriptor(descriptor.handle)
logger.info(" [Descriptor] %s, Value: %r", descriptor, value)
except Exception as e:
logger.error(" [Descriptor] %s, Error: %s", descriptor, e)
logger.info("disconnecting...")
logger.info("disconnected")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
device_group = parser.add_mutually_exclusive_group(required=True)
device_group.add_argument(
"--name",
metavar="<name>",
help="the name of the bluetooth device to connect to",
)
device_group.add_argument(
"--address",
metavar="<address>",
help="the address of the bluetooth device to connect to",
)
parser.add_argument(
"--macos-use-bdaddr",
action="store_true",
help="when true use Bluetooth address instead of UUID on macOS",
)
parser.add_argument(
"--services",
nargs="+",
metavar="<uuid>",
help="if provided, only enumerate matching service(s)",
)
parser.add_argument(
"-d",
"--debug",
action="store_true",
help="sets the log level to debug",
)
args = parser.parse_args()
log_level = logging.DEBUG if args.debug else logging.INFO
logging.basicConfig(
level=log_level,
format="%(asctime)-15s %(name)-8s %(levelname)s: %(message)s",
)
asyncio.run(main(args))