Git Product home page Git Product logo

Comments (4)

ebaauw avatar ebaauw commented on September 6, 2024

Ad 1. Yes, log level is per accessory, but newly paired accessories inherit the level from the gateway.

Ad 2. See https://github.com/ebaauw/homebridge-lib/wiki/Log-Messages. Even with level 0, you’ll still see the warnings and errors.

from homebridge-deconz.

ThunderFD avatar ThunderFD commented on September 6, 2024

Thanks for your reply!

Ad 1. Yes, log level is per accessory, but newly paired accessories inherit the level from the gateway.

I see, then I'll have to write a little script that changes the log level for all of them. (that could be a neat future feature to have a built in command for that)
But good to see that newly added accessories will inherit the log level from the gateway 👍

Ad 2. See https://github.com/ebaauw/homebridge-lib/wiki/Log-Messages. Even with level 0, you’ll still see the warnings and errors.

Perfect, thanks for the link!

closing this issue 🙏

from homebridge-deconz.

ThunderFD avatar ThunderFD commented on September 6, 2024

for anyone stumbling over this, here's a short python3 script to change the logLevel for all accessories and the gateway to 0

import os
import json

# the command to get a dictionary of all the accessories
accessories_command = "ui get /accessories"

# run the command and get the output
accessories = os.popen(accessories_command).read()

# create a list of the keys
accessory_ids = list(json.loads(accessories).keys())

# what to change for each accessory and the gateway
payload = {"logLevel": 0}

# set the change for each accessory
for accessory_id in accessory_ids:
    os.system(f"ui put /accessories/{accessory_id} '{json.dumps(payload)}'")

# set the change for the gateway
os.system(f"ui put / '{json.dumps(payload)}'")

from homebridge-deconz.

ebaauw avatar ebaauw commented on September 6, 2024

Or, using bash:

for i in $(ui get -al /accessories | grep /name | cut -d / -f 2) ; do
  ui put /accessories/$i '{"logLevel": 0}'
done

from homebridge-deconz.

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.