Setting Input/Output for external device

While connecting an external I/O device , It is batter has a setting for user can select which channels are prefer .
ig. User apogee quartet , quartet has 4 analog input , and 6 analog output , you can select specific I/O channels for recording and monitor . you can select input 1 & 2 for stereo recording or just 1 for
mono recording.
For current version I test with quartet , if will using default input 1 , still works , but if your audio is via other channels , nothing can be recorded
A setting view with real time chart UI will be great for measuring the input/output volume

I only have the Apogee One with two inputs and one stereo output so I'd probably have to get a Quartet to really test out a fix.  Its a relative small portion of users that have this big of a hardware configuration and want to program for it, but I feel ya, it should be supported.

Thanks : )

Hi , I just think maybe you don't need to get a quartet , I think Duet is enough for testing

I have several interfaces with multiple Ins and outs.
RME 18 channel
Roland 4 channel
PreSonus 2 Channel
It's not that uncommon for pro users to have several multi channel
interfaces.
L
On Wednesday, May 10, 2017, WebberLai<EMAIL_ADDRESS>wrote:

Hi , I just think maybe you don't need to get a quartet , I think Duet is
enough for testing
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/audiokit/AudioKit/issues/891#issuecomment-300700825,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHxL7pyoN56fh_q9jKTfs0MGixuj5-Rpks5r4rJAgaJpZM4NXjeR
.

--
Larry Seyer
http://LarrySeyer.com
<EMAIL_ADDRESS>512 371 7777 <%28512%29%20371-7777>
https://www.facebook.com/larryseyer
https://twitter.com/larryseyer
https://www.linkedin.com/in/larryseyer/
https://plus.google.com/u/0/+larryseyer

Don't sell yourself short, It's pretty uncommon to be a pro user at all :)

@WebberLai Quartet on its way.

Amazing ~ I will pull new code today , and test it later
Many thanks

Sorry , I forgot to ask , how can I verify that I can select other inputs for recording ???

Alright, so I have the Quartet, but it only shows up as a single input in AudioKit for macOS.  I haven't tried for iOS, maybe it is smarter.

I think this is going to require getting down and dirty with multi route: https://forums.developer.apple.com/thread/16790

The link this exactly I neeeeeeeeeed !!!
Thank you
BTW,Quartet works on iOS , but only if input is "input1"

To add to all this... I had a post about 6 months ago but was using a Motu interface that had many multi-channel inputs. It has to do with detecting all the audio recording/playback streams. This app I found will display all the available inputs/outputs. perhaps it will also be helpful in adding this feature.
https://github.com/rnine/AMCoreAudio
let me know how I can help.

@Joebayld That is an incredible find!  I'm diving into the code.

No problem. Also, I was thinking because the AudioKit.inputDevice is a singleton, maybe we make another input class that is like a 'AKLineInput' and has a variable that lets you determine what channel to listen to, and maybe a mono/stereo option.
Just thinking over it.

Yeah, that would be incredible.  Luckily rnine has MIT license on this stuff so we can use it directly.

adding myself to this issue. :)

I looked at AMCoreAudio finally - it works great. We should use it if possible for macOS, or at least use the HAL calls like that.

Also interested in seeing this functionality. Been struggling with multichannel inputs the last few days.

+1 for this functionality on macOS.  I'm working on a Room EQ app that would greatly benefit from this for edit rooms in a post production setting.

I spent the last couple of days fighting with this. Finally found something that is roughly working, so I thought I'd share.
I'm trying to push out 8 channels to audio to my modular synth through the ES-8 USB audio device. I kept running into issues where it would only talk to the first 2 channels, as if it's a stereo output. I had to create a custom channel format and bypass the AudioKit provided output mixer.
let engine = AudioKit.engine
engine.connect(lfo1.avAudioNode, to: engine.mainMixerNode, format: channelFormat(for: kAudioChannelLabel_Left))
engine.connect(lfo2.avAudioNode, to: engine.mainMixerNode, format: channelFormat(for: kAudioChannelLabel_Discrete_7))

// force main mixer to mirror output format
engine.connect(engine.mainMixerNode, to: engine.outputNode, format: engine.outputNode.outputFormat(forBus: 0))

The last line seems to be the key to getting all outputs online. I'm still trying to figure out how to properly query the interface for these channel formats. Right now everything has to be hardcoded, which obviously won't work for compatibility between devices.
Here is a way to create a custom audio format in Swift:
    func channelFormat(for channelLabel: AudioChannelLabel) -> AVAudioFormat {
        let desc = AudioChannelDescription.init(mChannelLabel: channelLabel, mChannelFlags: AudioChannelFlags.init(rawValue: 0), mCoordinates: (0.0, 0.0, 0.0))
        let singleChannelLayout = AudioChannelLayout.init(mChannelLayoutTag: 0, mChannelBitmap: AudioChannelBitmap.init(rawValue: 0), mNumberChannelDescriptions: 1, mChannelDescriptions: desc)
        let singleChannelLayoutPointer = UnsafeMutablePointer<AudioChannelLayout>.allocate(capacity: 1)
        singleChannelLayoutPointer.initialize(to: singleChannelLayout)
        let wrappedSingleChannelLayout = AVAudioChannelLayout.init(layout: singleChannelLayoutPointer)
        return AVAudioFormat.init(standardFormatWithSampleRate: 44100, channelLayout: wrappedSingleChannelLayout)
    }

@kylestew Thanks for posting the sample code. Did you manage to get the formats from the interface?

you might want to take a look at AMCoreAudio: https://github.com/rnine/AMCoreAudio

Thanks @ryanfrancesconi , do you know of any iOS solutions?

oh sorry, i had assumed you were talking about macOS. No, I don't work on iOS.

Any progress on this? Can we choose different input channel if a device has more than 2 inputs? Also, can we work with multiple inputs simultaneously?

Any progress on this? Can we choose different input channel if a device has more than 2 inputs? Also, can we work with multiple inputs simultaneously?

See the new Cookbook Example I made here: https://www.github.com/AudioKit/Cookbook/tree/develop/Cookbook%2FCookbook%2FRecipes%2FInputDeviceDemo.swift. The current way to work with multiple inputs in AudioKit is through the AVFoundation API. This means to create multiple inputs, you need to have them under an Aggregate Device since AVAudioEngine can only work with one input. You also need to select this device as your default Input/Output before using it with AudioKit.
This is a bit quirky, and AVAudioEngine is known for introducing many bugs when mixers/nodes aren't setup correctly. However, I'm also exploring if there's a way to do this with the AudioToolbox API.

That information sounds incorrect to me for macOS. AVAudioEngine has one inputNode - true, but, that doesn't mean it only works with one input channel. The input node can have any type of channel format such as 32 channels with the supported hardware attached.
It is up to the implementation to correctly map the channels from hardware via the inputNode.
There is an example of how this works in here: https://github.com/AudioKit/AudioKit/blob/main/Sources/AudioKit/Taps/MultiChannelInputNodeTap.swift

Thanks for the examples!
I need to look more carefully, but it seems more complicated than I thought it would be!

That information sounds incorrect to me for macOS. AVAudioEngine has one inputNode - true, but, that doesn't mean it only works with one input channel. The input node can have any type of channel format such as 32 channels with the supported hardware attached.
It is up to the implementation to correctly map the channels from hardware via the inputNode.
There is an example of how this works in here: https://github.com/AudioKit/AudioKit/blob/main/Sources/AudioKit/Taps/MultiChannelInputNodeTap.swift

That makes sense. I misunderstood. So the input node is just a way for the engine to setup a single route to a configured audio input source?
I didn't realize the MultiChannelInputNodeTap existed. Is there already a Cookbook example for it? If not, I can update the code for the InputDeviceDemo to use it.

there isn't an example for that class. it's something i contributed as it's not very obvious how this stuff works, so i thought it might help someone. but, so you know i have built a DAW with it that works with any number of channels and multi channel recording. For macOS. I don't use iOS.

I think often the misunderstand thing is that AVAudioFormat can in fact have more channels than 2. This is also a way you can record multi channel  files directly from nodes.


Nightly debian8 builds failed ....

ipython-qtconsole and ipython3-qtconsole are build/runtime dependencies.
Apparently they are not needed with ipython >2.x which is the case both for debian

there are other errors with h5py and string formating ...

Apparently this was a temporary bug...


Resizing Already Uploaded Images

I often end up adding this module to a site after the owners have gone and batch uploaded many high res images via SilverStripe and maxed out their disk space. This deals with any future uploads, but for the images that have already been uploaded, I end up downloading them, resizing them locally and then reuploading them, overwriting the high res versions.
Is there any way to batch run a resize on images that had been uploaded before the module was installed?

There's no task built in to do this, but since the resampling extension uses onAfterWrite, you may be able to just loop over all images and write them again:
foreach (Image::get() as $image) {
    $image->write();
}


fix tests

There are still 2 tests failing.
Run options:

# Running tests:

[33/35] TC_Scoper#test_order_tasks = 0.00 s
  1) Failure:
TC_Scoper#test_order_tasks [/home/adam/.GIT/3rd-party/ansible-viz/test-scoper.rb:26]:
<["taskB", "main", "taskA", "task2", "main", "task1"]> expected but was
<["taskB", "taskA", "task1", "task2", "main", "main"]>.

[34/35] TC_Scoper#test_scope = 0.01 s
  2) Failure:
TC_Scoper#test_scope [/home/adam/.GIT/3rd-party/ansible-viz/test-scoper.rb:46]:
roleA taskA: missing/extra items.
<[[], []]> expected but was
<[["factB", "meow", "varAmaininc", "factAmain", "factB"], []]>.

Finished tests in 0.093157s, 375.7111 tests/s, 944.6451 assertions/s.
35 tests, 88 assertions, 2 failures, 0 errors, 6 skips

ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
Coverage report generated for Unit Tests to /home/adam/.GIT/3rd-party/ansible-viz/coverage. 633 / 874 LOC (72.43%) covered.

c7f7eaeeec introduced another failure:
[11/35] TC_Grapher#test_full = 0.01 s
  1) Error:
TC_Grapher#test_full:
TypeError: no implicit conversion of nil into String
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:97:in `quote'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:97:in `block in decorate'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:88:in `each'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:88:in `decorate'
    /home/adam/.GIT/3rd-party/ansible-viz/grapher.rb:26:in `graph'
    /home/adam/.GIT/3rd-party/ansible-viz/ansible-viz.rb:99:in `render'
    /home/adam/.GIT/3rd-party/ansible-viz/test-grapher.rb:20:in `test_full'

Fixed regression in 35ec4b5

There are also several other skipped tests.

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
Beasta, @jacobrosenthal, @mooglestiltzkin, @JusticeBrains, @juanc1479, @havrancek, @lylunula, @hveiras, @hu55a1n1, @mattrmckenney, @cyberd3vil, @minorgod, @utzig, @ashayh, @TheBits, @hzhu, @aleit, @Steelsouls, @jarihte, @Tomwslape5638


START

START
User Story
AS A coding boot camp student
I WANT to take a timed quiz on JavaScript fundamentals that stores high scores
SO THAT I can gauge my progress compared to my peers
Acceptance Criteria
GIVEN the code quiz
WHEN a user clicks the start button
THEN a timer starts
AND the first question appears

GIVEN the code quiz
WHEN a user clicks the start button
THEN a timer starts

GIVEN the code quiz
WHEN a user clicks the start button
THEN a timer starts


enable -ip parameter. should refactor this, takes some time and 9 mod…

…ified files to add such a simple mapping :D

implements #49


[Multi-GPU training] How to specific backend used in DDP training?

System Info
.....

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
......
Expected behavior

I encounter above errors when my problem have run 7 hours in 4 A100s, I don't known what's the cause of it, but the information suggests accelerate use GLOO as DDP backend, how to switch to NCCL? as my best knowledge, it's better than GLOO.

Hi @Luciennnnnnn, it should use nccl if you are on a multi-gpu setup. Could you print your accelerate config ? Here's the related code with you want to try debugging.


The name of the file or folder downloaded are urlencoded form

e.g. If there is a "a b" folder, it is downloaded as "a%20b.zip"
Start Date: undecided
Due Date: undecided

In addition, the problem is occurred when Korean is used in folder/file name,


improve custom sync

I have 5 devices getting synced using couchdb and Customization sync. There are no proper documentation on how to update all the devices if there are new configuration or settings on one device. or If I try to Clean the database and then try to make it work again across all the device.
I cannot find any documentation on this.
The Customization Sync doesn't sync settings and new plugins automatically to all the device. Can you add that feature ?
It also takes me around 25seconds everytime I start the vault for the Progress indicators to finish and is very inefficient as I have to wait for 30seconds everytime. and then start  taking notes. It also needs imporovement

I think at least the Plugin settings should be automatically synced to all vaults instead of havnig to manually update them. I can understand that enabling plugins and installing plugins could be difficult to sync across devices. But the settings like example setting a new hotkey should automatically be synced across devices and should be enabled. Similar for all plugins, if that can be implemented then that would be great.

I'm had a similar problem setting up across two devices. I couldn't for the life of be get anything in the .obsidian folder to sync even though "Hidden file synchronization" was set to " : Enabled" on both devices.
What finally seemed to kick everything off was clicking the "Replicate" button along the left side of the window (with the "Open today's daily note" and "Show log" buttons). That seemed to push all the missing changes from the "main" vault into the DB. Then, syncing from the "secondary" vault showed conflicts on the plugins file, which I could then take the new changes.


[Device Support Request] Tuya Temperature&Humidity Sensor with backlight and Battery report TZE200_vvmbj46n

Problem description
This Unit is TS601 based sensor, I tried to integrate it by copying the code from Variation 04 with some success : I can get the Temp and Humidity readings, but the battery doesn't seem to report correctly, plus I don't know what to do to update the Date & time on the device itself, but I'm pretty sure the gateway is supposed to do that.
Here is the link to the device itself : https://fr.aliexpress.com/item/1005005897159196.html?spm=a2g0o.order_list.order_list_main.11.7a875e5bryD8IU&gatewayAdapt=glo2fra
Solution description
I'm using the custom quirk for the Tuya air quality sensor which is awesome, I am no coder, but I'm willing to provide help if someone needs more information to create a custom quirks for this model. Thanks a bunch !
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]

Device signature
Device signature
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": "0x0104",
      "device_type": "0x0302",
      "input_clusters": [
        "0x0000",
        "0x0001",
        "0x0004",
        "0x0005",
        "0x0402",
        "0x0405",
        "0xef00"
      ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZE200_vvmbj46n",
  "model": "TS0601",
  "class": "ts0601_sensor.TuyaTempHumiditySensorVar05"
}

Diagnostic information
Diagnostic information
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Paris",
    "os_name": "Linux",
    "os_version": "6.1.59",
    "supervisor": "2023.11.0",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.32.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "trakt": {
      "version": "2.0.3",
      "requirements": [
        "trakt==2.14.0"
      ]
    },
    "moonraker": {
      "version": "0.9.2",
      "requirements": [
        "moonraker-api==2.0.5"
      ]
    },
    "truenas": {
      "version": "0.0.0",
      "requirements": []
    },
    "auto_backup": {
      "version": "1.4.1",
      "requirements": []
    },
    "rte_ecowatt": {
      "version": "0.6.3",
      "requirements": [
        "Async-OAuthlib==0.0.9"
      ]
    },
    "monitor_docker": {
      "version": "1.10",
      "requirements": [
        "aiodocker==0.21.0",
        "python-dateutil==2.8.2"
      ]
    },
    "plex_recently_added": {
      "version": "0.3.8",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "after_dependencies": [
      "onboarding",
      "usb"
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "config_flow": true,
    "dependencies": [
      "file_upload"
    ],
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp",
      "universal_silabs_flasher"
    ],
    "requirements": [
      "bellows==0.36.8",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.106",
      "zigpy-deconz==0.21.1",
      "zigpy==0.59.0",
      "zigpy-xbee==0.19.0",
      "zigpy-zigate==0.11.0",
      "zigpy-znp==0.11.6",
      "universal-silabs-flasher==0.0.14",
      "pyserial-asyncio-fast==0.11"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_uzg-01._tcp.local.",
        "name": "uzg-01*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 54575,
    "manufacturer": "_TZE200_vvmbj46n",
    "model": "TS0601",
    "name": "_TZE200_vvmbj46n TS0601",
    "quirk_applied": true,
    "quirk_class": "ts0601_sensor.TuyaTempHumiditySensorVar05",
    "quirk_id": null,
    "manufacturer_code": 4417,
    "power_source": "Battery or Unknown",
    "lqi": 148,
    "rssi": -63,
    "last_seen": "2023-11-08T21:00:47",
    "available": true,
    "device_type": "EndDevice",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0302",
          "input_clusters": [
            "0x0000",
            "0x0001",
            "0x0004",
            "0x0005",
            "0x0402",
            "0x0405",
            "0xef00"
          ],
          "output_clusters": [
            "0x000a",
            "0x0019"
          ]
        }
      },
      "manufacturer": "_TZE200_vvmbj46n",
      "model": "TS0601"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "sensor.t_h_salle_des_machines_batterie",
        "name": "_TZE200_vvmbj46n TS0601"
      },
      {
        "entity_id": "sensor.t_h_salle_des_machines_temperature",
        "name": "_TZE200_vvmbj46n TS0601"
      },
      {
        "entity_id": "sensor.t_h_salle_des_machines_humidite",
        "name": "_TZE200_vvmbj46n TS0601"
      }
    ],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "TEMPERATURE_SENSOR"
      }
    ],
    "user_given_name": "T/H Salle des machines",
    "device_reg_id": "7c0214190ca183d99d37ec743bf43847",
    "area_id": "salle_des_machines",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "TEMPERATURE_SENSOR",
          "id": 770
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0001": {
                "attribute_name": "app_version",
                "value": 72
              },
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZE200_vvmbj46n"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0601"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xef00": {
            "endpoint_attribute": "tuya_manufacturer",
            "attributes": {
              "0xef00": {
                "attribute_name": "mcu_version",
                "value": "1.0.0"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0402": {
            "endpoint_attribute": "temperature",
            "attributes": {
              "0x0000": {
                "attribute_name": "measured_value",
                "value": 1750
              }
            },
            "unsupported_attributes": {}
          },
          "0x0405": {
            "endpoint_attribute": "humidity",
            "attributes": {
              "0x0000": {
                "attribute_name": "measured_value",
                "value": 5900
              }
            },
            "unsupported_attributes": {}
          },
          "0x0001": {
            "endpoint_attribute": "power",
            "attributes": {
              "0x0033": {
                "attribute_name": "battery_quantity",
                "value": 2
              },
              "0x0034": {
                "attribute_name": "battery_rated_voltage",
                "value": 15
              },
              "0x0031": {
                "attribute_name": "battery_size",
                "value": 4
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

Logs
Logs
[Paste the logs here]

Custom quirk
Custom quirk
class TuyaTempHumiditySensorVar05(CustomDevice):
    """Tuya temp and humidity sensor (variation 05, backlit screen)."""

    signature = {
        # "profile_id": 260,
        # "device_type": "0x0302",
        # "in_clusters": ["0x0000","0x0001","0x0004","0x0005","0x0402","0x0405","0xef00"],
        # "out_clusters": ["0x000a","0x0019"]
        MODELS_INFO: [
            ("_TZE200_vvmbj46n", "TS0601")
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TemperatureHumidityManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }

    replacement = {
        SKIP_CONFIGURATION: True,
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TemperatureHumidityBatteryStatesManufCluster,
                    TuyaTemperatureMeasurement,
                    TuyaRelativeHumidity,
                    TuyaPowerConfigurationCluster2AAA,
                ],
                OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
            }
        },
    }

Additional information
No response

Just added my customized code, the battery status won't show up, unfortunately.

anyone found a working quirk for this?

I have a quirk that now gives me values but the humidity is off by a factor of 10x . Does anyone have an idea to fix this?
This is the snippet of the quirk I have on the basis of the bigger quirk for these devices
class TuyaTempHumiditySensorVar03(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
RH_MULTIPLIER = 10
signature = {
# "profile_id": 260,
# "device_type": "0x0051",
# "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
# "out_clusters": ["0x000a","0x0019"]
MODELS_INFO: [
("_TZE200_yjjdcqsq", "TS0601"),
("_TZE200_9yapgbuv", "TS0601"),
("_TZE200_qyflbnbj", "TS0601"),
("_TZE200_utkemkbs", "TS0601"),
("_TZE200_vvmbj46n", "TS0601")
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

Hi
I had a similar problem and from file ts0601_sensor.py I modified
RH_MULTIPLIER, but I don't remember which one or where. The version I
attached is working correctly for me.
BR
Ricardo
El jue, 29 feb 2024 a las 14:59, Paul Sijben @.***>)
escribió:

I have a quirk that now gives me values but the humidity is off by a
factor of 10x . Does anyone have an idea to fix this?
This is the snippet of the quirk I have on the basis of the bigger quirk
for these devices
class TuyaTempHumiditySensorVar03(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
RH_MULTIPLIER = 10
signature = {
"profile_id": 260,
"device_type": "0x0051",
"in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
"out_clusters": ["0x000a","0x0019"]
MODELS_INFO: [
("_TZE200_yjjdcqsq", "TS0601"),
("_TZE200_9yapgbuv", "TS0601"),
("_TZE200_qyflbnbj", "TS0601"),
("_TZE200_utkemkbs", "TS0601"),
("_TZE200_vvmbj46n", "TS0601")
],
ENDPOINTS: {
    1: {
        PROFILE_ID: zha.PROFILE_ID,
        DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
        INPUT_CLUSTERS: [
            Basic.cluster_id,
            Groups.cluster_id,
            Scenes.cluster_id,
            TemperatureHumidityManufCluster.cluster_id,
        ],
        OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
    }
},

}
replacement = {
SKIP_CONFIGURATION: True,
ENDPOINTS: {
1: {
DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TemperatureHumidityManufCluster,
TuyaTemperatureMeasurement,
TuyaRelativeHumidity,
TuyaPowerConfigurationCluster2AAA,
],
OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
}
},
}
—
Reply to this email directly, view it on GitHub
https://github.com/zigpy/zha-device-handlers/issues/2732#issuecomment-1971205417,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMEAJOITJNUMGTBQT6TYPLYV4Z5JAVCNFSM6AAAAAA7DP4T46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGIYDKNBRG4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Un Saludo

Hi @richardcc , looks like the attachment did not make it. Could you please upload that one separately?

Let me know if you can get it from here. Otherwise I'll try to upload the
file.
"""Tuya temp and humidity sensors."""
from typing import Any, Dict
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import (
RelativeHumidity,
SoilMoisture,
TemperatureMeasurement,
)
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
SKIP_CONFIGURATION,
)
from zhaquirks.tuya import TuyaLocalCluster, TuyaPowerConfigurationCluster2AAA
from zhaquirks.tuya.mcu import DPToAttributeMapping, TuyaMCUCluster
class TuyaTemperatureMeasurement(TemperatureMeasurement, TuyaLocalCluster):
"""Tuya local TemperatureMeasurement cluster."""
class TuyaSoilMoisture(SoilMoisture, TuyaLocalCluster):
"""Tuya local SoilMoisture cluster with a device RH_MULTIPLIER
factor if required."""
class TuyaRelativeHumidity(RelativeHumidity, TuyaLocalCluster):
"""Tuya local RelativeHumidity cluster with a device RH_MULTIPLIER
factor."""
def update_attribute(self, attr_name: str, value: Any) -> None:
    """Apply a correction factor to value."""

    if attr_name == "measured_value":
        value = value * (
            self.endpoint.device.RH_MULTIPLIER
            if hasattr(self.endpoint.device, "RH_MULTIPLIER")
            else 100
        )
    return super().update_attribute(attr_name, value)

class TemperatureHumidityManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data points."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    1: DPToAttributeMapping(
        TuyaTemperatureMeasurement.ep_attribute,
        "measured_value",
        converter=lambda x: x * 10,  # decidegree to centidegree
    ),
    2: DPToAttributeMapping(
        TuyaRelativeHumidity.ep_attribute,
        "measured_value",
        # converter=lambda x: x * 10,  --> move conversion to

TuyaRelativeHumidity cluster
),
4: DPToAttributeMapping(
TuyaPowerConfigurationCluster2AAA.ep_attribute,
"battery_percentage_remaining",
converter=lambda x: x * 2,  # double reported percentage
),
}
data_point_handlers = {
    1: "_dp_2_attr_update",
    2: "_dp_2_attr_update",
    4: "_dp_2_attr_update",
}

class TemperatureHumidityBatteryStatesManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data
points. Battery states 25, 50 and 100%."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    1: TemperatureHumidityManufCluster.dp_to_attribute[1],
    2: TemperatureHumidityManufCluster.dp_to_attribute[2],
    3: DPToAttributeMapping(
        TuyaPowerConfigurationCluster2AAA.ep_attribute,
        "battery_percentage_remaining",
        converter=lambda x: {0: 25, 1: 50, 2: 100}[x],  # double

reported percentage
),
}
data_point_handlers = {
    1: "_dp_2_attr_update",
    2: "_dp_2_attr_update",
    3: "_dp_2_attr_update",
}

class TuyaTempHumiditySensor(CustomDevice):
"""Custom device representing tuya temp and humidity sensor with
e-ink screen."""
# RelativeHumidity multiplier
RH_MULTIPLIER = 100

signature = {
    # <SimpleDescriptor endpoint=1, profile=260, device_type=81
    # device_version=1
    # input_clusters=[4, 5, 61184, 0]
    # output_clusters=[25, 10]>
    MODELS_INFO: [
        ("_TZE200_bjawzodf", "TS0601"),
        ("_TZE200_zl1kmjqx", "TS0601"),
        ("_TZE200_vvmbj46n", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                TemperatureHumidityManufCluster,  # Single bus for

temp, humidity, and battery
TuyaTemperatureMeasurement,
TuyaRelativeHumidity,
TuyaPowerConfigurationCluster2AAA,
],
OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
}
},
}
class TuyaTempHumiditySensor_Square(CustomDevice):
"""Custom device representing tuya temp and humidity sensor with
e-ink screen."""
# RelativeHumidity multiplier
# RH_MULTIPLIER = 100

signature = {
    MODELS_INFO: [
        ("_TZE200_a8sdabtg", "TS0601"),  # Variant without screen, round
        ("_TZE200_qoy0ekbd", "TS0601"),
        ("_TZE200_znbl8dj5", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            # "profile_id": 260, "device_type": "0x0302",
            # "in_clusters": ["0x0000","0x0001","0x0402","0x0405"],
            # "out_clusters": ["0x000a","0x0019"]
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                TuyaPowerConfigurationCluster2AAA.cluster_id,
                TemperatureMeasurement.cluster_id,
                RelativeHumidity.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                TuyaPowerConfigurationCluster2AAA,
                TemperatureHumidityManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class TuyaTempHumiditySensorVar03(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_qyflbnbj", "TS0601"),
        ("_TZE200_utkemkbs", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class TuyaTempHumiditySensorVar04(CustomDevice):
"""Tuya temp and humidity sensor (variation 04)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_yjjdcqsq", "TS0601"),
        ("_TZE200_9yapgbuv", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityBatteryStatesManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class SoilManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data points."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    5: DPToAttributeMapping(
        TuyaTemperatureMeasurement.ep_attribute,
        "measured_value",
        converter=lambda x: x * 100,
    ),
    3: DPToAttributeMapping(
        TuyaSoilMoisture.ep_attribute,
        "measured_value",
        converter=lambda x: x * 100,
    ),
    15: DPToAttributeMapping(
        TuyaPowerConfigurationCluster2AAA.ep_attribute,
        "battery_percentage_remaining",
        converter=lambda x: x * 2,  # double reported percentage
    ),
}

data_point_handlers = {
    3: "_dp_2_attr_update",
    5: "_dp_2_attr_update",
    15: "_dp_2_attr_update",
}

class TuyaSoilSensor(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_myd45weu", "TS0601"),
        ("_TZE200_ga1maeof", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                SoilManufCluster,
                TuyaTemperatureMeasurement,
                TuyaSoilMoisture,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

El jue, 29 feb 2024 a las 17:50, Paul Sijben @.***>)
escribió:

Hi @richardcc https://github.com/richardcc , looks like the attachment
did not make it. Could you please upload that one separately?
—
Reply to this email directly, view it on GitHub
https://github.com/zigpy/zha-device-handlers/issues/2732#issuecomment-1971552087,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMEAJKANGQV5ZR4SKLYCPTYV5N5HAVCNFSM6AAAAAA7DP4T46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGU2TEMBYG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Un Saludo

By the way my sensor is identified as: TS0601 /  _TZE200_vvmbj46n
BR
Ricardo
El jue, 29 feb 2024 a las 19:17, Ricardo Alba @.***>)
escribió:

Let me know if you can get it from here. Otherwise I'll try to upload the
file.
"""Tuya temp and humidity sensors."""
from typing import Any, Dict
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time
from zigpy.zcl.clusters.measurement import (
RelativeHumidity,
SoilMoisture,
TemperatureMeasurement,
)
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
SKIP_CONFIGURATION,
)
from zhaquirks.tuya import TuyaLocalCluster, TuyaPowerConfigurationCluster2AAA
from zhaquirks.tuya.mcu import DPToAttributeMapping, TuyaMCUCluster
class TuyaTemperatureMeasurement(TemperatureMeasurement, TuyaLocalCluster):
"""Tuya local TemperatureMeasurement cluster."""
class TuyaSoilMoisture(SoilMoisture, TuyaLocalCluster):
"""Tuya local SoilMoisture cluster with a device RH_MULTIPLIER factor if required."""
class TuyaRelativeHumidity(RelativeHumidity, TuyaLocalCluster):
"""Tuya local RelativeHumidity cluster with a device RH_MULTIPLIER factor."""
def update_attribute(self, attr_name: str, value: Any) -> None:
    """Apply a correction factor to value."""

    if attr_name == "measured_value":
        value = value * (
            self.endpoint.device.RH_MULTIPLIER
            if hasattr(self.endpoint.device, "RH_MULTIPLIER")
            else 100
        )
    return super().update_attribute(attr_name, value)

class TemperatureHumidityManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data points."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    1: DPToAttributeMapping(
        TuyaTemperatureMeasurement.ep_attribute,
        "measured_value",
        converter=lambda x: x * 10,  # decidegree to centidegree
    ),
    2: DPToAttributeMapping(
        TuyaRelativeHumidity.ep_attribute,
        "measured_value",
        # converter=lambda x: x * 10,  --> move conversion to TuyaRelativeHumidity cluster
    ),
    4: DPToAttributeMapping(
        TuyaPowerConfigurationCluster2AAA.ep_attribute,
        "battery_percentage_remaining",
        converter=lambda x: x * 2,  # double reported percentage
    ),
}

data_point_handlers = {
    1: "_dp_2_attr_update",
    2: "_dp_2_attr_update",
    4: "_dp_2_attr_update",
}

class TemperatureHumidityBatteryStatesManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data points. Battery states 25, 50 and 100%."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    1: TemperatureHumidityManufCluster.dp_to_attribute[1],
    2: TemperatureHumidityManufCluster.dp_to_attribute[2],
    3: DPToAttributeMapping(
        TuyaPowerConfigurationCluster2AAA.ep_attribute,
        "battery_percentage_remaining",
        converter=lambda x: {0: 25, 1: 50, 2: 100}[x],  # double reported percentage
    ),
}

data_point_handlers = {
    1: "_dp_2_attr_update",
    2: "_dp_2_attr_update",
    3: "_dp_2_attr_update",
}

class TuyaTempHumiditySensor(CustomDevice):
"""Custom device representing tuya temp and humidity sensor with e-ink screen."""
# RelativeHumidity multiplier
RH_MULTIPLIER = 100

signature = {
    # <SimpleDescriptor endpoint=1, profile=260, device_type=81
    # device_version=1
    # input_clusters=[4, 5, 61184, 0]
    # output_clusters=[25, 10]>
    MODELS_INFO: [
        ("_TZE200_bjawzodf", "TS0601"),
        ("_TZE200_zl1kmjqx", "TS0601"),
        ("_TZE200_vvmbj46n", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                TemperatureHumidityManufCluster,  # Single bus for temp, humidity, and battery
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class TuyaTempHumiditySensor_Square(CustomDevice):
"""Custom device representing tuya temp and humidity sensor with e-ink screen."""
# RelativeHumidity multiplier
# RH_MULTIPLIER = 100

signature = {
    MODELS_INFO: [
        ("_TZE200_a8sdabtg", "TS0601"),  # Variant without screen, round
        ("_TZE200_qoy0ekbd", "TS0601"),
        ("_TZE200_znbl8dj5", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            # "profile_id": 260, "device_type": "0x0302",
            # "in_clusters": ["0x0000","0x0001","0x0402","0x0405"],
            # "out_clusters": ["0x000a","0x0019"]
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                TuyaPowerConfigurationCluster2AAA.cluster_id,
                TemperatureMeasurement.cluster_id,
                RelativeHumidity.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                TuyaPowerConfigurationCluster2AAA,
                TemperatureHumidityManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class TuyaTempHumiditySensorVar03(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_qyflbnbj", "TS0601"),
        ("_TZE200_utkemkbs", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class TuyaTempHumiditySensorVar04(CustomDevice):
"""Tuya temp and humidity sensor (variation 04)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_yjjdcqsq", "TS0601"),
        ("_TZE200_9yapgbuv", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityBatteryStatesManufCluster,
                TuyaTemperatureMeasurement,
                TuyaRelativeHumidity,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

class SoilManufCluster(TuyaMCUCluster):
"""Tuya Manufacturer Cluster with Temperature and Humidity data points."""
dp_to_attribute: Dict[int, DPToAttributeMapping] = {
    5: DPToAttributeMapping(
        TuyaTemperatureMeasurement.ep_attribute,
        "measured_value",
        converter=lambda x: x * 100,
    ),
    3: DPToAttributeMapping(
        TuyaSoilMoisture.ep_attribute,
        "measured_value",
        converter=lambda x: x * 100,
    ),
    15: DPToAttributeMapping(
        TuyaPowerConfigurationCluster2AAA.ep_attribute,
        "battery_percentage_remaining",
        converter=lambda x: x * 2,  # double reported percentage
    ),
}

data_point_handlers = {
    3: "_dp_2_attr_update",
    5: "_dp_2_attr_update",
    15: "_dp_2_attr_update",
}

class TuyaSoilSensor(CustomDevice):
"""Tuya temp and humidity sensor (variation 03)."""
signature = {
    # "profile_id": 260,
    # "device_type": "0x0051",
    # "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],
    # "out_clusters": ["0x000a","0x0019"]
    MODELS_INFO: [
        ("_TZE200_myd45weu", "TS0601"),
        ("_TZE200_ga1maeof", "TS0601"),
    ],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha.PROFILE_ID,
            DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                TemperatureHumidityManufCluster.cluster_id,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

replacement = {
    SKIP_CONFIGURATION: True,
    ENDPOINTS: {
        1: {
            DEVICE_TYPE: zha.DeviceType.TEMPERATURE_SENSOR,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                SoilManufCluster,
                TuyaTemperatureMeasurement,
                TuyaSoilMoisture,
                TuyaPowerConfigurationCluster2AAA,
            ],
            OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
        }
    },
}

El jue, 29 feb 2024 a las 17:50, Paul Sijben @.***>)
escribió:

Hi @richardcc https://github.com/richardcc , looks like the attachment
did not make it. Could you please upload that one separately?
—
Reply to this email directly, view it on GitHub
https://github.com/zigpy/zha-device-handlers/issues/2732#issuecomment-1971552087,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMEAJKANGQV5ZR4SKLYCPTYV5N5HAVCNFSM6AAAAAA7DP4T46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGU2TEMBYG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Un Saludo

--
Un Saludo

@richardcc yes that solved it. Thank you!
Now for my education, I an going to try and find the differences between my (stolen and mutilated ;-) file and yours.

Very happy with this custom quirk for my TS0601 /  _TZE200_vvmbj46n. It's the first time I heard of with quirks, and just tried it, and it works!
Would there be a way to set the time and the date on the device?

How should it be inserted? ?

Hi. Thanks for the quirk.
I own the same Tuya device from Aliexpress. Once adding the custom quirk, although both Temp and Humidity and battery show up as entities, the status remains as Unknown and no data is flowing. Is there any special step of config tweak you performed? Is weird that exactly the same device with same config doesn't work...
Thanks.

In my case, inserted the code by WLCD in one of the github available TS0601.py files at the end and worked after full restart of the docker container wih HA.

Please, can you tell me where I must insert this custom quirk?

How should it be inserted? ?

When I use the quirk the time does not get written to the device properly. It just starts counting from the moment the device is powered on. The date is also not set. I have tried to restart HA and rejoin the device multiple times but that does not help either.
Did you also have the problem with date and time @richardcc @paulsijben  ?


feat(batch): add support to batch api

Changes
add support to openai batch api
New API Checklist

[ ] add POJO、api&service and tests
[ ] update information is required

hi @TheoKanning
I just contributed to address issues#160 by adding support for the OpenAI batch API. Could you please approve the workflow so the checks can run? Thank you!

You can only fork and compile it yourself to implement your requirements. This library has not been maintained for a long time

You can only fork and compile it yourself to implement your requirements. This library has not been maintained for a long time

Found it. Anyway thank your remind

Recommend using [openai4j]（ https://github.com/Lambdua/openai4j ）It's the fork branch of this library.


feature request: frontend ui, move manage extensions into 'Admin' area

if you have many extensions it can be difficult to see where you manage the extensions, so my suggestion is as follows.
move the extensions to the Admin area and call it Manage Extensions.
Rename Admin to Manage and keep Extensions as is.

Doesn't look too bad.
I think it is more consistent this way. The Extensions menu item should not be on the same level as regular extensions.
It also has the advantage that it is not hidden below when many extensions are enabled.

When we are at it, maybe we can also change the extensions icon to one of these (which are quite common elsewhere):

The current icon always seemed confusing to me.

When we are at it, maybe we can also change the extensions icon to one of these (which are quite common elsewhere)?

I vote for the first one.

I looked more into the material icons which seem to be used.
There is a puzzle extension icon here: https://fonts.google.com/icons?icon.set=Material+Icons&selected=Material+Icons+Outlined:extension:&icon.query=extension
However there is no icon like the first one, closest to it is probably the "Apps" icon: https://fonts.google.com/icons?icon.set=Material+Icons&icon.query=apps&icon.platform=web&selected=Material+Icons+Outlined:apps: (which is okayish too I guess)

puzzle!


Import component locally instead of through NPM

Hello, is there a way to import this component locally (in components folder) and require it from there rather than install through NPM? I need to do this because there are some styling changes I wish to make specifically for my own use case and can only make them through the source code (I trialled this by editing my node_modules/terminal-in-react/ specific css within files)
I'm fairly new to React, so I'd love a pointer in the right direction.

I semi-bypassed this by moving the node_modules/terminal-in-react/  to a hidden folder .custom within my root project directory (so it doesn't interfere with Gatsby's build/develop) and simply replaced package.json with this
"terminal-in-react": "file:./.custom/terminal-in-react-custom",
I'm still wondering if there is a better way to do this.

All good - I'm super new to all this, but I used styled components to create a parent wrapper div and changed specific css within that.


Added a yes/no prompt for team removal

oh yeah plus adonis doesnt even run with these changes, it just crashes. please test stuff.


🐛 Error: Cannot find module '@biomejs/cli-linux-x64/biome' on x64 linux host

Environment information
CLI:
  Version:                      1.9.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.2.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?
I just got the exact same issue as described in #3804 during the build running on a x64 linux host. I tried to bump the 1.8.3 version to a newer one 1.9.x but I still have the same error Error: Cannot find module '@biomejs/cli-linux-x64/biome'. Is that something I missing?
Expected result
It should work as intended.
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Well it's kind of hard to reproduce since it only happens at build time on a x86 linux host. Everything's fine otherwise.

PR welcome. The person of the other issue identified the bug and the solution

@mrabdibdi-anvil We use Biome in GitHub Actions w Ubuntu as well. No issues there using Biome 1.9.2.
Perhaps your npm/yarn lock file needs to be deleted, and re-install. Could be due to different architectures between your PC and the Actions environment.
Ran into a similar issue before, using the Sharp js library.

Hi there! Apologies for the delayed response. it’s been a crazy week.
It turns out I was mistaken about the error. it wasn't directly related to the issue itself or caused by Biome. The problem stemmed from conflicts in my lock file after adding new dependencies. I'm not entirely sure what went wrong, but I resolved it by checking out the lock file from the main branch, performing a clean install, and then re-installing the new dependencies.

What did you do to fix this? I'm running Fedora 41, when I install biomejs for some reason it doesn't load or install the binaries, so I'm getting the same error. On other projects I've never had to deal with this in other projects though we share the same settings, possibly due to the binary already there from previous versions? @Lornz-
I use bun, so when I delete node_modules folder and I run biome through bunx, for example bunx @biomejs/biome check --write ., it works perfectly fine, when I then run bun install and after I run it again bunx @biomejs/biome check --write . I get the same error.

As @ematipico said to me in #4660:

It's possible that bun isn't installing the optional dependencies for your OS, in particular the package @biomejs/cli-linux-x64. Package managers usually install the optional dependencies themselves, but this doesn't seem to be the case in your case.
I would file an issue with Bun at this point, because other package managers don't have this issue.
As a workaround, you can install the dependency yourself:
bun install @biomejs/cli-linux-x64

Hello,
i have this issue with Github Action using Ubuntu-latest and nodejs 20

Tried using the package.json (works locally, with turbo and with docker on macos)
Tried using explicit npx @biomejs/biome ... (show the error on github action, works on macos)
Tried installing globally npm install -g<EMAIL_ADDRESS>(show the error on github action)

I found a workaround for the following problem: https://github.com/okineadev/okineadev-website/blob/908bf907cfa9e4260d0367747af77ec210a7563e/.github/workflows/static.yml#L52-L53


Added a dump option to the knex CLI

Goal
To have a database dump option which is useful for things like back ups. This commit only changes the knex CLI by adding the dump:db option.
I've been able to test it on mysql and Sqlite because those are the DBs I currently have access to.
Test it out

Run npm i stanleymasinde/knex
npx knex schema:dump

That should work okay unless you are using esm like in my case where you'll have to specify all the options e.g npx knex schema:dump --esm --knexfile knexfile.cjs
Your database (The one in config) will be available as .sql in the root of your folder. You can specify the filename with --output

Coverage decreased (-0.2%) to 92.059% when pulling 414352df06f1ac4e83d5e6f695312cfbad4e183f on StanleyMasinde:master into 24c32f9e58dfe51cc51ea8748467937733ceb9ce on knex:master.

Hey @OlivierCavadenti could you please review this so that I can know where to make further changes?

Can you please add full integration test?

Can you please add full integration test?

Sure let me do that


lack of detection of local variable and global variable using same name

for example:
var c redis.Conn
func main() {
	c, err := redis.Dial("tcp", "redis:6379")
	defer c.Close()
	http.HandleFunc("/", Returnresult)
	http.ListenAndServe(":"+port, nil)
}

func Returnresult(rw http.ResponseWriter, r *http.Request) {
	n, err := redis.Int(c.Do("INCR", "counter"))
....
}

this code will produce a panic because c in Returnresult is a nil pointer.

It happens, but you learn to avoid it, and typically discover it easily enough. Golint isn't the right tool to detect that anyway. Govet has a -shadow flag that is awfully noisy but I believe would spot something like this.


Download of latest k8s kubectl artefacts failing

Not sure where exactly to report this.
What happened:
Since the release of 1.27.7, 1.26.10 and 1.25.15 the download for certain binaries from https://dl.k8s.io seems broken.
What you expected to happen:
That the download of released binaries works as usual.
How to reproduce it (as minimally and precisely as possible):

go to https://www.downloadkubernetes.com
try to download kubectl version 1.27.7 for linux amd64

Anything else we need to know?:
This seems to apply only for certain files.
The file https://dl.k8s.io/v1.27.7/bin/linux/amd64/kubectl.sha256 is present but the actual kubectl binary is missing.
ERROR: 	download of 'https://dl.k8s.io/v1.27.7/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.26.10/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.25.15/bin/linux/amd64/kubectl.sha256' failed
ERROR: 	download of 'https://dl.k8s.io/v1.25.15/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.26.10/bin/windows/amd64/kubectl.exe' failed

Hi,
it seems that two of them have been fixed:
ERROR: 	download of 'https://dl.k8s.io/v1.27.7/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.25.15/bin/linux/amd64/kubectl.sha256' failed

These are still broken:
ERROR: 	download of 'https://dl.k8s.io/v1.26.10/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.25.15/bin/linux/amd64/kubectl' failed
ERROR: 	download of 'https://dl.k8s.io/v1.26.10/bin/windows/amd64/kubectl.exe' failed

It seems like someone is working on it.
now https://dl.k8s.io/v1.25.15/bin/linux/amd64/kubectl works as well.

Little update:
we are now down to https://dl.k8s.io/v1.26.10/bin/linux/amd64/kubectl which is notworking. The rest seems now available.

I'm here because I was going to report this but anyway thanks for the issue. Actually right now waiting for https://dl.k8s.io/v1.26.10/bin/linux/amd64/kubectl

I currently doubt that anyone is actually reading this here. It is worrying that one of the biggest internet companies can't fix a (from the outside simple looking) deployment issue faster. Maybe it is the default and I just noticed it because I just started pulling data from this endpoint.

I think for better visibility we can transfer this to kubernetes repo instead kubectl;
/transfer kubernetes


Azure App Configuration Push task does not support Service Principal using cert based authentication

I am getting an error "Invalid authentication type. Certificate based authentication is not supported." when using a Service Principal using Cert based authentication to deploy to App Configuration using "Azure App Configuration Push " task in Azure DevOps.
Our company standard is to use ONLY certificates for authentication.   Using the pipeline is the most elegant way to deploy App Configurations and not being able to do it is very disappointing.
Could you please allow SP with cert based authentication to push configurations, using "Azure App Configuration Push " task?

Hello @sharvaridesai123
This would be an enhancement to our existing pipeline task. It isn't a committed item on our roadmap at this point, but we will be sure to respond with updates if we decide to take add this enhancement. I know it isn't as elegant, as you mentioned, but an alternative today is to use the Azure CLI for interacting with Azure App Configuration in a DevOps pipeline.

Hello @sharvaridesai123  a new release is out for Azure App Configuration Task version - 3.5.16 and Azure App Configuration Push Task version - 1.4.4, they include the enhancement to support cert based authentication. Please feel free to check it out. In case of any questions please feel free to reach out.


Den Search isn't working on OFW save.

Hi Leanny. I'm having trouble opening the plugin when I'm using PKHeX to view my OFW save. It's like most problems reported before where I got that error when I open Den Search, except that I'm using latest versions of everything. It works perfectly fine on my save in CFW, but the OFW save just won't work. My guess is probably because of preload data of the DLC. Should I delete the DLC and redownload later for it to work?
Link to my save file: https://drive.google.com/file/d/1rHHb_IYJmoKEYTdw9zquzMPDF6mSb3K8/view?usp=sharing

Sorry for the super late response. I cannot reproduce this issue with the current development version, so I guess its fixed. I will push the new version in a bit

Thank you for the reply. I got it working.


Controlling order of execution of Application Customizers ?

Category

[x] Question
[ ] Bug
[ ] Enhancement

I have created an extension which makes use of the top place holder and display additional menus in the site.  Now I am in need of creating another extension that conditionally displays notifications/announcements in the top place holder region. A separate place holder element is getting created for both the extensions. However I want the notifications to be always present at top of the page, and I am not seeing any way to control that. Is there any way we could handle this scenario ?

hey @kmprasad4u
description is a bit not clear, maybe you could share repo or some visualisation of what you want to achieve?

Here is a simplified version...

Need the "notification" to be always present at top, irrespective of which customizer loads first.

Hi @kmprasad4u
Can you make it both combined in a single application customizer. You can design the notification component on the top followed by the menu. So you don't have to worry about the loading sequence.

Yes that is what we are doing for now as we have control over both solutions. There may be instances where that may not be true.

@kmprasad4u did you ever resolve this issue?
I'll go ahead and close this issue as it appears (somewhat) answered. If you still need help with this, please open a new issue.


Error: Upload source maps to Bugsnag on eas build

Describe the bug
I am encountering an error when generating a build with EAS:
eas build --profile preview --platform ios --local

The error message is:
[RUN_FASTLANE] ⚠  Script has ambiguous dependencies causing it to run on every build.
   To fix, go to: Xcode » [project] » Build Phases » 'Upload source maps to Bugsnag'
   Either: Uncheck "Based on dependency analysis", or select output files to trigger the script

Steps to reproduce

Run the command eas build --profile preview --platform ios --local.
Observe the error message related to ambiguous dependencies in the Bugsnag script.

Environment
"@bugsnag/expo": "^50.0.0",
"expo": "^50.0.14",

Hi @Brunowilliang
The error message you have shared (Script has ambiguous dependencies causing... ) is not actually an error message, rather it is a warning that the build phase will run on every build. This is expected behaviour and will not be the source of a build failure.
Are you able to share any other error messages from the build logs with us for further investigation?

I am having almost the same issue but my error message is
The following build commands failed:
PhaseScriptExecution Upload\ source\ maps\ to\ Bugsnag /Users/expo/Library/Developer/Xcode/DerivedData/MyFOBx-aewultoaqcctcddqtcgcnwgrbsym/Build/Intermediates.noindex/ArchiveIntermediates/MyFOBx/IntermediateBuildFilesPath/MyFOB.build/Release-iphoneos/MyFOB.xbuild/Script-20B5157C496745F3A31EB2E0.sh (in target 'MyFOBx' from project 'MyFOBx')
(1 failure)
Environment
"@bugsnag/expo": "^49.0.0",
"expo": "~49.0.15",
"@bugsnag/plugin-expo-eas-sourcemaps": "^49.0.0",
"@bugsnag/source-maps": "^2.3.1",

Hi @opmat
Unfortunately there's not a lot to go on with that error message, although it appears like it may be attempting to upload a .sh file, rather than a mapping file. Could you please share some more information for us to look into this:

How did you set up BugSnag and the EAS plugin in your application? For example, did you use our CLI, or did you perform a manual setup?
Can you please share the exact command you are running, along with any additional flags/parameters before you are encountering this error? E.g. eas build --platform ios
Can you also share some snippets from your app of the required BugSnag configuration in your app.json/app.config.js? As outlined here: https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/#eas-build

As this is a public thread, please feel free to open a ticket with us directly by contacting<EMAIL_ADDRESS>referencing this GitHub issue and sharing any necessary information for us to further investigate this.

@mclack
Thanks for the feedback.
I setup Bugsnag using thee instruction on https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration

as at today, I have the following Connfiguration
"@bugsnag/expo": "^49.0.0",
"expo": "~49.0.15",
"@bugsnag/plugin-expo-eas-sourcemaps": "^49.0.0",
"@bugsnag/source-maps": "^2.3.1",

The command I am running is
 eas build --profile production -p ios --auto-submit

app.json snippet
"plugins": [  "@bugsnag/plugin-expo-eas-sourcemaps" ], "extra": {   "bugsnag": {     "apiKey": "04db3cdf95c7922c70a0477d2cf4ca25"   } }

Hi, I am also facing the error during eas build --local.
Below is my environment:
"@bugsnag/expo": "^51.0.0",
"expo": "~51.0.26",
"@bugsnag/plugin-expo-eas-sourcemaps": "^51.0.0",
"@bugsnag/source-maps": "^2.3.3",

I think here is the relevant log from xCode:
+ [[ true == true ]]
+ HBC_SOURCEMAP_FILE=/Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/BuildProductsPath/Release-iphoneos/GamesTracker.app/main.jsbundle.map
+ /private/var/folders/2r/4g55b_896rjgjlflst81bfrw0000gn/T/eas-build-local-nodejs/a6078bbc-7d13-40c9-8621-1fe7de841955/build/node_modules/@sentry/cli-darwin/bin/sentry-cli /private/var/folders/2r/4g55b_896rjgjlflst81bfrw0000gn/T/eas-build-local-nodejs/a6078bbc-7d13-40c9-8621-1fe7de841955/build/node_modules/react-native/scripts/compose-source-maps.js /Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/BuildProductsPath/Release-iphoneos/main.jsbundle.map /Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/BuildProductsPath/Release-iphoneos/GamesTracker.app/main.jsbundle.map -o /Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/IntermediateBuildFilesPath/GamesTracker.build/Release-iphoneos/GamesTracker.build/DerivedSources/main.jsbundle.map
node:internal/fs/utils:356
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/BuildProductsPath/Release-iphoneos/main.jsbundle.map'
    at Object.openSync (node:fs:596:3)
    at Object.readFileSync (node:fs:464:35)
    at Object.<anonymous> (/private/var/folders/2r/4g55b_896rjgjlflst81bfrw0000gn/T/eas-build-local-nodejs/a6078bbc-7d13-40c9-8621-1fe7de841955/build/node_modules/react-native/scripts/compose-source-maps.js:34:8)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/GamesTracker-ghcuxcrmaomrqffdafkpgtpscwzg/Build/Intermediates.noindex/ArchiveIntermediates/GamesTracker/BuildProductsPath/Release-iphoneos/main.jsbundle.map'
}

Node.js v18.20.4
Command PhaseScriptExecution failed with a nonzero exit code

Hi @opmat,
You've already received a response to the ticket you opened with us in Support, which is now closed, but for completeness and future use, I'm also reporting it here.
We have tried to reproduce what you are experiencing but we haven't been able to. Unfortunately, the logs provided don't give us enough additional information and it's difficult for us to say or investigate exactly why CFBundleShortVersionString can't be found.
We can't investigate any further at this time, but we would be happy to reopen the case if you could provide a stripped down reproduction of your application that replicates this behaviour.

Hi @summerkiflain,
The problem you experience is not something we can test. Like my colleague Christian mentioned in the other issue, we would recommend to only use BugSnag or Sentry due to the high potential for conflicts between the two SDKs.

The Bugsnag config plugin is changing where main.jsbundle.map is output (see here). Then the bundle phase fails because it no longer knows where to find the file.


Test project fails to build with IL2CPP on Unity 2018.3.6f1.

Produces this error:
Unable to cast object of type 'Mono.Cecil.RequiredModifierType' to type 'Mono.Cecil.ByReferenceType'.

Submitted a bug report to Unity since the bug is on their side.

Fixed in subsequent versions.


Fix parsing metadata with non-string types

Found this when trying to parse @dergigi's metadata, it has some fields that are not strings so it would fail. This makes it so it skips over non-string items that we don't understand
example:
{
  "id": "6cae3971652c112a5cf75042cc98c4bb186b8a9b03577c244364bc884bd5f58e",
  "pubkey": "6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93",
  "created_at":<PHONE_NUMBER>,
  "kind": 0,
  "tags": [],
  "content": "{\"reactions\":false,\"about\":\"building opensats.org • writing 21waysbook.com • shipping sovereignengineering.io • painting twentyone.world • maintaining bitcoin-resources.com & nostr-resources.com • starting toomanyprojects.xyz 🥔\",\"picture\":\"https://dergigi.com/assets/images/avatar-laser.jpg\",\"damus_donation_v2\":0,\"banner\":\"https://cdn.nostr.build/i/0aeb7560c271bbb1cef00760989acd9dd3f37bdc42b37852eecb0d0b70a3e862.jpg\",\"nip05\":\"_@dergigi.com\",\"lud16\":\"dergigi@getalby.com\",\"username\":\"dergigi\",\"display_name\":\"Gigi ⚡🧡\",\"website\":\"https://dergigi.com\",\"lud06\":\"\",\"displayName\":\"Gigi ⚡🧡\",\"name\":\"Gigi ⚡🧡\"}",
  "sig": "bbdc06539a4bc0201bad8006c54d6b0edb55177d223e6d8d92997fa8e7c779fb0159ecdb318e1258460d2f687218994af55e93eb003dd64b817c746ba7a9e5a8"
}

Closes #236

would this also account for my issue where my user is sending in a number for JSON? can we add that test please.
https://github.com/rust-nostr/nostr/issues/236

@miketwenty1 added

ACK via https://github.com/rust-nostr/nostr/commit/e365eebd7188003531dedf98019531a8f75038d7

closes https://github.com/rust-nostr/nostr/issues/236
Verified the fix in production :D


Extend login token lifetime

Make login auth token last a week on web (ideally forever until logout on mobile only).

Sorry this is a duplicate


fix the menubar example

The menubar example cannot compile , and I fix it
And I am confused that you only have MenuTree function, but in the docs it is Tree, Is it because your doc has not update?

I see , the example is in the git..

I got a mistake,,


File search doesnt find files

C-F doesnt detect file patterns. It detects only folders.
The issue is in this regular expression:
copycat.tmux
if stored_search_not_defined "$file_search"; then
	tmux set-option -g "${COPYCAT_VAR_PREFIX}_${file_search}" "(^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*"
fi

I have the same issue, and am using Ubuntu 18.04.

About "file search doesn't find files" - see limitations here https://github.com/tmux-plugins/tmux-copycat/blob/master/docs/limitations.md

Examples: non-perfect file and url matching and selection

If you guys have a better idea how to match files with a regex you can define your own "file search" mapping or override the default. If you think you have a better solution than this plugin then feel free to open a PR.


Only able to run pod delete experiment

Question
So we have a 1 node cluster and we are trying to run chaos experiments on it. We were able to run the pod delete experiment on our deployment but not pod-cpu-hog and pod-memory-hog. We keep getting this error even after editing the chaos engine.yaml file to suit our deployment.
 failedStep: '{"errorCode":"STATUS_CHECKS_ERROR","phase":"ChaosInject","reason":"helper
        status check failed: no pods found with mathcing
        labels","target":"{podLabel: app=pod-cpu-hog-helper-uldogk, namespace:
        litmus}"}'

Here is  the engine.yaml file:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: custom-1687958347
  namespace: litmus
spec:
  arguments:
    parameters:
      - name: adminModeNamespace
        value: litmus
  entrypoint: custom-chaos
  securityContext:
    runAsNonRoot: true
    runAsUser: 1000
  serviceAccountName: argo-chaos
  templates:
    - name: custom-chaos
      steps:
        - - name: install-chaos-experiments
            template: install-chaos-experiments
        - - name: pod-cpu-hog-vkc
            template: pod-cpu-hog-vkc
    - name: install-chaos-experiments
      inputs:
        artifacts:
          - name: pod-cpu-hog-vkc
            path: /tmp/pod-cpu-hog-vkc.yaml
            raw:
              data: >
                apiVersion: litmuschaos.io/v1alpha1

                description:
                  message: |
                    Injects cpu consumption on pods belonging to an app deployment
                kind: ChaosExperiment

                metadata:
                  name: pod-cpu-hog
                  labels:
                    name: pod-cpu-hog
                    app.kubernetes.io/part-of: litmus
                    app.kubernetes.io/component: chaosexperiment
                    app.kubernetes.io/version: 3.0.0-beta3
                spec:
                  definition:
                    scope: Namespaced
                    permissions:
                      - apiGroups:
                          - ""
                        resources:
                          - pods
                        verbs:
                          - create
                          - delete
                          - get
                          - list
                          - patch
                          - update
                          - deletecollection
                      - apiGroups:
                          - ""
                        resources:
                          - events
                        verbs:
                          - create
                          - get
                          - list
                          - patch
                          - update
                      - apiGroups:
                          - ""
                        resources:
                          - configmaps
                        verbs:
                          - get
                          - list
                      - apiGroups:
                          - ""
                        resources:
                          - pods/log
                        verbs:
                          - get
                          - list
                          - watch
                      - apiGroups:
                          - ""
                        resources:
                          - pods/exec
                        verbs:
                          - get
                          - list
                          - create
                      - apiGroups:
                          - apps
                        resources:
                          - deployments
                          - statefulsets
                          - replicasets
                          - daemonsets
                        verbs:
                          - list
                          - get
                      - apiGroups:
                          - apps.openshift.io
                        resources:
                          - deploymentconfigs
                        verbs:
                          - list
                          - get
                      - apiGroups:
                          - ""
                        resources:
                          - replicationcontrollers
                        verbs:
                          - get
                          - list
                      - apiGroups:
                          - argoproj.io
                        resources:
                          - rollouts
                        verbs:
                          - list
                          - get
                      - apiGroups:
                          - batch
                        resources:
                          - jobs
                        verbs:
                          - create
                          - list
                          - get
                          - delete
                          - deletecollection
                      - apiGroups:
                          - litmuschaos.io
                        resources:
                          - chaosengines
                          - chaosexperiments
                          - chaosresults
                        verbs:
                          - create
                          - list
                          - get
                          - patch
                          - update
                          - delete
                    image: litmuschaos/go-runner:3.0.0-beta3
                    imagePullPolicy: Always
                    args:
                      - -c
                      - ./experiments -name pod-cpu-hog
                    command:
                      - /bin/bash
                    env:
                      - name: TOTAL_CHAOS_DURATION
                        value: "60"
                      - name: CPU_CORES
                        value: "1"
                      - name: CPU_LOAD
                        value: "100"
                      - name: PODS_AFFECTED_PERC
                        value: ""
                      - name: RAMP_TIME
                        value: ""
                      - name: LIB_IMAGE
                        value: litmuschaos/go-runner:3.0.0-beta3
                      - name: STRESS_IMAGE
                        value: alexeiled/stress-ng:latest-ubuntu
                      - name: CONTAINER_RUNTIME
                        value: docker
                      - name: SOCKET_PATH
                        value: /var/run/docker.sock
                      - name: TARGET_PODS
                        value: ""
                      - name: NODE_LABEL
                        value: ""
                      - name: SEQUENCE
                        value: parallel
                    labels:
                      name: pod-cpu-hog
                      app.kubernetes.io/part-of: litmus
                      app.kubernetes.io/component: experiment-job
                      app.kubernetes.io/runtime-api-usage: "true"
                      app.kubernetes.io/version: 3.0.0-beta3

  container:
    args:
      - kubectl apply -f /tmp/pod-cpu-hog-vkc.yaml -n
        {{workflow.parameters.adminModeNamespace}} &&  sleep 30
    command:
      - sh
      - -c
    image: litmuschaos/k8s:3.0.0-beta3
- name: pod-cpu-hog-vkc
  inputs:
    artifacts:
      - name: pod-cpu-hog-vkc
        path: /tmp/chaosengine-pod-cpu-hog-vkc.yaml
        raw:
          data: |
            apiVersion: litmuschaos.io/v1alpha1
            kind: ChaosEngine
            metadata:
              namespace: "{{workflow.parameters.adminModeNamespace}}"
              generateName: pod-cpu-hog-vkc
              labels:
                workflow_run_id: "{{workflow.uid}}"
            spec:
              engineState: active
              appinfo:
                appns: emojivoto
                applabel: kube-monkey/identifier=monkey-victim
                appkind: deployment
              chaosServiceAccount: litmus-admin
              experiments:
                - name: pod-cpu-hog
                  spec:
                    components:
                      env:
                        - name: TOTAL_CHAOS_DURATION
                          value: "60"
                        - name: CPU_CORES
                          value: "1"
                        - name: PODS_AFFECTED_PERC
                          value: ""
                        - name: CONTAINER_RUNTIME
                          value: docker
                        - name: SOCKET_PATH
                          value: /var/run/docker.sock
                    probe: []
  container:
    args:
      - -file=/tmp/chaosengine-pod-cpu-hog-vkc.yaml
      - -saveName=/tmp/engine-name
    image: litmuschaos/litmus-checker:3.0.0-beta3

Hi @senju-hashirama,
Thanks for checking out in experiments, On looking into the issue seems like the app details were not passed correctly.
Can you please pass the below envs as well in ChaosEngine?
                       - name: APP_NAMESPACE
                          value: ""
                        - name: APP_LABEL
                          value: ""
                        - name: APP_KIND

@senju-hashirama - the issue seems to be an inability to create the helper pod (you can see the error message calls out that it couldn't detect a pod with the label app=pod-cpu-hog-helper-uldogk).
Also, can you share what is the kubernetes environment in use here?


Add django-htmx

Closes #14

django-htmx

htmx
Rapid Prototyping with Django, htmx, and Tailwind CSS

htmx is a library that allows you to access modern browser features like AJAX, CSS Transitions, WebSockets, and Server-Sent Events directly from HTML, rather than using JavaScript. It allows you to build user interfaces quickly directly in markup.

htmx extends several features already built into the browser, like making HTTP requests and responding to events. For example, rather than only being able to make GET and POST requests via a and form elements, you can use HTML attributes to send GET, POST, PUT, PATCH, or DELETE requests on any HTML element: <button hx-delete="/user/1">Delete</button>

tailwind

Tailwind CSS is a "utility-first" CSS framework. Rather than shipping pre-built components (which frameworks like Bootstrap and Bulma specialize in), it provides building blocks in the form of utility classes that enable one to create layouts and designs quickly and easily.

Recommends installing pytailwindcss, django compressor as well.

//  tailwind.config.js
module.exports = {
  content: [
    './templates/**/*.html',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Take note of the content section. Here, you configure paths to your project's HTML templates. Tailwind CSS will scan your templates, searching for Tailwind class names. The generated output CSS file will only contain CSS for the relevant class names found in your template files. This helps to keep the generated CSS files small since they will only contain the styles that are actually being used.


[website] Update Java 11 and Spark roadmap

R: @mwalenia

Preview URL
https://apache-beam-website-pull-requests.storage.googleapis.com/10819/index.html

LGTM, thanks! Merging


CNN-based AutoEncoder for Image Outlier Detection

The current autoencoder and VAE only supports 2-d data, while there is a need to handle 3-d images. PR welcomed!

Hi I'm interested in working on this.


Make shared libraries create, upgrade not accept pip args

[x] I have added an entry to docs/changelog.md

Summary of changes
Closes #544
Changed the shared libs create and upgrade functions to no longer accept pip_args, which used to be applied inconsistently, sometimes taken from a recent pipx install, sometimes not at all.  Now they are never applied.  There are a lot of pip arguments that can even break the installation and/or upgrade of shared libraries (see example in #544).
It is assumed that PIP_ environment variables can be used if pip behavior in pipx needs to be controlled consistently.
Also changed in create():
pip install --upgrade --ignore-installed pip setuptools wheel

to
pip install --upgrade --force-reinstall pip setuptools wheel

As it seems safer to force a reinstall than just to ignore the old libraries.  This code is meant to force a fetch of a fresh pip from pypi to ignore any odd system custom pip version.
Incidental change: on the verbose display of shared libraries age in seconds, I removed the display of fractional seconds! 😄
Test plan

Tested by running
# command(s) to exercise these changes

Also!  I modified one and disabled another test involving kaggle temporarily, because without 2020-resolver some dependencies of kaggle can cause pip installation to fail due to version conflicts.

Ugh, urllib3 1.26 was released and it seems to break a lot of test packages.  I might just wait until pip 20.3 arrives (it should be soon, right?) and the 2020-resolver is default before trying to merge this.  The tests should hopefully work then.