[ { "id": "9ce2c290.c85b6", "type": "dns", "z": "eb3f51ed.bf6b5", "name": "", "method": "lookup", "x": 820.1668853759766, "y": 1977.6670942306519, "wires": [ [ "f675c185.8d2cd" ] ] }, { "id": "ecb53600.34a7c8", "type": "inject", "z": "eb3f51ed.bf6b5", "name": "Get IP", "topic": "ip", "payload": "eth0", "payloadType": "str", "repeat": "300", "crontab": "", "once": false, "onceDelay": "", "x": 153.00011444091797, "y": 1892.2225923538208, "wires": [ [ "cf91aac6.333838" ] ] }, { "id": "cf91aac6.333838", "type": "exec", "z": "eb3f51ed.bf6b5", "command": "wget -qO- http://bot.whatismyipaddress.com/ ; echo", "addpay": false, "append": "", "useSpawn": "", "timer": "", "oldrc": false, "name": "Call IP - whatismyipaddress.com", "x": 403.0000877380371, "y": 1912.7224311828613, "wires": [ [ "537da3c4.b3950c" ], [], [] ] }, { "id": "537da3c4.b3950c", "type": "switch", "z": "eb3f51ed.bf6b5", "name": "Integrity check", "property": "payload", "propertyType": "msg", "rules": [ { "t": "regex", "v": "\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b", "vt": "str", "case": false }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 671.0001373291016, "y": 1902.7225933074951, "wires": [ [ "96b77044.dfc02" ], [] ] }, { "id": "f675c185.8d2cd", "type": "change", "z": "eb3f51ed.bf6b5", "name": "Godaddy", "rules": [ { "t": "move", "p": "payload", "pt": "msg", "to": "godaddy", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 973.1668510437012, "y": 1977.66676902771, "wires": [ [ "2195da1b.c9edd6" ] ] }, { "id": "96b77044.dfc02", "type": "change", "z": "eb3f51ed.bf6b5", "name": "local", "rules": [ { "t": "move", "p": "payload", "pt": "msg", "to": "local", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 858.000186920166, "y": 1912.333595275879, "wires": [ [ "9a8a093e.52bd48" ] ] }, { "id": "2195da1b.c9edd6", "type": "function", "z": "eb3f51ed.bf6b5", "name": "compare", "func": "msg.payload = msg.godaddy === msg.local.trim() ? \"yes\" : \"no\";\nreturn msg;", "outputs": 1, "noerr": 0, "x": 681.1667861938477, "y": 2036.000587463379, "wires": [ [ "15c0f8d.f3ff507" ] ] }, { "id": "15c0f8d.f3ff507", "type": "switch", "z": "eb3f51ed.bf6b5", "name": "Not in sync", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "no", "vt": "str" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 886.1667900085449, "y": 2034.0005836486816, "wires": [ [ "636cc25f.fe6a7c" ], [] ] }, { "id": "636cc25f.fe6a7c", "type": "api-call-service", "z": "eb3f51ed.bf6b5", "name": "Update Godaddy", "server": "b89bdbfd.f73988", "service_domain": "shell_command", "service": "", "data": "", "render_data": false, "mergecontext": "", "x": 1090.1667785644531, "y": 2029.3337593078613, "wires": [ [] ] }, { "id": "9a8a093e.52bd48", "type": "change", "z": "eb3f51ed.bf6b5", "name": "Set URL", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "subdomain.domain.com", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 660.1666946411133, "y": 1975.66676902771, "wires": [ [ "9ce2c290.c85b6" ] ] }, { "id": "b89bdbfd.f73988", "type": "server", "z": "", "name": "Home Assistant", "legacy": false, "hassio": false, "rejectUnauthorizedCerts": true, "ha_boolean": "y|yes|true|on|home|open" } ]