01304 827609 info@use-ip.co.uk Find us

Is there a way I can automatically fetch text every 5mins and add it into the Hikvision Overlay Text?

zane

Member
Messages
17
Points
3
Hi

This is maybe a developer type question.

Is there a way I can automatically fetch text (payload) from say a Notepad or MS Excel document every 5min and add it into the Hikvision Overlay Text, (the 4 Lines of text)?
I can add the Overlay Text onto the screen via - TCP NetAssistant GUI by typing in what I would like to see on the Overlay text- (something similar to Hikvision POS GUI).
However I need to change the overlay text every 5minutes from an external source(a new spreadsheet or notepad) and write new overlay text onto the screen without typing it manually.

Any leads I can look into please?
 
Solution
@zane - I attempted what you're wanting to do with node-red. It was a learning curve as I'm new to it but I got there in the end (after a lot of 'payload undefined' messages). This is the flow:

Screenshot 2024-02-13 at 16.30.38.png

  1. node 1 (watch) looks for changes to the workbook at the specified file path. There are no settings other than the absolute path to the file.
  2. node 2 (read) also specifies the same file path and has one setting 'output' set to 'single buffer object'
  3. book node has no settings but is needed
  4. sheet node specifies 'sheet 1' of my workbook
  5. the 4 cell nodes specify the 4 cell addresses that I want to output the values from (A1, A2, A3, and A4) They have a setting 'data type' which is set to 'raw value'
  6. the...
Hi

This is maybe a developer type question.

Is there a way I can automatically fetch text (payload) from say a Notepad or MS Excel document every 5min and add it into the Hikvision Overlay Text, (the 4 Lines of text)?
I can add the Overlay Text onto the screen via - TCP NetAssistant GUI by typing in what I would like to see on the Overlay text- (something similar to Hikvision POS GUI).
However I need to change the overlay text every 5minutes from an external source(a new spreadsheet or notepad) and write new overlay text onto the screen without typing it manually.

Any leads I can look into please?
I use a node-red flow to add various text to a couple of my cameras. The node-red Hikvision palette provides an easy method to do it. I'm adding external temperature, lux, and the status of my alarm system from a link with Hubitat; however there's a multitude of node-red palettes. You would look at the 'Big Timer' node setup with a cron job and the Hikvision text node (from Ultimate Hikvision palette) to configure the camera connection/add the text. There would need to be a node to grab that info from your spreadsheet, but it will definitely be relatively easy to do.

Screenshot 2024-02-11 at 20.59.31.png


A quick peruse tells me that you would add the 'node-red-contrib-spreadsheet-in' node to read your spreadsheet. That would grab the value from your spreadsheet.
 
Last edited:
Upvote 0
I use a node-red flow to add various text to a couple of my cameras. The node-red Hikvision palette provides an easy method to do it. I'm adding external temperature, lux, and the status of my alarm system from a link with Hubitat; however there's a multitude of node-red palettes. You would look at the 'Big Timer' node setup with a cron job and the Hikvision text node (from Ultimate Hikvision palette) to configure the camera connection/add the text. There would need to be a node to grab that info from your spreadsheet, but it will definitely be relatively easy to do.

View attachment 10573


A quick peruse tells me that you would add the 'node-red-contrib-spreadsheet-in' node to read your spreadsheet. That would grab the value from your spreadsheet.
Hi JB1970

This is really good , Thank You so much
I will take a look, the cron job is to schedule the tasks? (I just happen to have tons of UNIX/Linux experience)
 
Upvote 0
Hi JB1970

This is really good , Thank You so much
I will take a look, the cron job is to schedule the tasks? (I just happen to have tons of UNIX/Linux experience)
Yes you could use a timer node to update the camera text on a schedule. In my setup, the text is updated and sent to the camera whenever there a change to the value.
 
Upvote 0
@JB1970 ... I see you mentioned in another thread...

I've been messing around with node-red on a Raspberry Pi. There are palettes for Hikvision which allow you to send the xml to the camera (even when connected to NVR PoE ports). I've been switching scenes with a timer (in node-red without the camera scheduler). Going forward I intend to do the switching using illuminance levels so that weather conditions are accounted for. That requires an illuminance/lux sensor in the same light as the camera (I have these already in use on my Hubitat C-8). It's just a case of observing the levels in real time to get an idea of what lux ranges to match to the modes.

Looks like good stuff... Hubitat, node-red, Ultimate Hikvision palette...
 
Upvote 0
@JB1970 ... I see you mentioned in another thread...



Looks like good stuff... Hubitat, node-red, Ultimate Hikvision palette...
It is. I still haven't got around to mapping luminance levels to camera settings as detailed in that other thread but everything is set up and tested that I can do it. node-red seems very versatile; some use it exclusively for setting up home automation rules
 
Upvote 0
@zane - I attempted what you're wanting to do with node-red. It was a learning curve as I'm new to it but I got there in the end (after a lot of 'payload undefined' messages). This is the flow:

Screenshot 2024-02-13 at 16.30.38.png

  1. node 1 (watch) looks for changes to the workbook at the specified file path. There are no settings other than the absolute path to the file.
  2. node 2 (read) also specifies the same file path and has one setting 'output' set to 'single buffer object'
  3. book node has no settings but is needed
  4. sheet node specifies 'sheet 1' of my workbook
  5. the 4 cell nodes specify the 4 cell addresses that I want to output the values from (A1, A2, A3, and A4) They have a setting 'data type' which is set to 'raw value'
  6. the function nodes have some settings that specify the camera channel on my NVR, the row that will be used and optionally the x,y coordinates of the row if they are to be changed from default
  7. finally the 'Hikvision ultimate text node specifies the server (my NVR but could be a standalone camera) and the NVR channel
In my example the watch node at the start means that any time I make and save a change to the spreadsheet, the values from those 4 cells will be updated in lines 1 - 4 of my specified camera. I could easily have replaced that first node with a timer that forced the values to be resent every x minutes rather than looking for changes.

Screenshot 2024-02-13 at 16.51.54.png



IMG_6101.png
 
Upvote 2
Solution
@JB1970 - AMAZING!!!!!!! - so it does work - I will go through the setup on my side - I'm then able to understand the config better too.
I think the watch node is better suited than a cron timer node .

Thank you sooo much for confirming that I can get this to work - #excited

Love your outside lounge/firepit setup
 
Upvote 0
@JB1970 - AMAZING!!!!!!! - so it does work - I will go through the setup on my side - I'm then able to understand the config better too.
I think the watch node is better suited than a cron timer node .

Thank you sooo much for confirming that I can get this to work - #excited

Love your outside lounge/firepit setup
I’ll put a Dropbox link in this thread with the exported flow. If you import it to node-red you can simply amend the nodes to point to your spreadsheet, the address/login details for your NVR/camera and anything else.
 
Upvote 0
@zane You can grab the json at the link below. If you import it into node-red, you should be able to just modify the flow to suit:


You may first need to add the required palettes to your copy of node-red (Hamburger menu > Manage palette > Install). You'll want 'node-red-contrib-spreadsheet-in' and 'node-red-contrib-hikvision-ultimate'
 
Upvote 0
@zane You can grab the json at the link below. If you import it into node-red, you should be able to just modify the flow to suit:


You may first need to add the required palettes to your copy of node-red (Hamburger menu > Manage palette > Install). You'll want 'node-red-contrib-spreadsheet-in' and 'node-red-contrib-hikvision-ultimate'
Thank You - I have already downloaded those two Palettes - I will grab the json file, Thanks a stack
 
Upvote 0
I downloaded your JSON and just tested it now... works just like it supposed to... that node that watches for spreadsheet updates is perfect for this... NICE!!!

It was a learning curve as I'm new to it but I got there in the end (after a lot of 'payload undefined' messages).

I'm trying to use the spreadsheet nodes in my project, and I can't figure them out... example on the website not too helpful... gonna see how you got them working here... Thanks!
 
Upvote 0
Back
Top