Mam taką automatyzacje do ogrzewania.
[
{
"id": "eb4ae8ea4f3f4a8c",
"type": "tab",
"label": "SALON",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3fcd57261e75fa9d",
"type": "light-scheduler",
"z": "eb4ae8ea4f3f4a8c",
"settings": "0a6790ebf35fefb1",
"events": "[{\"start\":{\"dow\":1,\"mod\":360},\"end\":{\"dow\":1,\"mod\":780}},{\"start\":{\"dow\":1,\"mod\":900},\"end\":{\"dow\":1,\"mod\":1320}},{\"start\":{\"dow\":2,\"mod\":360},\"end\":{\"dow\":2,\"mod\":780}},{\"start\":{\"dow\":3,\"mod\":360},\"end\":{\"dow\":3,\"mod\":780}},{\"start\":{\"dow\":4,\"mod\":360},\"end\":{\"dow\":4,\"mod\":780}},{\"start\":{\"dow\":5,\"mod\":360},\"end\":{\"dow\":5,\"mod\":780}},{\"start\":{\"dow\":2,\"mod\":900},\"end\":{\"dow\":2,\"mod\":1320}},{\"start\":{\"dow\":3,\"mod\":900},\"end\":{\"dow\":3,\"mod\":1320}},{\"start\":{\"dow\":4,\"mod\":900},\"end\":{\"dow\":4,\"mod\":1320}},{\"start\":{\"dow\":5,\"mod\":900},\"end\":{\"dow\":5,\"mod\":1320}}]",
"topic": "",
"name": "harmonogram",
"onPayload": "1",
"onPayloadType": "str",
"offPayload": "2",
"offPayloadType": "str",
"onlyWhenDark": false,
"scheduleRndMax": 0,
"sunElevationThreshold": 6,
"sunShowElevationInStatus": false,
"outputfreq": "output.statechange.startup",
"x": 860,
"y": 100,
"wires": [
[
"5c69cb0f1a1517cd",
"5b0ec384c7ba8990"
]
]
},
{
"id": "8b45d26488a87f23",
"type": "inject",
"z": "eb4ae8ea4f3f4a8c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 100,
"wires": [
[
"0243bf56ea2c5b60"
]
]
},
{
"id": "5c69cb0f1a1517cd",
"type": "switch",
"z": "eb4ae8ea4f3f4a8c",
"name": "taryfa",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "eq",
"v": "2",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1050,
"y": 100,
"wires": [
[
"ab919d38b82e9bc1"
],
[
"ddfa852d0a678f9a",
"a4400b189280f8cb"
]
],
"outputLabels": [
"szczytowa",
"pozaszczytowa"
]
},
{
"id": "bdc8ffb74e8ff320",
"type": "switch",
"z": "eb4ae8ea4f3f4a8c",
"name": "ON/OFF",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "25",
"vt": "str"
},
{
"t": "gte",
"v": "26",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 600,
"y": 100,
"wires": [
[
"3fcd57261e75fa9d",
"fded4a21e69a7405"
],
[
"ec7844a6b8d0fa56",
"86bdd79c5ed7f9ca"
]
],
"outputLabels": [
"ON",
"OFF"
]
},
{
"id": "ab919d38b82e9bc1",
"type": "api-call-service",
"z": "eb4ae8ea4f3f4a8c",
"name": "klima ON",
"server": "1849551c.d8ac4b",
"version": 3,
"debugenabled": false,
"service_domain": "climate",
"service": "turn_on",
"entityId": "climate.klimatyzator",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "all",
"x": 1280,
"y": 100,
"wires": [
[]
]
},
{
"id": "ec7844a6b8d0fa56",
"type": "api-call-service",
"z": "eb4ae8ea4f3f4a8c",
"name": "klima OFF",
"server": "1849551c.d8ac4b",
"version": 3,
"debugenabled": false,
"service_domain": "climate",
"service": "turn_off",
"entityId": "climate.klimatyzator",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 850,
"y": 160,
"wires": [
[]
]
},
{
"id": "ddfa852d0a678f9a",
"type": "api-call-service",
"z": "eb4ae8ea4f3f4a8c",
"name": "podłogowe ON",
"server": "1849551c.d8ac4b",
"version": 3,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_on",
"entityId": "switch.1000e5ab8b",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1300,
"y": 160,
"wires": [
[]
]
},
{
"id": "86bdd79c5ed7f9ca",
"type": "api-call-service",
"z": "eb4ae8ea4f3f4a8c",
"name": "podłogowe OFF",
"server": "1849551c.d8ac4b",
"version": 3,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_off",
"entityId": "switch.sonoff_1000e5ab8b",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 860,
"y": 220,
"wires": [
[]
]
},
{
"id": "fded4a21e69a7405",
"type": "debug",
"z": "eb4ae8ea4f3f4a8c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 610,
"y": 20,
"wires": []
},
{
"id": "0243bf56ea2c5b60",
"type": "api-current-state",
"z": "eb4ae8ea4f3f4a8c",
"name": "temp",
"server": "1849551c.d8ac4b",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.salon_temperature",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 350,
"y": 100,
"wires": [
[
"bdc8ffb74e8ff320"
]
]
},
{
"id": "a4400b189280f8cb",
"type": "debug",
"z": "eb4ae8ea4f3f4a8c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1070,
"y": 20,
"wires": []
},
{
"id": "5b0ec384c7ba8990",
"type": "debug",
"z": "eb4ae8ea4f3f4a8c",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 20,
"wires": []
},
{
"id": "0a6790ebf35fefb1",
"type": "light-scheduler-settings",
"name": "my settings",
"latitude": "50.10785665049803",
"longitude": "20.17825862089034"
},
{
"id": "1849551c.d8ac4b",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
}
]
No i błędy które wywala są takie:
13.02.2022, 17:29:50node: 5b0ec384c7ba8990
msg.payload : string[1]
"2"
13.02.2022, 17:29:50node: podłogowe ON
msg : string[52]
"Call-Service attempted without connection to server."
13.02.2022, 17:29:50node: a4400b189280f8cb
msg.payload : string[1]
"2"
13.02.2022, 17:30:52node: 5b0ec384c7ba8990
msg.payload : string[1]
"2"
13.02.2022, 17:30:52node: podłogowe ON
msg : string[52]
"Call-Service attempted without connection to server."
13.02.2022, 17:30:52node: a4400b189280f8cb
msg.payload : string[1]
"2"
13.02.2022, 17:30:56node: temp
msg : string[74]
"Entity could not be found in cache for entity_id: sensor.salon_temperature"
13.02.2022, 17:31:51node: harmonogram
msg : string[54]
"Failed to interpret incoming msg.payload. Ignoring it!"
13.02.2022, 17:31:51node: fded4a21e69a7405
msg.payload : string[5]
"22.36"
13.02.2022, 17:32:51node: harmonogram
msg : string[54]
"Failed to interpret incoming msg.payload. Ignoring it!"
13.02.2022, 17:32:52node: fded4a21e69a7405
msg.payload : string[5]
"22.36"
13.02.2022, 17:33:51node: harmonogram
msg : string[54]
"Failed to interpret incoming msg.payload. Ignoring it!"
13.02.2022, 17:33:51node: fded4a21e69a7405
msg.payload : string[5]
"22.36"
13.02.2022, 17:34:51node: harmonogram
msg : string[54]
"Failed to interpret incoming msg.payload. Ignoring it!"
13.02.2022, 17:34:52node: fded4a21e69a7405
msg.payload : string[5]
"22.36"
Co zrobiłem źle?
edit: doszedłem do tego, że wszystko się uruchamia tylko nie wiedzieć czemu jeżeli temperatura jest np 22 (czyli ogrzewanie ma się nie włączać) to on owszem sprawdza ale wysyła sygnał do switcha on i zaraz off. rezultat jest taki że przy każdym zapytaniu mimo ze nie powinien włączyć to włącza i wyłącza .