Ardhuino for posting weather data on Hikvision OSD

networkcameracritic

Getting the hang of it
Joined
Mar 10, 2014
Messages
719
Reaction score
203
I want to post the outside temperature on the OSD of a Hikvision camera using an Arduino. I can't rely on traditional weather info because just a few miles away where places like Weather.com get data from is 1 miles lower in elevation making the weather data worthless. I can get the Arduino to measure temperature, but can't find the correct URL string to send to the camera to change the OSD channel text.
This is the manual - View attachment attachment.pdf

I can get the existing text using the command below but can't figure out how to set it.

http://192.168.100.100/Video/inputs/channels/1/overlays/channelNameOverlay
<?xml version="1.0" encoding="UTF-8" ?>
<channelNameOverlay version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">

<enabled>true</enabled>
<
positionX>16</positionX>

<positionY>448</positionY>
<name>Temp is 99F</name>
</channelNameOverlay>
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
dude that is one cool webcam!

It looks like the Hikvision will take an XML input post to overlay a bit of text.. you ever played with an Arduino?

https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor

You'd want an ethernet Arduino and a good outdoor temperature probe, then tweak the code so when the temperature changes it sends updated XML to the camera..
If you want temperature at that hight you'll need to harden the equipment quite a bit with a DIY like this.. otherwords put it on the ground on the same network.
 

helihans

n3wb
Joined
Oct 16, 2014
Messages
3
Reaction score
0
Hello, thnks for reply.

I have a little bit experians witk arduino but how can i sent the xml into the cam? I know it must be a cgi command but that's all i know :-(
regards, Hans
 

networkcameracritic

Getting the hang of it
Joined
Mar 10, 2014
Messages
719
Reaction score
203
What is your programming experience? C++, BASH, Python? I gave up on Arduino although it worked, the TMP36 analog sensor seemed highly inaccurate, telling me it's 80F when it's 70F and telling me 85F when it's 90F. Tried 2 different sensors from 2 different sources, tried all the tips/tricks shown on Arduino forums like caps between power and ground, between analog pin and ground, 3.3v vs. 5v, same poor results. Also, the Arduino YUN you need to do this costs $80, ouch. Plus you have to know C++ and BASH to make it work. Basically get the temp in a C program and pass that to Linux through their "bridge" to run a CURL command on Linux with the -T option that contains the XML. I use SED to update the xml file with the temp. If you want to go with Arduino YUN, I can post the code but not home now.

I'm now working on doing the same thing on a Raspberry Pi. Why? It's $30 (at MicroCenter), I can use a digital temp sensor with long cable. It has Ethernet built in as well as HDMI and 4 USB ports for keyboard and whatever else you need, like a WiFi dongle if you so chose. You can program it in whatever you like, BASH, Python, C++ as it's just Linux. I've been using it for a different project for my daughter, but I have all the parts, the temp sensor, resistor, extra Pi so I'll put it together next week.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
you should be able to use that digital sensor with a long cable on your arduino Yun but yeah...

also check out BeagleBoneBlack, same price as Pi, More Storage/CPU/RAM but less Video capabilities.. if you not hooking a tv up to it then the beagle works better than the Pi for most cases, its actually cheaper because you dont need a uSD card to install the OS :)
 
Top