Homey Community Forum

Node Red: A widget based dashboard working with Homey trough MQTT

should work now…

Hmmm there are still a lot of syntax error’s in the code. In the first place, all the quotes " are “Smart quotes”: “ ” not the simple quotes like: "
I’ve replaced it with this online script:

But then there are several syntax problems left. Like “wires”: (weird rectangle)

Hope you can retry paste the unformatted Json, I’m really interested in the way you embedded the video as well :grinning:

sorry guys, long day :smile:

Let`s go for a last time;

[{"id":"286dfcc6.d4e334","type":"comment","z":"55f532a.497bccc","name":"Just a live view of cameras","info":"","x":190,"y":60,"wires":[]},{"id":"bb5fdb34.e3dd88","type":"inject","z":"55f532a.497bccc","name":"","topic":"","payload":"checkWeb","payloadType":"str","repeat":"30","crontab":"","once":true,"onceDelay":"10","x":150,"y":160,"wires":[["769295e6.93ea2c"]]},{"id":"769295e6.93ea2c","type":"ui_template","z":"55f532a.497bccc","group":"1c70d4cd.325c0b","name":"Just a view of cameras","order":1,"width":"35","height":"12","format":"<!DOCTYPE html>\n<html>\n<style>\nimg {\n    border: 1px solid #ddd;\n    border-radius: 8px;\n    padding: 2px;\n    width: 405px;\n}\n</style>\n\n<script type=\"text/javascript\">\nscope.$watch('msg', function(msg) {\n    inMessage(msg.payload);\n});\n\nfunction updatePic() {\n    document.getElementById('c51').src = \"http://(yourURL)\";\n    //alert('updated pics');\n}\n\nfunction inMessage(event) {\n    if (event.match('checkWeb')) {\n        updatePic();\n    }\n}\n\n</script>\n<center>\n<table>\n    <tr><!-- Row 1 -->\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c51\" /></td>\n   \t\t    <td style=\"text-align: center\"><img src=\"\" id=\"c52\" /></td>\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c53\" /></td>\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c54\" /></td>\n    </tr>\n    <tr><!-- Row 2 -->\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c55\" /></td>\n   \t\t    <td style=\"text-align: center\"><img src=\"\" id=\"c56\" /></td>\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c57\" /></td>\n    \t\t<td style=\"text-align: center\"><img src=\"\" id=\"c58\" /></td>\n    </tr>\n</table>\n</center>\n</html>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":380,"y":160,"wires":[[]]},{"id":"debe02e2.7163a","type":"ui_template","z":"55f532a.497bccc","group":"1c70d4cd.325c0b","name":"Clock Toolbar","order":5,"width":"0","height":"0","format":"\n<script id=\"titleScript\" type=\"text/javascript\">\n    $('#clock').remove();\n    var toolbar = $('.md-toolbar-tools');\n    var div = $('<div></div>');\n    var p = $('<p/ id=\"clock\">');\n    $('#titleScript').parent().hide();\n    div.append(p);\n    div[0].style.margin = '5px 5px 5px auto';\n    toolbar.append(div);\n\n    function displayTitle(lh) {\n        p.text(lh); \n    }\n    \n    function upTime() {\n        var d = new Date();\n        p.text(d.toLocaleTimeString('de-AT'));\n    }\n\n    // Watch the payload and update the title\n    (function(scope) {\n        scope.$watch('msg.payload', function(data) {\n            if (data.match(\"systemsummary\")) { //Systemstatus\n                m = data;\n                n = m.split(':');\n                //alert(n[1]);\n                var sSummary = parseInt(n[1], 10);\n                if(sSummary === 14){\n                    document.getElementById(\"clock\").style.backgroundColor =\"transparent\";\n                }\n                if(sSummary < 14){\n                    document.getElementById(\"clock\").style.backgroundColor =\"#FF0033\";\n                }\n            }else{\n                displayTitle(data);\n            }\n        });\n        setInterval(upTime,1000);\n    })(scope);\n</script>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":160,"y":100,"wires":[[]]},{"id":"1c70d4cd.325c0b","type":"ui_group","z":"","name":"LiveVideo","tab":"df07ccac.714e9","disp":false,"width":"35","collapse":false},{"id":"df07ccac.714e9","type":"ui_tab","z":"","name":"LiveVideo","icon":"dashboard","disabled":false,"hidden":false}]
1 Like

Problems figuring out your ip cam URL?


Thanks, that seems to work. (All though I still need to work out the ip cam URL (its behind a password)). Did you write this script yourself, or is it based on something you have found?

yes, did u see my link above?

Depending on the make; ex linksys with password:


That seems to work Thangodelta. It’s not updating sadly. maybe I need to add a random number after every reload behind the “?” in the url. Anyway, thanks for sharing.

Checkweb should do that job for you, myself pic is updated every 30 sec

I do have a problem with javascript and the Samsung QB13R Signage infoscreen (embedded in my wall), the samsung web browser is mandatory and dosent show my ip cam based on javascript (broken image symbol). Dont know why, but very annoying! Yes, I have checked off enable java.

Node red integrated in wall in the hallway, using Samsung Signage, with data from a qnap server, with Homey Pro making it all happen!


So, I am already stranded :slight_smile: I installed node red on my synology through docker and it is running fine. I can’t login to node red with the ip address and port (ip address:1880) it says: ERR_CONNECTION_REFUSED in my browser. I think I have to do something else on my nas but I can’t figure out what. Has anyone any idea?

@SilverApe check if the tcp port mapping of the docket container is different and make sure the firewall of synology is passing the traffic.

1 Like

Hi @M_a_r_c_o
Thanks. The port in docker is set to 1880 (did not change it) and I have disabled the firewall for a minute to test it but even then it is not working.

Try writing http:// before the adress. Often browsers only tries with https://

sadly that did not work either.
It is the local ip I need to put in right? The ip from my nas? Just to be sure :sweat_smile:

This is in my node red log in docker: Server now running at . So it is running…

Yes, but is the port mapping in the networking (bridge) part correct? The outside port for Synology is default different than the application port in docker. Node read indee on 1880 but what is the outside port mapping?

Aha! :shushing_face: I can get in now. Did not know there was another port.


You can set it in the docker settings to the same port, if you’d like.
I did.

Hi @Robin_van_Kekem , I try to understand you.
This is what I have:

Now I can only connect by putting port number 32770 behind the ip and not the 1880 port. Everywhere online I see they use the 1880 port.
I also think that when I restart Node Red the port 32770 becomes another port, so that is not handy.

Change the ‘lokale poort’ from Automatisch to 1880