# Image Node 18: Bluetooth integration tests

**URL:** <https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758>\
**Category:** Développement\
**Created:** [December 11, 2022, 4:55pm UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758 "2022-12-11T16:55:49Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [December 12, 2022, 9:26am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/21 "2022-12-12T09:26:29Z")

</div>

> [@spenceur](#):
>
> @pierre-gilles I think the most important message was here ^^’

Yes, after that it’s just the vagaries of Bluetooth, isn’t it?

@gaetanb76 are you sure you don’t see your Nut? Is it charged?

I don’t know what else to say!

The integration starts, the scan works and sees devices

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [December 12, 2022, 9:28am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/22 "2022-12-12T09:28:24Z")

</div>

[quote=«&nbsp;pierre-gilles, post:21, topic:7758&nbsp;»]  
Yes,

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [December 12, 2022, 9:29am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/23 "2022-12-12T09:29:13Z")

</div>

I don’t think we’re talking about the presence check here; he’s just looking at the «&nbsp;search&nbsp;» Bluetooth tab in the Bluetooth integration

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [December 12, 2022, 9:30am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/24 "2022-12-12T09:30:50Z")

</div>

it’s possible but I think we need more feedback to do tnr on that part too, in my opinion ^^

Unless the automated tests are OK on the GitHub side 🙂

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [December 12, 2022, 9:31am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/25 "2022-12-12T09:31:47Z")

</div>

Yes, I changed the battery yesterday. The Nut is visible and connected to the Nut app on my smartphone.

Indeed, it is in «&nbsp;Bluetooth Discovery&nbsp;» that it is not detected. Its MAC address does not appear.

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 9:32am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/26 "2022-12-12T09:32:42Z")

</div>

> [@spenceur](#):
>
> I think you didn’t understand.

Yes I confirm, I wanted to help, but indeed I’ll wait until everything is back in order, no hard feelings  
🙂

> [@gaetanb76](#):
>
> Which instance are you talking about, the test one you just installed or the «&nbsp;Official&nbsp;» one you use

Well that’s where I’m no longer sure, because I installed the Bluetooth container on the RPI where Gladys runs and with `docker ps` I have all the containers started, I thought Gladys would pick up that Bluetooth container and integrate it

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [December 12, 2022, 9:34am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/27 "2022-12-12T09:34:10Z")

</div>

No, you created a brand-new full installation of Gladys specifically to test Bluetooth.

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [December 12, 2022, 9:34am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/28 "2022-12-12T09:34:13Z")

</div>

Ah, I think, unless I’m mistaken, that the nuts must be connected to only one «&nbsp;master&nbsp;»  
That is to say that you have to disconnect it from the app, then remove the battery to reset it and finally see it reappear, I had noticed that on Gladys V3.

Maybe that’s changed!

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 9:36am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/29 "2022-12-12T09:36:08Z")

</div>

> [@gaetanb76](#):
>
> ```
> you created a new full Gladys installation specifically
> 
> ```

And how do I start it?

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [December 12, 2022, 9:37am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/30 "2022-12-12T09:37:11Z")

</div>

Glad

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [December 12, 2022, 9:37am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/31 "2022-12-12T09:37:44Z")

</div>

@gaetanb76  
from what I understand from this:

> **[Difference between Master & Slave in in BLE - Bluetooth forum -...](https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/216093/difference-between-master-slave-in-in-ble)**
>
> Hi, 
> could you please give me a detail difference between Master & Slave in bluetooth low energy technology? 
> Regards.

a master can have multiple slaves but a slave only connects to a single master

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 9:50am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/32 "2022-12-12T09:50:11Z")

</div>

[quote=«&nbsp;gaetanb76, post:30, topic:7758, full:true&nbsp;»]  
to Glad

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [December 12, 2022, 9:52am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/33 "2022-12-12T09:52:31Z")

</div>

Indeed, that makes sense.  
I disconnected the Bluetooth on my smartphone and the nut appears correctly in Gladys, without removing the battery.  
Everything is ok Chief @pierre-gilles  
I added the nut and created a scene triggered by the nut’s state change.  
I created the presence on the dashboard.  
toto is marked as «&nbsp;At home&nbsp;»

\*\*\* edit \*\*\*  
I reconnected the Bluetooth on my smartphone.  
The user is still present on the dashboard.  
I’m going to let the instance run for a day or two to see if anything changes.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [December 12, 2022, 9:59am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/34 "2022-12-12T09:59:30Z")

</div>

Amazing! Thank you to the three of you for the tests and for your feedback 🙏

Make sure to delete your test container and the volume containing the test DB 🙂

I’m going to deploy this fix to prod!

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 10:09am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/35 "2022-12-12T10:09:19Z")

</div>

Sorry for the waste of time,  
One last question " the volume containing the test DB to be deleted " is it this one " ?

```auto
gladysassistant_test_bluetooth

```

@gaetanb76 and @pierre-gilles, thank

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [December 12, 2022, 10:10am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/36 "2022-12-12T10:10:39Z")

</div>

> [@Psoy](#):
>
> One last question: «&nbsp;the volume containing the test DB to delete&nbsp;», is it this one?

Yes, that’s the folder:

```auto
/var/lib/gladysassistant_test_bluetooth

```

🙂

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 10:15am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/37 "2022-12-12T10:15:53Z")

</div>

> [@pierre-gilles](#):
>
> Yes, that’s the folder:
> 
> ```auto
> /var/lib/gladysassistant_test_bluetooth
> 
> ```

Should I delete

```auto
/var/lib/gladysassistant_test_bluetooth

```

sudo rm -r /var/lib/gladysassistant\_test\_bluetooth

or just

```auto
sudo rm gladysassistant_test_bluetooth

```

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [December 12, 2022, 10:16am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/38 "2022-12-12T10:16:42Z")

</div>

sudo rm -rf /var/lib/gladysassistant\_test\_bluetooth

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [December 12, 2022, 10:17am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/39 "2022-12-12T10:17:59Z")

</div>

Thanks @VonOx  
I’ll do that 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [December 12, 2022, 10:18am UTC](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758/40 "2022-12-12T10:18:59Z")

</div>

@VonOx was faster than me 🙂

> **[man rm : rm - Effacer des fichiers et des répertoires](http://www.man-linux-magique.net/man1/rm.html)**
>
> man rm

> ```
> -f, --force => ignore nonexistent files, do not prompt for confirmation
> 
> ```

> -r, -R, --recursive =\> remove directories and their contents recursively

[Previous page](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758.md?page=1)

[Next page](https://community.gladysassistant.com/t/image-node-18-tests-integration-bluetooth/7758.md?page=3)
