OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
https://openepaperlink.de
Apache License 2.0
159 stars 35 forks source link

drawcustom stopped finding tags with "id not found yet" error #205

Open bazyrush opened 1 week ago

bazyrush commented 1 week ago

I have an ESP32 BLE AP running with several Gicisky BLE EPD BWR 2.9" displays. HA integration worked great to start with and I was using open_epaper_link.drawcustom (and entity_id: open_epaper_link.macaddress) to update them fine. They stopped updating about a wk ago, I'm not sure if it was post the last update, but they still work fine through the OpenEPaperLink interface, and their sensors are updating fine in the HA integration.

When I try to manually run the update scripts in HA (the ones that used to work fine), I get this error:

_Failed to perform the action open_epaper_link.drawcustom. id was not found yet, please wait for the display to check in at least once open_epaperlink.macaddress

I'm running OpenEPaperLink v2.60, integration v0.1.4, and HA 2024.11.2

Any ideas?

jurasjo commented 1 week ago

You have to start using:

target:
  device_id:

instead of:

target:
  entity_id:

in you automations

If you do this in the UI then choose blue button instead of green: image

hafis328 commented 1 week ago

You have to start using:

target:
  device_id:

instead of:

target:
  entity_id:

in you automations

If you do this in the UI then choose blue button instead of green: image

Still doesn't work. It doesn't even display any devices in the device selection menus. Here is my configuration: Screenshot 2024-11-18 165923 Screenshot 2024-11-18 165947 Screenshot 2024-11-18 165918

bazyrush commented 1 week ago

You have to start using:

target:
  device_id:

instead of:

target:
  entity_id:

in you automations

If you do this in the UI then choose blue button instead of green: image

I had a script written in yaml that was previously working perfectly. I changed entity_id to device_id but trying to run the script gives me a _Failed to perform the action script/newscript. 'NoneType' object is not iterable error

If I try and call a very simple action with drawcustom in the developer tools, again using device_id, I get a _Failed to perform the action open_epaperlink.drawcustom. Unknown error

If I try and use the GUI and select blue button, as you suggest, there are no options available despite all my tags appearing fine and active in the intergration

If I use device_id and specify the name of the tag device from the integration, I get _Failed to perform the action open_epaperlink.drawcustom. Unknown error

Any ideas??

jurasjo commented 1 week ago

It is not only about changing word entity_id to device_id. You have to also replace present entity with the new device id.

For example:

from:

target:
  entity_id: open_epaper_link.00000238FAD73B1F

to:

target:
  device_id: 773686021d98c236af56a429268417ff

It is the only change I have done to my config and it works.

g4bri3lDev commented 1 week ago

Still doesn't work. It doesn't even display any devices in the device selection menus. Here is my configuration: Screenshot 2024-11-18 165923 Screenshot 2024-11-18 165947 Screenshot 2024-11-18 165918

From the looks of the screenshots that version is still pre 1.0

bazyrush commented 6 days ago

Still doesn't work. It doesn't even display any devices in the device selection menus. Here is my configuration: Screenshot 2024-11-18 165923 Screenshot 2024-11-18 165947 Screenshot 2024-11-18 165918

From the looks of the screenshots that version is still pre 1.0

Sorry, I can't see reference to a version number -- what version of what is this, and what version should it be? I had given my versions in my initial issue comment

bazyrush commented 6 days ago

It is not only about changing word entity_id to device_id. You have to also replace present entity with the new device id.

For example:

from:

target:
  entity_id: open_epaper_link.00000238FAD73B1F

to:

target:
  device_id: 773686021d98c236af56a429268417ff

It is the only change I have done to my config and it works.

I've looked at all the documentation and it still only references the entity_id method using the MAC address. I cannot find anything explaining how to move to a device_id. Could you explain how to do this? What is the device_id, how can I find it?

bazyrush commented 6 days ago

It is not only about changing word entity_id to device_id. You have to also replace present entity with the new device id.

For example:

from:

target:
  entity_id: open_epaper_link.00000238FAD73B1F

to:

target:
  device_id: 773686021d98c236af56a429268417ff

It is the only change I have done to my config and it works.

OK so I've had a Google, and I think you can find the device_id from the URL of the device when you open the device properties in the front end. I have tried this, and it still doesn't work for me:

image

g4bri3lDev commented 6 days ago

Sorry, I can't see reference to a version number -- what version of what is this, and what version should it be? I had given my versions in my initial issue comment

You can see the versions in HACS and choose which to install from the redownload button in the menu in the top right Screenshot 2024-11-20 at 17 36 42

you probably are on 0.5.0.8

hafis328 commented 6 days ago

I think i got it working again. What helped was a complete uninstall through HACS and a fresh reinstall of the integration. I'm now able to select displays in 'entities'-section again. However, there are still no device-IDs available Screenshot 2024-11-20 173912 @g4bri3lDev the version was allways the newest available in HACS Screenshot 2024-11-20 174026

Edit: newest non-dev Version

g4bri3lDev commented 6 days ago

the version was allways the newest available in HACS

This is because the 1.x_dev versions are marked as a pre release to which you need to opt in first

However, there are still no device-IDs available

These will be available from 1.x

bazyrush commented 6 days ago

the version was allways the newest available in HACS

This is because the 1.x_dev versions are marked as a pre release to which you need to opt in first

However, there are still no device-IDs available

These will be available from 1.x

Ahh, I feel like I'm so close to understanding what I'm doing wrong!

I was on version 0.5.0.8, exactly as you suspected. I don't have a recent backup (my fault entirely) so I rolled the integration back to 0.5.0.7, and my old script (with the mac address entity) and a test with the device_id approach both aren't working. I then updated forward to 1.0.0.1_dev and that also doesn't work, with the added flavour of a test throwing up lots of new required fields under data when you call drawcustom.

Which version should I be using? I was perfectly happy with my old scripts which used the entity_id approach. Which version(s) were these? I guess this is assuming that a recent update was the problem.

g4bri3lDev commented 6 days ago

Which version should I be using?

https://github.com/OpenEPaperLink/Home_Assistant_Integration/releases/tag/1.0.0.5_dev That is the most recent one

I guess this is assuming that a recent update was the problem.

There once was 0.5.0.9 which broke for most people, which is why I decided to almost completely rewrite the integration

bazyrush commented 4 days ago

ahh! got it working again by uninstalling/reinstalling, and weirdly it seems to be happy again on 0.5.0.8 using the entity_id approach.

thanks for being so patient with me! loving the integration, i get a lot of use out of my little etags :)