Ankündigung

Einklappen
Keine Ankündigung bisher.

neues Forenmitglied, erste Probleme

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    neues Forenmitglied, erste Probleme

    Hallo,

    arbeite mich gerade in smarthome.py und smartvisu ein. Mein Linuxwissen ist eher gering, weiß aber meist, wie ich mithilfe von Google weiterkomme. Meine Programmierkenntnisse gehen gegen 0. Skripte sind mir nicht fremd.
    Insofern ein großes Lob an die Doku. Mit meinen eher schlechten Vorraussetzungen konnte ich auf einem BananaPi Pro (mit kleineren selbstverursachten Problemen) smartvisu und smarthome.py zum laufen bringen. Der erste Raum steht und Licht/Rollläden lassen sich im Webbrowser schalten und Temperatur/Helligkeit zeichnen Grafiken.

    Meine aufgestauten Probleme, bei denen ich nicht mehr weiterkomme:
    a) Uhrzeit via knx Problem
    ntpdate daemon läuft und gibt mir auf der bash mit "date" eine Uhrzeit. Gruppen 1/0/0 und 1/0/1 sind in der ETS4 angelegt, ETS4 Gruppenmonitor läuft aber Zeit kommt auf dem Bus nicht an.
    Code:
    # plugin.conf
    [knx]
       class_name = KNX
       class_path = plugins.knx
       host = 127.0.0.1
       port = 6720
       send_time = 600 # update date/time every 600 seconds, default none
       time_ga = 1/0/0 # default none
       date_ga = 1/0/1 # default none
    Code:
    # smarthome.conf
    lat = 49.0401
    lon = 8.6969
    elev = 178
    tz = 'Europe/Berlin'
    smarthome.py -d:
    Code:
    /usr/local/smarthome/bin/smarthome.py -d
    2015-05-26 12:15:46,162 INFO     Main         Start SmartHome.py 1.1.967.dev --                                                                                                                      smarthome.py:__init__:242
    2015-05-26 12:15:46,164 DEBUG    Main         Python 3.2.3 -- smarthome.py:__ini                                                                                                                     t__:243
    2015-05-26 12:15:46,166 WARNING  Main         Could not find/use ephem! -- smart                                                                                                                     home.py:__init__:257
    2015-05-26 12:15:46,168 INFO     Main         Init Scheduler -- scheduler.py:__i                                                                                                                     nit__:86
    2015-05-26 12:15:46,171 DEBUG    Scheduler    creating 5 workers -- scheduler.py                                                                                                                     :run:93
    2015-05-26 12:15:46,173 INFO     Main         Init Plugins -- smarthome.py:start                                                                                                                     :288
    2015-05-26 12:15:46,183 DEBUG    Main         Plugin: knx -- plugin.py:__init__:                                                                                                                     43
    2015-05-26 12:15:46,200 DEBUG    Main         KNX time next time: 2015-05-26 12:                                                                                                                     15:56+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:46,206 DEBUG    Main         Plugin: visu -- plugin.py:__init__                                                                                                                     :43
    2015-05-26 12:15:46,250 DEBUG    Main         Plugin: cli -- plugin.py:__init__:                                                                                                                     43
    2015-05-26 12:15:46,257 DEBUG    Main         Plugin: sql -- plugin.py:__init__:                                                                                                                     43
    2015-05-26 12:15:46,278 DEBUG    Main         SQLite 3.7.13 -- __init__.py:__ini                                                                                                                     t__:47
    2015-05-26 12:15:46,339 DEBUG    Main         SQLite: database integrity ok -- _                                                                                                                     _init__.py:__init__:64
    2015-05-26 12:15:46,351 DEBUG    Main         SQLite Maintain next time: 2015-05                                                                                                                     -27 03:02:00+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:46,352 DEBUG    Main         Plugin: wol -- plugin.py:__init__:                                                                                                                     43
    2015-05-26 12:15:46,358 INFO     Main         Init Items -- smarthome.py:start:2                                                                                                                     94
    2015-05-26 12:15:46,416 DEBUG    Main         Item env.core.memory = 11358208.0                                                                                                                      via SQLite None None -- item.py:set:472
    2015-05-26 12:15:46,423 DEBUG    Main         Item env.core.threads = 7.0 via SQ                                                                                                                     Lite None None -- item.py:set:472
    2015-05-26 12:15:46,429 DEBUG    Main         Item env.core: no type specified.                                                                                                                      -- item.py:__init__:242
    2015-05-26 12:15:46,434 DEBUG    Main         KNX: Tag reply to 1/0/2 -- __init_                                                                                                                     _.py:parse_item:275
    2015-05-26 12:15:46,450 DEBUG    Main         Item env.location: no type specifi                                                                                                                     ed. -- item.py:__init__:242
    2015-05-26 12:15:46,466 DEBUG    Main         Item env.system.load = 0.14 via SQ                                                                                                                     Lite None None -- item.py:set:472
    2015-05-26 12:15:46,470 DEBUG    Main         Item env.system: no type specified                                                                                                                     . -- item.py:__init__:242
    2015-05-26 12:15:46,472 DEBUG    Main         Item env: no type specified. -- it                                                                                                                     em.py:__init__:242
    2015-05-26 12:15:46,481 DEBUG    Main         KNX: wohnzimmer.beleuchtung.diele.                                                                                                                     schalten listen on 1/4/24 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,484 DEBUG    Main         KNX: wohnzimmer.beleuchtung.diele.                                                                                                                     dimmen listen on 1/4/25 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,486 DEBUG    Main         Item wohnzimmer.beleuchtung.diele:                                                                                                                      no type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,491 DEBUG    Main         KNX: wohnzimmer.beleuchtung.kueche                                                                                                                     .schalten listen on 1/4/8 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,495 DEBUG    Main         KNX: wohnzimmer.beleuchtung.kueche                                                                                                                     .dimmen listen on 1/4/9 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,497 DEBUG    Main         Item wohnzimmer.beleuchtung.kueche                                                                                                                     : no type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,502 DEBUG    Main         KNX: wohnzimmer.beleuchtung.esstis                                                                                                                     ch.schalten listen on 1/4/2 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,506 DEBUG    Main         KNX: wohnzimmer.beleuchtung.esstis                                                                                                                     ch.dimmen listen on 1/4/3 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,507 DEBUG    Main         Item wohnzimmer.beleuchtung.esstis                                                                                                                     ch: no type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,513 DEBUG    Main         KNX: wohnzimmer.beleuchtung.sofa.s                                                                                                                     chalten listen on 1/4/4 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,516 DEBUG    Main         KNX: wohnzimmer.beleuchtung.sofa.d                                                                                                                     immen listen on 1/4/5 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,518 DEBUG    Main         Item wohnzimmer.beleuchtung.sofa:                                                                                                                      no type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,519 DEBUG    Main         Item wohnzimmer.beleuchtung: no ty                                                                                                                     pe specified. -- item.py:__init__:242
    2015-05-26 12:15:46,526 DEBUG    Main         KNX: wohnzimmer.heizung.ist_temper                                                                                                                     atur listen on 3/1/0 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,540 DEBUG    Main         Item wohnzimmer.heizung.ist_temper                                                                                                                     atur = 22.8 via SQLite None None -- item.py:set:472
    2015-05-26 12:15:46,543 DEBUG    Main         KNX: wohnzimmer.heizung.soll_tempe                                                                                                                     ratur listen on and init with 3/2/0 -- __init__.py:parse_item:252
    2015-05-26 12:15:46,547 DEBUG    Main         Item wohnzimmer.heizung.soll_tempe                                                                                                                     ratur = 22.0 via SQLite None None -- item.py:set:472
    2015-05-26 12:15:46,551 DEBUG    Main         KNX: wohnzimmer.heizung.umschaltun                                                                                                                     g_modus_nacht listen on 1/0/2 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,553 DEBUG    Main         Item wohnzimmer.heizung: no type s                                                                                                                     pecified. -- item.py:__init__:242
    2015-05-26 12:15:46,564 DEBUG    Main         KNX: wohnzimmer.rollladen.sw.pos l                                                                                                                     isten on 2/4/10 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,566 DEBUG    Main         Item wohnzimmer.rollladen.sw: no t                                                                                                                     ype specified. -- item.py:__init__:242
    2015-05-26 12:15:46,576 DEBUG    Main         KNX: wohnzimmer.rollladen.s.pos li                                                                                                                     sten on 2/4/11 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,578 DEBUG    Main         Item wohnzimmer.rollladen.s: no ty                                                                                                                     pe specified. -- item.py:__init__:242
    2015-05-26 12:15:46,587 DEBUG    Main         KNX: wohnzimmer.rollladen.o.pos li                                                                                                                     sten on 2/4/12 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,589 DEBUG    Main         Item wohnzimmer.rollladen.o: no ty                                                                                                                     pe specified. -- item.py:__init__:242
    2015-05-26 12:15:46,599 DEBUG    Main         KNX: wohnzimmer.rollladen.tuere.po                                                                                                                     s listen on 2/4/13 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,600 DEBUG    Main         Item wohnzimmer.rollladen.tuere: n                                                                                                                     o type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,610 DEBUG    Main         KNX: wohnzimmer.rollladen.kueche.p                                                                                                                     os listen on 2/4/14 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,611 DEBUG    Main         Item wohnzimmer.rollladen.kueche:                                                                                                                      no type specified. -- item.py:__init__:242
    2015-05-26 12:15:46,613 DEBUG    Main         Item wohnzimmer.rollladen: no type                                                                                                                      specified. -- item.py:__init__:242
    2015-05-26 12:15:46,614 DEBUG    Main         Item wohnzimmer: no type specified                                                                                                                     . -- item.py:__init__:242
    2015-05-26 12:15:46,621 DEBUG    Main         KNX: badog.helligkeit listen on 1/                                                                                                                     0/10 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,628 DEBUG    Main         Item badog.helligkeit = 798.08 via                                                                                                                      SQLite None None -- item.py:set:472
    2015-05-26 12:15:46,629 DEBUG    Main         Item badog: no type specified. --                                                                                                                      item.py:__init__:242
    2015-05-26 12:15:46,636 DEBUG    Main         KNX: badeg.helligkeit listen on 1/                                                                                                                     0/9 -- __init__.py:parse_item:243
    2015-05-26 12:15:46,643 DEBUG    Main         Item badeg.helligkeit = 724.48 via                                                                                                                      SQLite None None -- item.py:set:472
    2015-05-26 12:15:46,645 DEBUG    Main         Item badeg: no type specified. --                                                                                                                      item.py:__init__:242
    2015-05-26 12:15:46,653 DEBUG    Main         KNX: kueche.herd listen on 4/0/100                                                                                                                      -- __init__.py:parse_item:243
    2015-05-26 12:15:46,657 DEBUG    Main         Item kueche: no type specified. --                                                                                                                      item.py:__init__:242
    2015-05-26 12:15:46,659 INFO     Main         Items: 67 -- smarthome.py:start:32                                                                                                                     6
    2015-05-26 12:15:46,661 INFO     Main         Start Logics -- logic.py:__init__:                                                                                                                     33
    2015-05-26 12:15:46,662 DEBUG    Main         Reading Logics from /usr/local/sma                                                                                                                     rthome/lib/env/logic_conf -- logic.py:_read_logics:64
    2015-05-26 12:15:46,666 DEBUG    Main         Reading Logics from /usr/local/sma                                                                                                                     rthome/etc/logic.conf -- logic.py:_read_logics:64
    2015-05-26 12:15:46,668 CRITICAL Main         'utf-8' codec can't decode byte 0x                                                                                                                     e4 in position 10: invalid continuation byte -- logic.py:_read_logics:71
    2015-05-26 12:15:46,671 DEBUG    Main         Logic: env_daily -- logic.py:__ini                                                                                                                     t__:44
    2015-05-26 12:15:46,693 DEBUG    Main         env_daily next time: 2015-05-27 06                                                                                                                     :00:00+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:46,694 DEBUG    Main         Logic: env_init -- logic.py:__init                                                                                                                     __:44
    2015-05-26 12:15:46,699 DEBUG    Main         Logic: env_stat -- logic.py:__init                                                                                                                     __:44
    2015-05-26 12:15:46,704 DEBUG    Main         env_stat next time: 2015-05-26 12:                                                                                                                     16:01+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:46,706 DEBUG    Main         Logic: env_loc -- logic.py:__init_                                                                                                                     _:44
    2015-05-26 12:15:46,712 INFO     Main         Start Plugins -- plugin.py:start:6                                                                                                                     5
    2015-05-26 12:15:46,713 DEBUG    Main         Starting knx Plugin -- plugin.py:s                                                                                                                     tart:67
    2015-05-26 12:15:46,715 DEBUG    Main         Starting visu Plugin -- plugin.py:                                                                                                                     start:67
    2015-05-26 12:15:46,738 DEBUG    Main         Starting cli Plugin -- plugin.py:s                                                                                                                     tart:67
    2015-05-26 12:15:46,767 DEBUG    Main         Starting sql Plugin -- plugin.py:s                                                                                                                     tart:67
    2015-05-26 12:15:46,782 DEBUG    Main         Starting wol Plugin -- plugin.py:s                                                                                                                     tart:67
    2015-05-26 12:15:46,785 DEBUG    Connections  KNX: connected to 127.0.0.1:6720 -                                                                                                                     - connection.py:connect:392
    2015-05-26 12:15:46,786 DEBUG    Connections  KNX: enable group monitor -- __ini                                                                                                                     t__.py:handle_connect:125
    2015-05-26 12:15:46,790 DEBUG    Connections  KNX: init read -- __init__.py:hand                                                                                                                     le_connect:131
    2015-05-26 12:15:46,794 DEBUG    Main         KNX: 0.0.0 read 3/2/0 -- __init__.                                                                                                                     py:parse_telegram:211
    2015-05-26 12:15:46,794 DEBUG    Connections  WebSocket: binding to 0.0.0.0:2424                                                                                                                      (TCP) -- connection.py:connect:160
    2015-05-26 12:15:46,799 DEBUG    Connections  CLI: binding to 0.0.0.0:2323 (TCP)                                                                                                                      -- connection.py:connect:160
    2015-05-26 12:15:46,848 DEBUG    Main         knx: 1.1.17 set 3/2/0 to 22.0 -- _                                                                                                                     _init__.py:parse_telegram:198
    2015-05-26 12:15:51,747 DEBUG    env_init     Item env.core.version = 1.1.967.dev via Logic None None -- item.py:__update:369
    2015-05-26 12:15:51,750 DEBUG    env_init     Item env.core.start = 2015-05-26 12:15:51.749031+02:00 via Logic None None -- item.py:__update:369
    2015-05-26 12:15:51,753 DEBUG    env_init     Item env.system.name = bananapi via Logic None None -- item.py:__update:369
    2015-05-26 12:15:51,757 DEBUG    env_init     Item env.system.start = 2015-05-26 12:12:11.756305+02:00 via Logic None None -- item.py:__update:369
    2015-05-26 12:15:52,248 WARNING  Scheduler    No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:422
    2015-05-26 12:15:52,250 WARNING  Scheduler    No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:422
    2015-05-26 12:15:52,253 WARNING  Scheduler    No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:422
    2015-05-26 12:15:52,256 WARNING  Scheduler    No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:422
    2015-05-26 12:15:52,259 DEBUG    Scheduler    env_loc next time: 2015-05-26 12:45:52+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:52,289 DEBUG    sh.gc        Garbage collector: collected 0 objects. -- smarthome.py:_garbage_collection:517
    2015-05-26 12:15:52,326 DEBUG    sh.gc        Object references: 8315 -- smarthome.py:_maintenance:509
    2015-05-26 12:15:52,766 DEBUG    Scheduler    sh.gc next time: 2015-05-27 02:04:00+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:15:56,279 DEBUG    Main         knx: 0.0.0 set 1/0/0 to 4c0f38 -- __init__.py:parse_telegram:189
    2015-05-26 12:15:56,281 DEBUG    Main         knx: 0.0.0 set 1/0/1 to 1a050f -- __init__.py:parse_telegram:189
    2015-05-26 12:15:56,778 DEBUG    Scheduler    KNX time next time: 2015-05-26 12:25:56+02:00 -- scheduler.py:_next_time:303
    2015-05-26 12:16:01,332 DEBUG    env_stat     Item env.core.memory = 12197888 via Logic None None -- item.py:__update:369
    2015-05-26 12:16:01,429 DEBUG    env_stat     Item env.system.load = 0.12 via Logic None None -- item.py:__update:369
    2015-05-26 12:16:01,798 DEBUG    Scheduler    env_stat next time: 2015-05-26 12:21:01+02:00 -- scheduler.py:_next_time:303

    b) Rolladen Problem
    wahrscheinlich habe ich einen Denkfehler. Oder das Problem hängt mit Punkt a) zusammen.
    Rolläden sollen um 10 Uhr hoch und um 22 Uhr runter fahren.
    logic.conf:
    Code:
    [rolladenfahrenrunter]
    crontab = 00 22 * *
    sh.knx.groupwrite('2/1/1', 1, '1')
    [rollladenfahrenhoch]
    crontab = 00 10 * *
    sh.knx.groupwrite('2/1/1', 1, '0')

    #2
    Hallo Stefan,

    Willkommen hier im Forum.

    a) Wie kommst Du darauf?
    Code:
    2015-05-26 12:15:56,279 DEBUG    Main         knx: 0.0.0 set 1/0/0 to 4c0f38 -- __init__.py:parse_telegram:189
    2015-05-26 12:15:56,281 DEBUG    Main         knx: 0.0.0 set 1/0/1 to 1a050f -- __init__.py:parse_telegram:189
    Das wird doch geschickt. Da liegt wohl ein anderes Problem vor.

    b) In die Logic.conf kann man keine Befehle direkt eintragen, die müssen in eigene Files gepackt werden und der Dateiname mit filename = angegeben werden.
    Alternativ könnte man das auch direkt an einem Item verwenden: http://mknx.github.io/smarthome/config.html

    Bis bald

    Marcus

    P.S. Aussagekräftige Threadtitel wären noch toll.

    Kommentar


      #3
      a) komisch, im ETS4 Gruppenmonitor zeigt er nichts an. Evtl weil ich kein Gerät habe, dass "Zeit" speichern kann? Auch bekomme ich keine Antwort wenn ich 1/0/0 im Gruppenmonitor "Lesen" will. Werde auf jenden Fall in Zukunft den sh.py -d output aufmerksamer lesen

      b) in der items.conf bekomme ich es nicht hin, hab vieles probiert. Ich verstehe wie ich dort items definiere. Aber nicht, wie ich deren Wert ändere
      Code:
      [rolladenfahrenruntertest]
      type = bool
      knx_dpt = 1
      crontab = 57 18 * *
      eval = sh.knx.groupwrite('2/1/1', 1, '1')
      [rolladenfahrenruntertest2]
      type = bool
      knx_dpt = 1
      crontab = 58 18 * *
      sh.knx.groupwrite('2/1/1', 1, '1')
      geht beides nicht. Würde mich interessieren, wie ich das Problem in der items.conf lösen kann.

      ansonsten klappt es jetzt mit der neuen logic.conf
      Code:
      [rollladenfahrenhoch]
      crontab = 25 19 * *
      filename = rolladenfahrenhoch.py
      und sh.knx.groupwrite('2/1/1', 1, '1') in der Datei rolladenfahrenhoch.py

      Vielen Dank!

      PS: werde versuchen Threadtitel aus Lesersicht zu wählen...kommt wahrscheinlich bald zu ephem...aber noch hab ich da nicht aufgegeben.

      Kommentar


        #4
        Code:
        [rolladenfahren]
        type = bool
        knx_dpt = 1
        knx_send = 2/1/1
        enforce_updates = yes
        crontab = 58 18 * * = 1 | 58 6 * * = 0
        hth

        Marcus

        Kommentar

        Lädt...
        X