Avatar for greylinux

greylinux

Member since Jan 2023 • Last active Jan 2023
  • 0 conversations
  • 5 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for greylinux

    but if you just want to tell the devices apart, MAC address is definitely the best!

    It was thank you so much for the reply , however as you said I managed with the MAC address which is even easier, now I just need to work out how to get Esphome to understand the advertised battery percentage from the pucks , but that's a topic for another thread .

    Thanks again

  • in Puck.js, Pixl.js and MDBT42
    Avatar for greylinux

    Very well explained article thank you , much appreciated

  • in Puck.js, Pixl.js and MDBT42
    Avatar for greylinux

    And I take it each puck has a unique one ? In which case this is great, I can use that without any addition to the code. Thanks for your help

  • in Puck.js, Pixl.js and MDBT42
    Avatar for greylinux

    MAC address would be great , but doesn't it randomly change from time to time ? If not then I can definitely use the MAC address. I will be using ESPHome with a Bluetooth esp as a base station device that sends the presence back to Home assistant .

    https://esphome.io/components/binary_sen­sor/ble_presence.html

    You can see MAC address as one of the 3 options

  • in Puck.js, Pixl.js and MDBT42
    Avatar for greylinux

    @Gordon
    Hi I'm sorry for reviving this post, I can create a new one if required. I'm trying to do a similar thing by using a UUID as a way of distinguishing between two pucks to use as presence detection for home automation. I understand I could setup up something like the ibeacon service but all I need is a UUID that doesnt change for each puck. I tried creating a 128 bit UUID using

    date | md5sum
    

    and then seperating the result like you suggested above

    NRF.setAdvertising([
      [
    0x13,0x19,0x00,0x01,0x07,0x6e,0xe3,0xac,­0xd3,0xc5,0x1b,0xbd,0xf7,0x28,0x83,0x6c,­
    ]]);
    

    , but this didnt work and I had to hard reset to get it back programmable , did I need to add a service similar to above ?

    NRF.setServices(undefined, {
          uart : false, 
          advertise: [ 'ABCDABCD-ABCD-ABCD-ABCD-ABCDABCDABCD' ]  
    });
    

    I'm very new to this it been a bit of a learning curve today to understand how it all works.

    is this the best way to achieve what I want ?

    thanks in advance

Actions