Comptabilité ampoule yeelight

Did you try a full re-detection first to recreate the peripherals in Gladys?
Do you have another bulb/strip?
Otherwise, in the detection logs you can see the model that’s detected; I think it’s not known by the service…

I’m trying a test again tonight.

I reinstalled your image after removing the old one, and deleted the database.

Voila ce que je peux te donner comme logs avec des erreurs après avoir effectué le scan

2022-12-19T21:50:56+0100 <error> index.js:15 (process.<anonymous>) unhandledRejection catched: Promise {
  <rejected> Error: Not running
      at new NodeError (node:internal/errors:393:5)
      at healthCheck (node:dgram:908:11)
      at Socket.close (node:dgram:740:3)
      at /src/server/services/yeelight/node_modules/yeelight-awesome/src/discover.ts:177:29
      at new Promise (<anonymous>)
      at Discover.destroy (/src/server/services/yeelight/node_modules/yeelight-awesome/src/discover.ts:174:16)
      at Timeout._onTimeout (/src/server/services/yeelight/lib/device/discover.js:28:22)
      at listOnTimeout (node:internal/timers:564:17)
      at processTimers (node:internal/timers:507:7) {
    code: 'ERR_SOCKET_DGRAM_NOT_RUNNING'
  }
}
2022-12-19T21:50:56+0100 <error> index.js:16 (process.<anonymous>) Error: Not running
    at new NodeError (node:internal/errors:393:5)
    at healthCheck (node:dgram:908:11)
    at Socket.close (node:dgram:740:3)
    at /src/server/services/yeelight/node_modules/yeelight-awesome/src/discover.ts:177:29
    at new Promise (<anonymous>)
    at Discover.destroy (/src/server/services/yeelight/node_modules/yeelight-awesome/src/discover.ts:174:16)
    at Timeout._onTimeout (/src/server/services/yeelight/lib/device/discover.js:28:22)
    at listOnTimeout (node:internal/timers:564:17)
    at processTimers (node:internal/timers:507:7) {
  code: 'ERR_SOCKET_DGRAM_NOT_RUNNING'
}

My LED strip is found immediately.

I can add it to a dashboard

I can control the strip from the dashboard but still get no feedback if I control it from my Yeelight app or Node-RED.

The various errors when using it

2022-12-19T21:58:31+0100 <error> device.poll.js:24 (DeviceManager.poll) NotFoundError: YEELIGHT_DEVICE_NOT_FOUND
    at YeelightHandler.poll (/src/server/services/yeelight/lib/device/poll.js:60:11)
2022-12-19T22:00:01+0100 <error> device.poll.js:23 (DeviceManager.poll) There was an error while polling device yeelight-0x00000000156f48b5

This is the only strip I own and there are no other logs concerning this service.

I pushed a new image with a fix for model detection.

Image available for testing: docker pull nickdub/gladys:dev

1 Like

I’ll try to do a test over the weekend

1 Like

Good news — today I do see a model name displayed for my LED strip! :smiley:

However I can still control my LED strip from Gladys, but as before I don’t get any status feedback when I control the LED strip from another application, and I still get the error in the logs at every refresh.

image

OK, so the fix for the detection works :+1:
What’s left is the state feedback…

1 Like

@_Will_71 Everything’s OK on my end, can you check (I pushed an image back)?

1 Like

Ok I’ll try tonight or tomorrow evening. I’ll let you know.

1 Like

@Pti_Nico, I’m sorry but tonight it’s impossible to find my device while the other attempts were fine!

And I don’t have any errors in the logs

Strange, with my setup, no problems… :thinking:

And the response works:

I can add more logs… ???

I added logs and restarted the image creation…

Ok I’ll do another test

Sorry, no luck. It can’t find my LED strip and I have no logs.

What’s the exact model number of your LED strip?
Because only Yeelight devices (not Xiaomi) are detected (provided LAN mode is enabled…)

PS: I’m saying this because my Mi 1S LED desk lamp is detected in the Yeelight app but not in Gladys.

What’s strange is that the strip was correctly recognized in January.

The exact model is Yeelight Strip 6.

Also, if you can’t add it for now, no problem for me because I manage it with Node-RED.

I don’t want my banner to hold up the progress of your integration.

I’m not adding anything, it’s detected automatically…
That’s why I don’t understand :thinking:

If the rest works, we’ll approve it and make the fixes later for the somewhat borderline cases.

@pierre-gilles https://github.com/GladysAssistant/Gladys/pull/715
OK for the review/merge… :wink:

@Pti_Nico Super cool :slight_smile: Thanks for the PR!

I’ve left some feedback — I think we should do a little cleanup on the PR. Right now it’s making changes to tons of files that aren’t related to Yeelight.

I’m not against changes to the core, but those changes should be done in a separate PR; this PR should only touch Yeelight.