ihrigb / node-red-contrib-doorbird-ultimate

Node Red Integration for Doorbird Devices
https://flows.nodered.org/node/node-red-contrib-doorbird-ultimate
Apache License 2.0
4 stars 3 forks source link

A new node which provide link to the image #8

Closed Diddlik closed 2 years ago

ihrigb commented 2 years ago

@Diddlik thanks for the contribution. I am not quite sure if a node of this kind is a good idea. I'd like to more understand why this would be useful. What is your use case?

Diddlik commented 2 years ago

The idea is, if someone rings or possibly gives a movement, then it triggers the image node and you can notify e.g. via Telegram. Best option would be not to send the link, but the image itself (possibly binary) or allow to save it.

ihrigb commented 2 years ago

Ok, got it. Then why not have a node that loads the image itself? Shame that node red does not support encoding, so it would be necessary to encode it in Base64 or so:

{
  "payload": {
    "image": "<base64 image data>",
    "timestamp": "<timestamp"
  }
}

No necessary to add the timestamp though. But maybe we should add information about the image type? We should also check the image size to avoid too much memory being used.

ihrigb commented 2 years ago

Wait stupid me... The payload can actually contain buffers. So this would be the best option!

{
  "payload": {
    "data": <Buffer>,
    <further fields, if required or profitable>
  }
}
Diddlik commented 2 years ago

At the moment this is my solution: grafik

ihrigb commented 2 years ago

The next release will contain an additional node for this! Thanks for the contribution!

ihrigb commented 2 years ago

Available now since v1.2.0