Posts

Showing posts from April, 2021

Annke C800 / I91BD still image URL

I recently bought this camera and the still image / snapshot URL wasn't really documented anywhere. I found the answer here: https://help.annke.com/hc/en-us/community/posts/900003112403 Snapshot using HTTP URL: http://ip:port/ISAPI/Streaming/channels/1/picture

Realtime bandwitdh/traffic speed from Unifi Dream Machine Pro into MQTT

Image
I wanted to display realtime Internet traffic data on my dashboards. This information is available in Unifi Controller on my UDM-Pro. (Only works with UDM PRO at the time of writing, not with standalone controller as far as I know. Please comment if you have an solution). Install this Node-RED plugin: node-red-contrib-unifi-os Add the new node to your flow. Enter configuration for the node. Add an "Controller" with your ip & credentials Use this endpoint: /proxy/network/wss/s/default/events Add a switch node that switches msg.payload.meta.message with string match device:sync This is the message that will contain realtime bandwidth info Add the following function node to fetch the bandwidth data. You may need to correct according to your setup (wan1/wan2). if(msg.payload.data[0].hasOwnProperty('wan1')) { var m = {} m.payload = {} m.payload.rx = (Number(msg.payload.data[0].wan1.rx_rate)/1000000).toFixed(1); m.payload.tx = (Number(msg.payload.d...

Send inline image attchment in Node-RED pushover message

The documentation for the node red pushover node for using attachments was not very detailed, only "Buffer containing image". Follow these simple steps in a "function" node to add an image attachment as buffered data. Convert your image to base64,   https://www.base64-image.de/ Remove initial metadata from base64, e.g: data:image/webp;base64,  Set attachment data: var attachmentBase64 = "<string from step 2>" Add this to the function node where you format your pushover message: msg.attachment = Buffer.from(attachmentBase64, 'utf8');