Skip to content

JavaScript

Hilfe für Skripterstellung mit JavaScript

2.5k Topics 48.9k Posts

NEWS

  • [gelöst]: Wie kann man Tibber Durchschnittspreise errechnen?

    2
    1
    0 Votes
    2 Posts
    244 Views
    P
    Mein Sohn hat es gelöst: let start = 21 // values 0-23 let timePeriod = 4 // values 1-5 const allPrices = { 0: 0.1, 1: 0.26, 2: 0.32, 3: 0.38, 4: 0.31, 5: 0.122, 6: 0.25, 7: 0.35, 8: 0.177, 9: 0.366, 10: 0.14, 11: 0.288, 12: 0.1, 13: 0.344, 14: 0.1, 15: 0.322, 16: 0.1, 17: 0.377, 18: 0.1, 19: 0.266, 20: 0.1, 21: 0.37, 22: 0.13, 23: 0.25, } const averagePrice = startCalc(start, timePeriod) console.log(averagePrice) function startCalc(start, timePeriod) { const prices = Object.values(allPrices) const earlyTimePeriod = -24 + (start + timePeriod) const lateTimePeriod = 24 - (start) let hourPrices if(earlyTimePeriod <= 0) { // for hours 0-19 hourPrices = calcPrices(prices, 'default', timePeriod, start) } else { // for hours 20-23 let earlyHourPrices = calcPrices(prices, 'early', earlyTimePeriod) let lateHourPrices = calcPrices(prices, 'late', lateTimePeriod) hourPrices = earlyHourPrices + lateHourPrices } return calcAveragePrice(hourPrices, timePeriod) } function calcPrices(pricesArr, checkHours, timePeriod, start) { const prices = checkHours === 'late' ? pricesArr.reverse() : pricesArr const key = start || 0 let sum if(timePeriod === 1) { sum = prices[key] } else if (timePeriod === 2) { sum = prices[key] + prices[key + 1] } else if (timePeriod === 3) { sum = prices[key] + prices[key + 1] + prices[key + 2] } else if (timePeriod === 4) { sum = prices[key] + prices[key + 1] + prices[key + 2] + prices[key + 3] } else if (timePeriod === 5) { sum = prices[key] + prices[key + 1] + prices[key + 2] + prices[key + 3] + prices[key + 4] } return sum } function calcAveragePrice(hourPrices, timePeriod) { const averagePrice = hourPrices / timePeriod return averagePrice } natürlich sollte man oben die Tibber Preise aus den Objekten auslesen und dort einfügen. Die Zahlen sind reine Fantasiezahlen zum Testen
  • Frage zum Unifi-Script

    8
    0 Votes
    8 Posts
    353 Views
    A
    @negalein sagte in Frage zum Unifi-Script: Kannst du das noch genauer erklären? Zum kürzen bin ich nicht fit genug in JavaScript :) kannst ja aber im skript in den Einstellungen die Funktionen abschalten die du nicht benötigst. Zu den Vouchers: Habe Standard Vouchers definiert im Skript: const standardVouchers = {"zwei Tage" : {dauer: 2880, anzahl: 1, multiuse: 1, upload: 0, download:0, mb_begrenzung: 0, notiz:"Laufzeit: 2 Tage"}, "vier Tage" : {dauer: 5760, anzahl: 1, multiuse: 1, upload: 0, download:0, mb_begrenzung: 0, notiz:"Laufzeit: 4 Tage"}, "acht Tage" : {dauer: 10500, anzahl: 1, multiuse: 1, upload: 0, download:0, mb_begrenzung: 0, notiz:"Laufzeit: 8 Tage"}, "ein Jahr" : {dauer: 525600, anzahl: 1, multiuse: 1, upload: 0, download:0, mb_begrenzung: 0, notiz:"Laufzeit: 1 Jahr"}} Dann habe ich mir 4 States erstellt welche meine Telegramm instanz ansteuert -WlanCode2d ;4d; 8d; 1Jahr. Darauf reagiere ich mit dem Folgenden Skript: [image: 1707878269587-1.jpg] [image: 1707878307600-2.jpg] Hier das ganze Skript: 1.txt
  • [gelöst]: Stunde aus Zeitobjekt auslesen

    20
    1
    0 Votes
    20 Posts
    965 Views
    P
    Ich glaube, ich habe es herausgefunden: type "number" statt "array". Fehlermeldung ist weg! Top
  • [gelöst]Wie Modbus Holding Register für Zeit verändern?

    3
    3
    0 Votes
    3 Posts
    245 Views
    P
    Nachtrag: und man muss immer zusätzlich das Register "Load_first_bat_first_grid_first" (bei mir 1044) zum Schreiben der Zeit auf 1 setzen!
  • Array wert entfernen welcher nicht vorkommt

    29
    0 Votes
    29 Posts
    2k Views
    T
    @codierknecht sagte in Array wert entfernen welcher nicht vorkommt: @drapo Für eine "sichere Fahrt" ist wohl kaum das Nicht-Vorhandensein von Radarfallen in Deiner Region ausschlaggebend. In der Regel schon - da Sicherheit recht wenig mit dem Geldbedürfnis einiger Gemeinden zu tun hat. Auch nicht mit dem wahllosen verteilen von Schildern. Das muß man aber tatsächlich nicht ansprechen.
  • Bezug/Einspeisung Vorzeichenwechsel

    8
    0 Votes
    8 Posts
    652 Views
    D
    @paul53 Es hat jetzt funktioniert mit dem Datenpunkt! Danke dir! VG
  • Schleife um einen Eintrag zurück setzen

    12
    0 Votes
    12 Posts
    806 Views
    ofri2607O
    @warhammer73 sagte in Schleife um einen Eintrag zurück setzen: Den ganzen Teil hätte ich dann entweder zweimal im Script oder müsste ihn getrennt auslagern und dann mit Parameter aufrufen der mal Main und mal Room beinhaltet. Würde natürlich auch gehen. Wäre mE strukturierter im Code, wenn du es auf zwei Funktionen aufteilst. Du hast dann auch keine for-Schleife in einer for-Schleife (versuche ich immer so gut es nur geht zu vermeiden) und keine weiteren if-Abfrage und sollte doch ein Zeitproblem auftreten, ist es ganz einfach auf async umzustellen
  • [gelöst] Telegram Reihenfolge Ausgabe falsch

    10
    1
    0 Votes
    10 Posts
    787 Views
    haus-automatisierungH
    @drapo nein. Das ändert nur den scope (in diesem fall auch nicht). Var einfach nie benutzten (nur let und const).
  • Netzwerküberwachung mit fb-checkpresence

    1
    0 Votes
    1 Posts
    257 Views
    No one has replied
  • Leere Ordner aus Objekt-Struktur löschen

    10
    0 Votes
    10 Posts
    884 Views
    fhainzF
    @liv-in-sky Vielen Dank, jetzt funktioniert es auch bei mir. Mein Fehler war, ich habe den 2 Parameter bei deleteObject (rekursives löschen) nicht angegeben.
  • Konvertierung Zeichekette in Zahl

    23
    0 Votes
    23 Posts
    2k Views
    D
    @codierknecht genau.. und auf diesem Weg was gelernt
  • Funktionen in gemeinsame Module auslagern

    15
    0 Votes
    15 Posts
    1k Views
    CodierknechtC
    @ticaki sagte in Funktionen in gemeinsame Module auslagern: Falls das nicht klar war Mir schon ;-)
  • Probleme mit der Regelung der PS und Delta 2 Max

    6
    0 Votes
    6 Posts
    650 Views
    HomoranH
    @homoran sagte in Probleme mit der Regelung der PS und Delta 2 Max: du gibst mir den Link wo das hin soll
  • [gelöst] - TypeError: Converting circular structure to JSON

    3
    0 Votes
    3 Posts
    149 Views
    OliverIOO
    @codierknecht subobjekte von repsonse enthalten wieder referenzen auf sich oder ein anderes objekt in der hierarchie. das führt zu einer endlosschleife in der ausgabe.
  • Datenpunkte in MQTT Json Bündeln

    16
    0 Votes
    16 Posts
    1k Views
    SunshinemakerS
    @MartinP Danke für deinen Vorschlag :) @mickym Ich bin ausgestiegen bei :"Ich hab ehrlich keine Lust mehr zu zeigen..." Ich hab eine Lösung für mich gefunden und bin zufrieden. PS: Kann NodeRed RSCP für die Anbindung vom E3/DC S10 Pro ?????
  • [gelöst] DP mit CRON anlegen

    3
    1
    0 Votes
    3 Posts
    234 Views
    I
    @paul53 Vielen Dank :+1:
  • <gelöst> Unbekannte Logs - Woher kommen die?

    8
    0 Votes
    8 Posts
    620 Views
    O
    @thomas-braun sagte in Unbekannte Logs - Woher kommen die?: iob diag sagt? Spoiler ======== Start marking the full check here ========= Skript v.2023-10-10 *** BASE SYSTEM *** Static hostname: raspberrypi Icon name: computer Operating System: Raspbian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-rpi7-rpi-v8 Architecture: arm64 Model : Raspberry Pi 4 Model B Rev 1.5 Docker : false Virtualization : none Kernel : aarch64 Userland : armhf Systemuptime and Load: 22:27:48 up 34 min, 2 users, load average: 0.45, 0.38, 0.44 CPU threads: 4 *** RASPBERRY THROTTLING *** Current issues: No throttling issues detected. Previously detected issues: No throttling issues detected. *** Time and Time Zones *** Local time: Sat 2024-01-27 22:27:49 CET Universal time: Sat 2024-01-27 21:27:49 UTC RTC time: n/a Time zone: Europe/Berlin (CET, +0100) System clock synchronized: yes NTP service: active RTC in local TZ: no *** User and Groups *** pi /home/pi pi adm dialout cdrom sudo audio video plugdev games users input render netdev gpio i2c spi iobroker *** X-Server-Setup *** X-Server: false Desktop: Terminal: tty Boot Target: multi-user.target *** MEMORY *** total used free shared buff/cache available Mem: 8.2G 1.1G 6.8G 1.2M 412M 7.1G Swap: 104M 0B 104M Total: 8.3G 1.1G 6.9G 7810 M total memory 1060 M used memory 1055 M active memory 165 M inactive memory 6472 M free memory 35 M buffer memory 357 M swap cache 99 M total swap 0 M used swap 99 M free swap Raspberry only: oom events: 0 lifetime oom required: 0 Mbytes total time in oom handler: 0 ms max time spent in oom handler: 0 ms *** FAILED SERVICES *** UNIT LOAD ACTIVE SUB DESCRIPTION 0 loaded units listed. *** FILESYSTEM *** Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 3.6G 0 3.6G 0% /dev tmpfs tmpfs 782M 1.2M 780M 1% /run /dev/sda2 ext4 235G 3.9G 219G 2% / tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 5.0M 16K 5.0M 1% /run/lock /dev/sda1 vfat 510M 93M 418M 19% /boot/firmware tmpfs tmpfs 782M 0 782M 0% /run/user/1000 Messages concerning ext4 filesystem in dmesg: [Sat Jan 27 21:53:09 2024] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 smsc95xx.macaddr=D8:3A:DD:66:17:0D vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 console=ttyS0,115200 console=tty1 root=PARTUUID=2a065028-02 rootfstype=ext4 fsck.repair=yes rootwait [Sat Jan 27 21:53:14 2024] EXT4-fs (sda2): mounted filesystem with ordered data mode. Quota mode: none. [Sat Jan 27 21:53:16 2024] EXT4-fs (sda2): re-mounted. Quota mode: none. Show mounted filesystems \(real ones only\): TARGET SOURCE FSTYPE OPTIONS / /dev/sda2 ext4 rw,noatime `-/boot/firmware /dev/sda1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro Files in neuralgic directories: /var: 403M /var/ 159M /var/cache 153M /var/cache/apt 107M /var/lib 79M /var/cache/apt/archives Archived and active journals take up 36.3M in the file system. /opt/iobroker/backups: 12M /opt/iobroker/backups/ /opt/iobroker/iobroker-data: 393M /opt/iobroker/iobroker-data/ 357M /opt/iobroker/iobroker-data/files 89M /opt/iobroker/iobroker-data/files/echarts.admin 67M /opt/iobroker/iobroker-data/files/javascript.admin 57M /opt/iobroker/iobroker-data/files/echarts The five largest files in iobroker-data are: 28M /opt/iobroker/iobroker-data/objects.jsonl 24M /opt/iobroker/iobroker-data/files/echarts/static/js/main.2b7495c2.js.map 24M /opt/iobroker/iobroker-data/files/echarts.admin/chart/static/js/main.2b7495c2.js.map 23M /opt/iobroker/iobroker-data/files/echarts.admin/static/js/main.245b61c0.js.map 22M /opt/iobroker/iobroker-data/files/modbus.admin/static/js/main.b5f6766c.js.map USB-Devices by-id: USB-Sticks - Avoid direct links to /dev/* in your adapter setups, please always prefer the links 'by-id': find: '/dev/serial/by-id/': No such file or directory *** NodeJS-Installation *** /usr/bin/nodejs v18.19.0 /usr/bin/node v18.19.0 /usr/bin/npm 10.2.3 /usr/bin/npx 10.2.3 /usr/bin/corepack 0.22.0 nodejs: Installed: 18.19.0-1nodesource1 Candidate: 18.19.0-1nodesource1 Version table: *** 18.19.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 100 /var/lib/dpkg/status 18.18.2-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.18.1-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.18.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.17.1-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.17.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.16.1-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.16.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.15.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.14.2-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.14.1-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.14.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.13.0+dfsg1-1+rpi1 500 500 http://raspbian.raspberrypi.com/raspbian bookworm/main armhf Packages 18.13.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.12.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.11.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.10.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.9.1-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.9.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.8.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.7.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.6.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.5.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.4.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.3.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.2.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.1.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages 18.0.0-1nodesource1 1001 500 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages Temp directories causing npm8 problem: 0 No problems detected Errors in npm tree: *** ioBroker-Installation *** ioBroker Status iobroker is running on this host. Objects type: jsonl States type: jsonl Core adapters versions js-controller: 5.0.17 admin: 6.12.0 javascript: 7.1.6 Adapters from github: 1 Adapter State + system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin + system.adapter.backitup.0 : backitup : raspberrypi - enabled system.adapter.daswetter.0 : daswetter : raspberrypi - enabled system.adapter.discovery.0 : discovery : raspberrypi - disabled system.adapter.dwd.0 : dwd : raspberrypi - disabled + system.adapter.echarts.0 : echarts : raspberrypi - enabled + system.adapter.email.0 : email : raspberrypi - enabled + system.adapter.energiefluss.0 : energiefluss : raspberrypi - enabled + system.adapter.heatingcontrol.0 : heatingcontrol : raspberrypi - enabled + system.adapter.history.0 : history : raspberrypi - enabled + system.adapter.hm-rega.0 : hm-rega : raspberrypi - enabled + system.adapter.hm-rpc.0 : hm-rpc : raspberrypi - enabled, port: 0 + system.adapter.hm-rpc.1 : hm-rpc : raspberrypi - enabled, port: 0 + system.adapter.hm-rpc.2 : hm-rpc : raspberrypi - enabled, port: 0 system.adapter.icons-mfd-svg.0 : icons-mfd-svg : raspberrypi - disabled system.adapter.icons-ultimate-png.0 : icons-ultimate-png : raspberrypi - disabled system.adapter.info.0 : info : raspberrypi - disabled + system.adapter.javascript.0 : javascript : raspberrypi - enabled system.adapter.mbus.0 : mbus : raspberrypi - disabled, port: 3493 system.adapter.modbus.0 : modbus : raspberrypi - disabled system.adapter.shelly.0 : shelly : raspberrypi - disabled, port: 1882, bind: 0.0.0.0 + system.adapter.signal-cmb.0 : signal-cmb : raspberrypi - enabled + system.adapter.smartmeter.0 : smartmeter : raspberrypi - enabled system.adapter.swiss-weather-api.0 : swiss-weather-api : raspberrypi - disabled system.adapter.vis-fancyswitch.0 : vis-fancyswitch : raspberrypi - disabled system.adapter.vis-hqwidgets.0 : vis-hqwidgets : raspberrypi - disabled system.adapter.vis-material-advanced.0 : vis-material-advanced : raspberrypi - disabled system.adapter.vis-metro.0 : vis-metro : raspberrypi - disabled system.adapter.vis-plumb.0 : vis-plumb : raspberrypi - disabled system.adapter.vis-rgraph.0 : vis-rgraph : raspberrypi - disabled system.adapter.vis.0 : vis : raspberrypi - enabled system.adapter.weatherunderground.0 : weatherunderground : raspberrypi - disabled + system.adapter.web.0 : web : raspberrypi - enabled, port: 8082, bind: 0.0.0.0, run as: admin + system.adapter.wiffi-wz.0 : wiffi-wz : raspberrypi - enabled system.adapter.yr.0 : yr : raspberrypi - disabled + instance is alive Enabled adapters with bindings + system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin + system.adapter.hm-rpc.0 : hm-rpc : raspberrypi - enabled, port: 0 + system.adapter.hm-rpc.1 : hm-rpc : raspberrypi - enabled, port: 0 + system.adapter.hm-rpc.2 : hm-rpc : raspberrypi - enabled, port: 0 + system.adapter.web.0 : web : raspberrypi - enabled, port: 8082, bind: 0.0.0.0, run as: admin ioBroker-Repositories stable : http://download.iobroker.net/sources-dist.json beta : http://download.iobroker.net/sources-dist-latest.json Active repo(s): stable Installed ioBroker-Instances Used repository: stable Adapter "admin" : 6.12.0 , installed 6.12.0 Adapter "backitup" : 2.9.8 , installed 2.9.8 Adapter "daswetter" : 3.1.13 , installed 3.1.12 [Updatable] Adapter "discovery" : 4.2.0 , installed 4.2.0 Adapter "dwd" : 2.8.5 , installed 2.8.5 Adapter "echarts" : 1.7.2 , installed 1.7.2 Adapter "email" : 1.2.2 , installed 1.2.2 Adapter "energiefluss" : 3.6.0 , installed 3.6.0 Adapter "heatingcontrol": 2.12.3 , installed 2.12.3 Adapter "history" : 3.0.1 , installed 3.0.1 Adapter "hm-rega" : 4.0.0 , installed 4.0.0 Adapter "hm-rpc" : 1.15.19 , installed 1.15.19 Adapter "icons-mfd-svg": 1.2.0 , installed 1.2.0 Adapter "icons-ultimate-png": 1.0.1, installed 1.0.1 Adapter "info" : 2.0.0 , installed 2.0.0 Adapter "javascript" : 7.1.6 , installed 7.1.6 Controller "js-controller": 5.0.17 , installed 5.0.17 Adapter "mbus" : 2.6.1 , installed 2.6.1 Adapter "modbus" : 6.0.1 , installed 6.0.1 Adapter "shelly" : 6.6.1 , installed 6.6.1 Adapter "signal-cmb" : 0.3.0 , installed 0.3.0 Adapter "simple-api" : 2.7.2 , installed 2.7.2 Adapter "smartmeter" : 3.4.0 , installed 3.4.0 Adapter "socketio" : 6.6.0 , installed 6.6.0 Adapter "swiss-weather-api": 2.0.3, installed 2.0.3 Adapter "vis" : 1.5.4 , installed 1.5.4 Adapter "vis-fancyswitch": 1.1.0 , installed 1.1.0 Adapter "vis-hqwidgets": 1.4.0 , installed 1.4.0 Adapter "vis-material-advanced": 1.7.4, installed 1.7.4 Adapter "vis-metro" : 1.2.0 , installed 1.2.0 Adapter "vis-plumb" : 1.0.2 , installed 1.0.2 Adapter "vis-rgraph" : 0.0.2 , installed 0.0.2 Adapter "weatherunderground": 3.6.0, installed 3.6.0 Adapter "web" : 6.1.10 , installed 6.1.10 Adapter "wiffi-wz" : 2.2.1 , installed 2.2.1 Adapter "ws" : 2.5.8 , installed 2.5.8 Adapter "yr" : 5.3.0 , installed 5.3.0 Objects and States Please stand by - This may take a while Objects: 16081 States: 13761 *** OS-Repositories and Updates *** W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. Hit:1 http://archive.raspberrypi.com/debian bookworm InRelease Hit:2 http://raspbian.raspberrypi.com/raspbian bookworm InRelease Hit:3 https://deb.nodesource.com/node_18.x nodistro InRelease Reading package lists... W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. Pending Updates: 0 *** Listening Ports *** Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN 1001 15686 688/iobroker.js-con tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1001 15176 688/iobroker.js-con tcp 0 0 0.0.0.0:8181 0.0.0.0:* LISTEN 1001 18006 1137/io.wiffi-wz.0 tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 15133 704/sshd: /usr/sbin tcp 0 0 192.168.178.81:2001 0.0.0.0:* LISTEN 1001 18462 902/io.hm-rpc.0 tcp 0 0 192.168.178.81:2010 0.0.0.0:* LISTEN 1001 16006 946/io.hm-rpc.2 tcp 0 0 192.168.178.81:9292 0.0.0.0:* LISTEN 1001 18514 925/io.hm-rpc.1 tcp6 0 0 :::8081 :::* LISTEN 1001 17517 790/io.admin.0 tcp6 0 0 :::8082 :::* LISTEN 1001 18748 1122/io.web.0 tcp6 0 0 :::22 :::* LISTEN 0 15135 704/sshd: /usr/sbin udp 0 0 0.0.0.0:43542 0.0.0.0:* 1001 18613 1047/io.echarts.0 udp 0 0 0.0.0.0:43896 0.0.0.0:* 1001 17904 1092/io.signal-cmb. udp 0 0 0.0.0.0:52119 0.0.0.0:* 1001 18001 1137/io.wiffi-wz.0 udp 0 0 0.0.0.0:52380 0.0.0.0:* 1001 18505 925/io.hm-rpc.1 udp 0 0 0.0.0.0:56600 0.0.0.0:* 1001 16201 1077/io.heatingcont udp 0 0 0.0.0.0:60968 0.0.0.0:* 1001 18582 984/io.backitup.0 udp 0 0 0.0.0.0:36479 0.0.0.0:* 1001 44398 1320/io.javascript. udp 0 0 0.0.0.0:53295 0.0.0.0:* 1001 18460 902/io.hm-rpc.0 udp 0 0 0.0.0.0:37159 0.0.0.0:* 1001 18744 1122/io.web.0 udp 0 0 0.0.0.0:57754 0.0.0.0:* 1001 15288 823/io.email.0 udp 0 0 0.0.0.0:53846 0.0.0.0:* 1001 15353 871/io.hm-rega.0 udp 0 0 0.0.0.0:58106 0.0.0.0:* 1001 18648 1062/io.energieflus udp 0 0 0.0.0.0:38058 0.0.0.0:* 1001 15790 790/io.admin.0 udp 0 0 0.0.0.0:5353 0.0.0.0:* 104 15488 560/avahi-daemon: r udp 0 0 0.0.0.0:38292 0.0.0.0:* 1001 16629 688/iobroker.js-con udp 0 0 0.0.0.0:42576 0.0.0.0:* 1001 23561 969/io.smartmeter.0 udp 0 0 0.0.0.0:38586 0.0.0.0:* 104 15490 560/avahi-daemon: r udp 0 0 0.0.0.0:47081 0.0.0.0:* 1001 16004 946/io.hm-rpc.2 udp 0 0 0.0.0.0:34985 0.0.0.0:* 1001 15312 838/io.history.0 udp6 0 0 fe80::d6a8:cba0:eaa:546 :::* 0 17456 653/NetworkManager udp6 0 0 :::42049 :::* 104 15491 560/avahi-daemon: r udp6 0 0 :::5353 :::* 104 15489 560/avahi-daemon: r *** Log File - Last 25 Lines *** 2024-01-27 22:22:00.016 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 847ms, MischerStellung=3.9%, MischerStellungBekannt=true, MischerStellwert yn=0.0065, MischerStellzeit=847ms, HeizungZyklusZaehler=6 2024-01-27 22:22:30.019 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 847ms, MischerStellung=4.6%, MischerStellungBekannt=true, MischerStellwert yn=0.0065, MischerStellzeit=847ms, HeizungZyklusZaehler=7 2024-01-27 22:23:00.037 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 847ms, MischerStellung=5.2%, MischerStellungBekannt=true, MischerStellwert yn=0.0065, MischerStellzeit=847ms, HeizungZyklusZaehler=8 2024-01-27 22:23:06.391 - warn: smartmeter.0 (969) No or too long answer from Serial Device after last request. 2024-01-27 22:23:30.015 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 847ms, MischerStellung=5.9%, MischerStellungBekannt=true, MischerStellwert yn=0.0065, MischerStellzeit=847ms, HeizungZyklusZaehler=9 2024-01-27 22:24:00.016 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 932ms, MischerStellung=6.6%, MischerStellungBekannt=true, MischerStellwert yn=0.0072, MischerStellzeit=932ms, HeizungZyklusZaehler=10 2024-01-27 22:24:01.011 - info: javascript.0 (1320) script.js.AktivSys.PV_Messung: LogEvt: ===>PV_Messung Grundtakt Ende - Laufzeit = 2 ms 2024-01-27 22:24:02.031 - info: javascript.0 (1320) script.js.AktivSys.Rollladensteuerung: LogEvt: ===>Rollo/Grundtakt - Laufzeit = 4 ms, ZyklusZaehler: 3 2024-01-27 22:24:30.014 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=7.3%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=11 2024-01-27 22:25:00.017 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=8.1%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=12 2024-01-27 22:25:15.007 - info: javascript.0 (1320) script.js.AktivSys.Überwachung: LogInf: ===>Überwachung Grundtakt Anfang 2024-01-27 22:25:15.010 - info: javascript.0 (1320) script.js.AktivSys.Überwachung: LogInf: ===>AlleUpdatesUeberwachen Ende - Anzahl Überwachungen=13, Anzahl der Fehler = 2 2024-01-27 22:25:15.010 - info: javascript.0 (1320) script.js.AktivSys.Überwachung: LogInf: ===>Überwachung Grundtakt Ende - Laufzeit = 3 ms 2024-01-27 22:25:21.394 - warn: smartmeter.0 (969) No or too long answer from Serial Device after last request. 2024-01-27 22:25:30.028 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=8.8%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=13 2024-01-27 22:25:30.055 - info: javascript.0 (1320) script.js.AktivSys.RobbySteuerung: LogEvt: >>>>Robby Grundtakt 2024-01-27 22:26:00.014 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=9.5%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=14 2024-01-27 22:26:30.013 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=10.3%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=15 2024-01-27 22:27:00.034 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=11%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=16 2024-01-27 22:27:02.010 - info: javascript.0 (1320) script.js.AktivSys.Rollladensteuerung: LogEvt: ===>Rollo/Grundtakt - Laufzeit = 1 ms, ZyklusZaehler: 4 2024-01-27 22:27:30.012 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=11.7%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=17 2024-01-27 22:27:36.397 - warn: smartmeter.0 (969) No or too long answer from Serial Device after last request. 2024-01-27 22:28:00.016 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=12.5%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=18 2024-01-27 22:28:30.014 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=13.2%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=19 2024-01-27 22:29:00.013 - info: javascript.0 (1320) script.js.AktivSys.Heizung_Keller: LogEvt: --> Heizung_MischerRegeln: , Mischer AUF für 960ms, MischerStellung=14%, MischerStellungBekannt=true, MischerStellwert yn=0.0074, MischerStellzeit=960ms, HeizungZyklusZaehler=20 ============ Mark until here for C&P ============= ======================= SUMMARY ======================= v.2023-10-10 Static hostname: raspberrypi Icon name: computer Operating System: Raspbian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-rpi7-rpi-v8 Architecture: arm64 Installation: native Kernel: aarch64 Userland: armhf Timezone: Europe/Berlin (CET, +0100) User-ID: 1000 X-Server: false Boot Target: multi-user.target Pending OS-Updates: 0 Pending iob updates: 1 Nodejs-Installation: /usr/bin/nodejs v18.19.0 /usr/bin/node v18.19.0 /usr/bin/npm 10.2.3 /usr/bin/npx 10.2.3 /usr/bin/corepack 0.22.0 Recommended versions are nodejs 18.19.0 and npm 10.2.3 Your nodejs installation is correct MEMORY: total used free shared buff/cache available Mem: 8.2G 1.2G 6.5G 1.2M 623M 7.0G Swap: 104M 0B 104M Total: 8.3G 1.2G 6.6G Active iob-Instances: 17 Active repo(s): stable ioBroker Core: js-controller 5.0.17 admin 6.12.0 ioBroker Status: iobroker is running on this host. Objects type: jsonl States type: jsonl Status admin and web instance: system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin system.adapter.web.0 : web : raspberrypi - enabled, port: 8082, bind: 0.0.0.0, run as: admin Objects: 16081 States: 13747 Size of iob-Database: 35M /opt/iobroker/iobroker-data/objects.jsonl 3.2M /opt/iobroker/iobroker-data/states.jsonl =================== END OF SUMMARY ====================
  • Wind mit Dauer für eine Berechnung Windrad Garage Projekt

    javascript
    3
    1
    0 Votes
    3 Posts
    328 Views
    paul53P
    @acidsubway sagte: Kann man das mit dem ioBroker machen? Man kann, aber wozu soll es dienen? Wie soll das Ergebnis aussehen? Einzelne Datenpunkte für jede Geschwindigkeitsstufe oder eine Liste (array)?
  • Windrichtung kommt mit 0-5V an soll in Windrichtung N/S/W/O

    javascript
    12
    0 Votes
    12 Posts
    778 Views
    SchmakusS
    Wieso überhaupt ein script und nicht einen echten Alias mit einer read formel? val <= 0.4658 ? 'SÜD' : val <= 1.0908 ? 'SÜD-WEST' : val <= 1.7158 ? 'WEST' : val <= 2.3407 ? 'NORD-WEST' : val <= 2.9658 ? 'NORD' : val <= 3.5908 ? 'NORD-OST' : val <= 3.9158 ? 'OST' : val <= 4.5408 ? 'SÜD-OST' : val <= 5.0000 ? 'SÜD' : 'SÜD';
  • Skriptlogik mit internen Variablen aufbauen, oder getState?

    18
    0 Votes
    18 Posts
    1k Views
    T
    @miniblister Das sieht gut aus. Aber datapoint würde ich noch einen weniger generischen namen geben.

745

Online

32.6k

Users

82.2k

Topics

1.3m

Posts