Git Product home page Git Product logo

Comments (4)

gcgarner avatar gcgarner commented on May 23, 2024

At the moment the container doesn't have the permission to access host devices. There should be a way to give it access.

Which node are you using, I'll give it a go and report back

from iotstack.

gcgarner avatar gcgarner commented on May 23, 2024

I got into an endless restart initially (deleting the flows.json file stopped the endless restart)

It looks like by setting the network_mode to host it stopped the endless restart issue. I tried the BLE scan and it doesnt return any results, my phone does however see my watch

Could you try editing your docker-compose.yml file and see if it fixes your results:

  nodered:
    container_name: nodered
    build: ./services/nodered/.
    restart: unless-stopped
    user: "0"
    network_mode: "host"

add the line for network mode, the file indentation is important.

after this run docker-compose up -d (if you have a continuous restart issue like i had run sudo rm ~/IOTstack/volumes/nodered/data/flows.json then docker-compose restart nodered )

The host option has another side effect, you can no longer access containers by name, you would now need to use 127.0.0.1 in stead of the name

from iotstack.

DeuceCode avatar DeuceCode commented on May 23, 2024

I believe I experienced the same endless restart issue you mentioned. I'm fairly new to this kind of thing but, that's what the logs in portainer seemed to be indicating. Deleting the flows did indeed stop this.

I'm looking to use node-red-contrib-xiaomi-ble as the simplest method to poll at the moment one Xiaomi Mijia Bluetooth Temperature Humidity Sensor (hopefully in the future multiple sensors).

Editing the docker-compose.yml file to include network_mode: "host" does allow the scan to complete inside the container, and a temp, humidity, battery response is returned as expected.

Having to access other containers by IP instead of name seems like a fair trade in this case to gain the additionally functionally.

Thank you.

from iotstack.

gcgarner avatar gcgarner commented on May 23, 2024

Thanks @DeuceCode I will amend the documentation. I appreciate you testing the modified yml file

from iotstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.