Nabíjení baterie mobilu těsně před budíkem

Automatizace pomocí vývojového nástroje pro vizuální programování. Původně vyvinuto společnost IBM.
Odpovědět
Uživatelský avatar
Lion®
Administrátor fóra
Administrátor fóra
Příspěvky: 480
Registrován: 28. září 2020, 14:07
Bydliště: podkrkonoší
Dal poděkování: 51 poděkování
Dostal poděkování: 36 poděkování
Kontaktovat uživatele:

Nabíjení baterie mobilu těsně před budíkem

Příspěvek od Lion® »

Nové modely mob. telefonů dokáží při večerním připojení k nabíječce nabít přes noc baterii na 80% a těsně před budíkem ji dobijí na 100%.
Prodlužují tak životnost baterie, ty m.t. které to neumí k tomu můžeme přinutit.

Výstřižek.PNG
doplňte si sensor.baterie, switch nabíječky, senzor příštího budíku m.t. s aplikací HA a otestujte - vyzkoušejte

Kód: Vybrat vše

[{"id":"6741c09e.924c38","type":"api-call-service","z":"2fdcac59.8e804c","name":"nabíjení - On","server":"1c1ccadc.716d65","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.nabijeni_nabijecka","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":180,"wires":[[]]},{"id":"b4bc8f5c.198a3","type":"poll-state","z":"2fdcac59.8e804c","name":"baterie < 80 %","server":"1c1ccadc.716d65","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.baterie","state_type":"num","halt_if":"80","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"x":160,"y":180,"wires":[["6741c09e.924c38"],["6794dfad.94d448"]]},{"id":"3f0398dd.7845f","type":"function","z":"2fdcac59.8e804c","name":"porovnávač času","func":"const cas = Date.now();\nconst budik = new Date(msg.payload);\nconst jecas = budik - cas - 1800000;\nmsg.delay = jecas;\nreturn [[{reset: true},msg]];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":300,"wires":[["20397907.9713ae"]]},{"id":"20397907.9713ae","type":"delay","z":"2fdcac59.8e804c","name":"počkat na čas","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":600,"y":339,"wires":[["bbb0f91.1e25188"]]},{"id":"747879ca.97daa","type":"change","z":"2fdcac59.8e804c","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":340,"wires":[["20397907.9713ae"]]},{"id":"d85d2d05.927948","type":"server-state-changed","z":"2fdcac59.8e804c","name":"Budík zařízení nabíjené baterie","server":"1c1ccadc.716d65","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pristi_budik","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":210,"y":340,"wires":[["3f0398dd.7845f"],["747879ca.97daa"]]},{"id":"bbb0f91.1e25188","type":"time-range-switch","z":"2fdcac59.8e804c","name":"","lat":"50.51050516259851","lon":"16.01944904958144","startTime":"23:00","endTime":"7:00","startOffset":"","endOffset":0,"x":770,"y":320,"wires":[["792355ed.d521e4"],[]]},{"id":"6794dfad.94d448","type":"api-call-service","z":"2fdcac59.8e804c","name":"nabíjení - Off","server":"1c1ccadc.716d65","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.nabijeni_nabijecka","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":220,"wires":[[]]},{"id":"1224463a.6440a2","type":"poll-state","z":"2fdcac59.8e804c","name":"baterie = 100 %","server":"1c1ccadc.716d65","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.baterie","state_type":"num","halt_if":"100","halt_if_type":"num","halt_if_compare":"is","outputs":2,"x":160,"y":240,"wires":[["6794dfad.94d448"],[]]},{"id":"792355ed.d521e4","type":"api-current-state","z":"2fdcac59.8e804c","name":"je baterie < 100% ?","server":"1c1ccadc.716d65","version":1,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"lt","override_topic":false,"entity_id":"sensor.baterie","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":970,"y":300,"wires":[["6741c09e.924c38"],[]]},{"id":"1c1ccadc.716d65","type":"server","name":"Dubák HAss","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
________________
🍻 Jdeme na pivo?
Oficiální sada s Raspberry Pi 4B/4GB, černá +Argon NEO Raspberry Pi 4 Case
Patriot Burst 2.5" SATA SSD 120GB + AXAGON EE25-XA6 ALINE box
Home Assistant, Sonoff, Tasmota, Shelly

Galerie realizací

Odpovědět