Hello,
I have a Reolink Wifi Doorbell, works fine but the rich notification has a cloud platform fee.
So I decided to look for a solution and found one, but it has a flaw.
- Internet decided to cache the image, that means when doorbell makes a snapshot and overwrite the previous one, it shows the previous picture, that means if Friend A ringed at 10AM and Friend B rings at 11AM I still get the image of Friend A.
- Someone mentioned that I could use ?i= in the external link, but sadly I have no idea how to put a random number there.
- The other and would be the best way to fix it, to make it use a timestamp like this: "YYYY.MM.DD - mm:ss", and as easy it seems I couldn't find a way how. Tried many ways and failed even more.
Can someone help my current flow to use timestamp on snapshot and the external link at the same time?
[{"id":"b83835ceaa08e8cc","type":"api-call-service","z":"b0334f5a6d891812","name":"Doorbell Snapshot","server":"f6a86a23.b6858","version":1,"debugenabled":false,"service_domain":"camera","service":"snapshot","entityId":"camera.doorbell_sub","data":"{\"filename\":\"/config/www/doorbell.jpg\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":490,"y":1300,"wires":[["d437d868d5f02bdb"]]},{"id":"0166a0488c01638c","type":"api-call-service","z":"b0334f5a6d891812","name":"Dani Csengő","server":"f6a86a23.b6858","version":1,"debugenabled":true,"service_domain":"notify","service":"mobile_app_m2102k1g","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":970,"y":1300,"wires":[[]]},{"id":"b25f8066f59ddfcb","type":"function","z":"b0334f5a6d891812","name":"Doorbell","func":"msg.payload = {\n data: {\n \"message\":\"Someone is ringing !\",\n \"data\":\n {\n \"image\": \"https://inter.net/local/doorbell.jpg?i=<random>\",\n \"channel\":\"Front Doorbell\",\n \"priority\":\"high\",\n \"ttl\": 0,\n \"actions\":\n [{\n \"action\": \"URI\",\n \"title\": \"Open Camera\",\n \"uri\": \"app://com.mcu.reolink\"\n }]\n }\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":1300,"wires":[["0166a0488c01638c"]]},{"id":"ebf6961cd21e025a","type":"server-state-changed","z":"b0334f5a6d891812","name":"Doorbell Visitor","server":"f6a86a23.b6858","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.doorbell_visitor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":230,"y":1330,"wires":[["b83835ceaa08e8cc"],[]]},{"id":"d437d868d5f02bdb","type":"stoptimer","z":"b0334f5a6d891812","duration":"1","units":"Second","payloadtype":"num","payloadval":"0","name":"1s","x":650,"y":1300,"wires":[["b25f8066f59ddfcb"],[]]},{"id":"f6419242b2bd1a3d","type":"inject","z":"b0334f5a6d891812","name":"Start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":1280,"wires":[["b83835ceaa08e8cc"]]},{"id":"f6a86a23.b6858","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]