Estimote / iOS-Fleet-Management-SDK

Estimote Fleet Management SDK for iOS
https://developer.estimote.com
MIT License
1.18k stars 398 forks source link

Accessing telemetry info in iOS SDK #231

Closed muneebjanjua closed 4 years ago

muneebjanjua commented 7 years ago

I have location beacons with me and I am trying to access telemetry information in my custom app. Ideally I want to read temperature and motion information.

Question

**1. Can I retrieve telemetry info without making connection with the beacon? (NOTE: I am using location beacons)

  1. Can we retrieve telemetry without involving the use of Estimote cloud API?**
-(void)setup {
    self.deviceManager = [ESTDeviceManager new];
    self.deviceManager.delegate = self;
    temperatureNotification = [[ESTTelemetryNotificationTemperature alloc] initWithNotificationBlock:^(ESTTelemetryInfoTemperature *temperature) {
        NSLog(@"Temperature : %@",temperature);
    }];
    [self.deviceManager registerForTelemetryNotification:temperatureNotification];
    ESTDeviceFilterLocationBeacon *filter = [[ESTDeviceFilterLocationBeacon alloc] initWithIdentifier:BEACON_IDENTIFER];
    [self.deviceManager startDeviceDiscoveryWithFilter:filter];
}

-(void)deviceManager:(ESTDeviceManager *)manager didDiscoverDevices:(NSArray<ESTDevice *> *)devices{
    NSLog(@"Devices : %@",devices);
}

Note

I searched for forums, dev docs and over many sites but couldn't really find anything related to the issue. Dev docs are not very informative for this particular area.

muneebjanjua commented 7 years ago

Just came across this https://forums.estimote.com/t/access-telemetry-with-ios-sdk/4227/4

My beacons are on Estimote OS 4.6.1 and Hardware Version F2.3

martinklimek commented 7 years ago

Hello @muneebjanjua,

I'm not sure if I get the question right. Telemetry information does not require connection to the beacon. It is delivered in the bluetooth packets that you can subscribe to. API usage is not required as well. The code you've provided is fine and it's not using connection or Estimote API. Current sensor value is delivered to the notification block directly.

Marcin