Boas!
Eu estou aqui com uns problemas de falsos positivos, mas em que supostamente detecta como estando em caso sem estar…
Estou a usar uns módulos iguais ao do tutorial…
Ainda estou em fase de testes…
Prints do sinal do módulo:
Config Node Red:
[{"id":"71ecf80d.bd8b28","type":"tab","label":"Porta Chaves","disabled":false,"info":""},{"id":"3479bcd5.eb6634","type":"server-state-changed","z":"71ecf80d.bd8b28","name":"Porta chaves Chico","server":"579badfd.ab66a4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.porta_chaves_chico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unknown","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"80","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":140,"wires":[["ac347dc1.fd5e3"],["35fb6ff.33f829"]]},{"id":"83f2858d.4bd498","type":"server-state-changed","z":"71ecf80d.bd8b28","name":"Porta chaves Catarina","server":"579badfd.ab66a4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.porta_chaves_catarina","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unknown","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"80","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":320,"wires":[["9c90cc1c.64068"],["d0705ec7.03ecb"]]},{"id":"1670d144.e0f71f","type":"api-call-service","z":"71ecf80d.bd8b28","name":"Em casa","server":"579badfd.ab66a4","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.ble_chico","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":740,"y":180,"wires":[[]]},{"id":"c706d6a5.428a78","type":"api-call-service","z":"71ecf80d.bd8b28","name":"Fora de casa","server":"579badfd.ab66a4","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.ble_chico","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":750,"y":60,"wires":[[]]},{"id":"24d855ec.379caa","type":"api-call-service","z":"71ecf80d.bd8b28","name":"Em casa","server":"579badfd.ab66a4","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.ble_catarina","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":820,"y":380,"wires":[[]]},{"id":"fec9a03a.2fdb8","type":"api-call-service","z":"71ecf80d.bd8b28","name":"Fora de casa","server":"579badfd.ab66a4","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.ble_catarina","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":280,"wires":[[]]},{"id":"619c3d77.b9aee4","type":"server-state-changed","z":"71ecf80d.bd8b28","name":"Porta chaves Chico","server":"579badfd.ab66a4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.ble_chico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":760,"wires":[["5b84a19f.652fd","27c6546f.9e4e7c"]]},{"id":"411b9dbd.5b82e4","type":"simpletime","z":"71ecf80d.bd8b28","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":1010,"y":740,"wires":[["dd754ffc.08897"]]},{"id":"dd754ffc.08897","type":"template","z":"71ecf80d.bd8b28","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"chatId\": 614157206, \"type\": \"message\" , \"content\": \"{{mydom}}/{{mymonth}}/{{myyear}} {{mytimes}} \\n Chico chegou a casa\" }","output":"json","x":1180,"y":740,"wires":[["bd4a1442.8bc5e8"]]},{"id":"bd4a1442.8bc5e8","type":"telegram sender","z":"71ecf80d.bd8b28","name":"","bot":"4504899e.afa2c8","outputs":1,"x":1370,"y":740,"wires":[["68ec64dd.a71b0c"]]},{"id":"7aa43c35.bc0b34","type":"simpletime","z":"71ecf80d.bd8b28","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":1010,"y":800,"wires":[["c904741e.0b7a88"]]},{"id":"c904741e.0b7a88","type":"template","z":"71ecf80d.bd8b28","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"chatId\": 614157206, \"type\": \"message\" , \"content\": \"{{mydom}}/{{mymonth}}/{{myyear}} {{mytimes}} \\n Chico saiu de casa\" }","output":"json","x":1180,"y":800,"wires":[["5de0c5dd.23c75c"]]},{"id":"5de0c5dd.23c75c","type":"telegram sender","z":"71ecf80d.bd8b28","name":"","bot":"4504899e.afa2c8","outputs":1,"x":1370,"y":800,"wires":[["78493296.cb93bc"]]},{"id":"5b84a19f.652fd","type":"switch","z":"71ecf80d.bd8b28","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":760,"wires":[["411b9dbd.5b82e4"],["7aa43c35.bc0b34"]]},{"id":"68ec64dd.a71b0c","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1570,"y":740,"wires":[]},{"id":"78493296.cb93bc","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1570,"y":800,"wires":[]},{"id":"27c6546f.9e4e7c","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":470,"y":800,"wires":[]},{"id":"5164ea1e.85e164","type":"server-state-changed","z":"71ecf80d.bd8b28","name":"Porta chaves Catarina","server":"579badfd.ab66a4","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.ble_catarina","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":560,"wires":[["5591ab78.fb2284","2f8ae5f8.ead35a"]]},{"id":"2c337cb5.f7bf84","type":"simpletime","z":"71ecf80d.bd8b28","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":1030,"y":540,"wires":[["e3891f3d.d9e54"]]},{"id":"e3891f3d.d9e54","type":"template","z":"71ecf80d.bd8b28","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"chatId\": 614157206, \"type\": \"message\" , \"content\": \"{{mydom}}/{{mymonth}}/{{myyear}} {{mytimes}} \\n Catarina chegou a casa\" }","output":"json","x":1200,"y":540,"wires":[["fe5f3263.cc0ce"]]},{"id":"fe5f3263.cc0ce","type":"telegram sender","z":"71ecf80d.bd8b28","name":"","bot":"4504899e.afa2c8","haserroroutput":false,"outputs":1,"x":1390,"y":540,"wires":[["6e9d883a.78f608"]]},{"id":"3d21a642.b1e9ea","type":"simpletime","z":"71ecf80d.bd8b28","name":"","x":1030,"y":600,"wires":[["ce46561a.a300b8"]]},{"id":"ce46561a.a300b8","type":"template","z":"71ecf80d.bd8b28","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"chatId\": 614157206, \"type\": \"message\" , \"content\": \"{{mydom}}/{{mymonth}}/{{myyear}} {{mytimes}} \\n Catarina saiu de casa\" }","output":"json","x":1200,"y":600,"wires":[["27ffd3aa.08b50c"]]},{"id":"27ffd3aa.08b50c","type":"telegram sender","z":"71ecf80d.bd8b28","name":"","bot":"4504899e.afa2c8","outputs":1,"x":1390,"y":600,"wires":[["bd1a2b0c.6f1178"]]},{"id":"5591ab78.fb2284","type":"switch","z":"71ecf80d.bd8b28","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":480,"y":560,"wires":[["2c337cb5.f7bf84"],["3d21a642.b1e9ea"]]},{"id":"6e9d883a.78f608","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1590,"y":540,"wires":[]},{"id":"bd1a2b0c.6f1178","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1590,"y":600,"wires":[]},{"id":"2f8ae5f8.ead35a","type":"debug","z":"71ecf80d.bd8b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":640,"wires":[]},{"id":"9c90cc1c.64068","type":"api-current-state","z":"71ecf80d.bd8b28","name":"input_boolean off?","server":"579badfd.ab66a4","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.ble_catarina","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":280,"wires":[[],["fec9a03a.2fdb8"]]},{"id":"d0705ec7.03ecb","type":"api-current-state","z":"71ecf80d.bd8b28","name":"input_boolean on?","server":"579badfd.ab66a4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.ble_catarina","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":380,"wires":[[],["24d855ec.379caa"]]},{"id":"ac347dc1.fd5e3","type":"api-current-state","z":"71ecf80d.bd8b28","name":"input_boolean off?","server":"579badfd.ab66a4","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.ble_chico","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":470,"y":80,"wires":[[],["c706d6a5.428a78"]]},{"id":"35fb6ff.33f829","type":"api-current-state","z":"71ecf80d.bd8b28","name":"input_boolean on?","server":"579badfd.ab66a4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.ble_chico","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":470,"y":180,"wires":[[],["1670d144.e0f71f"]]},{"id":"579badfd.ab66a4","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"4504899e.afa2c8","type":"telegram bot","botname":"nodered_bot","usernames":"","chatids":"614157206","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]
O que recebi no telegram:
Saí de casa às 21:44 (com o delay) e só entrei novamente às 06:49.
Existem mais notificações entretanto…
Pelas horas parece-me que está com os 80s que defini para não haver falsos positivos quanto saio de casa…
Alguma ideia do que possa ser?