# Dahua OSD / overlay text

**URL:** https://discourse.nodered.org/t/dahua-osd-overlay-text/39652
**Category:** Developing Nodes
**Created:** [24 January 2021 15:49 UTC](https://discourse.nodered.org/t/dahua-osd-overlay-text/39652 "2021-01-24T15:49:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Muhonen](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@Muhonen](https://discourse.nodered.org/u/Muhonen)
#### Post date: [24 January 2021 15:49 UTC](https://discourse.nodered.org/t/dahua-osd-overlay-text/39652/1 "2021-01-24T15:49:54Z")

</div>

I'll try to get nodered to write the temperature on the display of the camera Dahua, Hikvision and Camhi I've got to work but dahualla a problem. The name can be changed from the trigger, but I can't get the temperature correctly, but the variable is printed in the form '+ temp +'

Simple test ... timestamp every 10s  
function  
var xtemp = 5;  
msg.payload = 'http:/192.168.10.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=Kanala' + xtemp +'';  
return [msg];  
http request / method post digest authentication  
[http://192.168.10.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=Sauna](http://192.168.10.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget%5B0%5D.CustomTitle%5B1%5D.Text=Sauna) ' + xtemp + ' °C

the temperature is printed correctly in two different cameras, but I don't get this to work

---

<div class="post-metadata">

### Author: ![Muhonen](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@Muhonen](https://discourse.nodered.org/u/Muhonen)
#### Post date: [25 January 2021 23:31 UTC](https://discourse.nodered.org/t/dahua-osd-overlay-text/39652/2 "2021-01-25T23:31:27Z")

</div>

This way I got the temperature after sending the osd text to dahua

```auto
[{"id":"4729f832.2c8cb8","type":"tab","label":"Dahua OK","disabled":false,"info":""},{"id":"18c3b722.448ae9","type":"debug","z":"4729f832.2c8cb8","name":"Dahua","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1090,"y":180,"wires":[]},{"id":"922f9574.70b27","type":"function","z":"4729f832.2c8cb8","name":"","func":"var temp = msg.payload[\"svalue1\"];\nmsg.payload = 'Kanala ' + temp + '°C';\nreturn [msg];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":180,"wires":[["9923460e.d8cf8"]]},{"id":"fb8f3ca9.67a93","type":"http request","z":"4729f832.2c8cb8","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.10.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{{query}}}&format=json","tls":"","persist":false,"proxy":"","authType":"digest","x":930,"y":180,"wires":[["18c3b722.448ae9"]]},{"id":"9923460e.d8cf8","type":"change","z":"4729f832.2c8cb8","name":"","rules":[{"t":"set","p":"query","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":180,"wires":[["fb8f3ca9.67a93"]]},{"id":"fc9ff4d2.afcd1","type":"mqtt in","z":"4729f832.2c8cb8","name":"","topic":"domoticz/out","qos":"2","datatype":"auto","broker":"6f5191ff.e34018","x":90,"y":180,"wires":[["27c7f2ba.16c45e"]]},{"id":"27c7f2ba.16c45e","type":"json","z":"4729f832.2c8cb8","name":"","property":"payload","action":"","pretty":false,"x":250,"y":180,"wires":[["c4af1013.44a578"]]},{"id":"c4af1013.44a578","type":"switch","z":"4729f832.2c8cb8","name":"","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"Kanala Sisätila","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":180,"wires":[["b28947b7.0647c","922f9574.70b27"]]},{"id":"b28947b7.0647c","type":"debug","z":"4729f832.2c8cb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":140,"wires":[]},{"id":"6f5191ff.e34018","type":"mqtt-broker","z":"","name":"Domoticz225","broker":"192.168.1.225","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

Temperature information comes from domoticz

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [26 January 2021 01:11 UTC](https://discourse.nodered.org/t/dahua-osd-overlay-text/39652/3 "2021-01-26T01:11:43Z")

</div>

Hi,

Welcome to the forum!

Could you post your code for the hikvison camera please ?

Thanks

---

<div class="post-metadata">

### Author: ![Muhonen](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@Muhonen](https://discourse.nodered.org/u/Muhonen)
#### Post date: [26 January 2021 15:28 UTC](https://discourse.nodered.org/t/dahua-osd-overlay-text/39652/4 "2021-01-26T15:28:02Z")

</div>

I opened a new topic...
