External integration - Devmel

Hello,

New external integration to control shutters, switches, lamps, and sensors from a Devmel AirSend radio gateway. :wink:

Available on the store in about an hour :wink:

Version 2 is out with widgets, triggers, and actions :slight_smile:
Bug fixes are also part of the package :wink:

Hello

I just integrated the DEVEMEL integration and I control all my SOMFY IO and RTS shutters, I have a Tubauto gate and it gives me an error when I want to integrate it to Gladys I copied the Json file as described in the Doc

I don’t know if you can help me here is the code

HTTP 422 — UNPROCESSABLE_ENTITY — t_device_feature.min cannot be null; t_device_feature.max cannot be null

Xavier

Thanks for the report

This is normally fixed in version 2.0.3

The cause

  • Your Tubauto portal is declared as a « button » (type 4096).
  • In Gladys, each function of a device must have a min and a max value.
  • The integration code did not set these values for 3 cases: the button (portals, garages), the switch (type 4097) and the on/off of the lights (type 4100).
  • Gladys therefore refused to create the device, hence the 422 error.
  • Shutters already have these values, which is why they work.

The fix

  • I added min: 0 and max: 1 to the 3 cases, in src/devices/button.js, src/devices/switchDevice.js and src/devices/light.js.
  • I added a test that checks that each function has a min and a max. Without the fix, this test fails. With it, all 249 tests pass and the code check is good.

Thanks for the feedback, it’s good, it works now :slightly_smiling_face: