Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Gleichung in Blockly

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Gleichung in Blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nordischerjung @Dutchman last edited by

      @dutchman dann hat der Wemos nicht mehr die ESPeasy Seite, richtig? Ich habe dort den 4-fach Analog ADS1115 und ein AZDelivery 0,96 Zoll OLED Display I2C SSD1306 Chip 128 x 64 Pixel dran. muss das dann komplett neu eingegeben werden oder wird das von ESPHome direkt übernommen. Muss mich damit mal beschäftigen. Vielleicht ja heute Abend 😝

      Dutchman 1 Reply Last reply Reply Quote 0
      • Dutchman
        Dutchman Developer Most Active Administrators @Nordischerjung last edited by

        @nordischerjung sagte in Gleichung in Blockly:

        @dutchman dann hat der Wemos nicht mehr die ESPeasy Seite, richtig? Ich habe dort den 4-fach Analog ADS1115 und ein AZDelivery 0,96 Zoll OLED Display I2C SSD1306 Chip 128 x 64 Pixel dran. muss das dann komplett neu eingegeben werden oder wird das von ESPHome direkt übernommen. Muss mich damit mal beschäftigen. Vielleicht ja heute Abend 😝

        muss man übernehmen, die Sensoren kannst so übernehmen wie in der yaml display ist kleines bissl komplizierten man kan aber die sensor werte Director aufs display geben
        https://esphome.io/components/display/index.html

        hab mich bis jetzt noch nicht wirklich mit displays bescchaeftigt, haupsaechlich Sensoren und Autoren hab dazu auch noch n issue offen beim adapter.

        was soll das display bei dir machen ?

        N 1 Reply Last reply Reply Quote 0
        • N
          Nordischerjung @Dutchman last edited by

          @dutchman im Display zeige ich die Werte, uhrzeit und IP Adresse an

          Dutchman 1 Reply Last reply Reply Quote 0
          • Dutchman
            Dutchman Developer Most Active Administrators @Nordischerjung last edited by

            @nordischerjung sagte in Gleichung in Blockly:

            @dutchman im Display zeige ich die Werte, uhrzeit und IP Adresse an

            ah na dan easy. 🙂 das geht alles in der yaml

            beispiel :

            sensor:
              - platform: ...
                # ...
                id: my_sensor
            
            display:
              - platform: ...
                # ...
                lambda: |-
                  it.printf(0, 0, id(my_font), "The sensor value is: %.1f", id(my_sensor).state);
                  // If the sensor has the value 30.02, the result will be: "The sensor value is: 30.0"
            

            man muss en syntax einmal verstehen, imm Grunde machst du hier einen sensor, dem sensor gibts du ne variable (in diesem all my_sensor) und dan kannste beim Display deinen text aufbauen und die texte variable einfuellen

            N 1 Reply Last reply Reply Quote 0
            • N
              Nordischerjung @Dutchman last edited by

              @dutchman sagte in Gleichung in Blockly:

              id(my_font), "The sensor value is: %.1f", id(my_sensor).state)

              Ich bin gerade dabei mit ESPHome umzugehen, wie mache ich das hier?

              b2e04a1c-1e50-4885-959b-3552fac58844-image.png

              und wie bekomme ich die Formel jetzt an die Eingänge?

              Dutchman 1 Reply Last reply Reply Quote 0
              • Dutchman
                Dutchman Developer Most Active Administrators @Nordischerjung last edited by

                @nordischerjung sagte in Gleichung in Blockly:

                @dutchman sagte in Gleichung in Blockly:

                id(my_font), "The sensor value is: %.1f", id(my_sensor).state)

                Ich bin gerade dabei mit ESPHome umzugehen, wie mache ich das hier?

                b2e04a1c-1e50-4885-959b-3552fac58844-image.png

                und wie bekomme ich die Formel jetzt an die Eingänge?

                Zeig mal deine yaml bitte

                N 1 Reply Last reply Reply Quote 0
                • N
                  Nordischerjung @Dutchman last edited by

                  @dutchman sagte in Gleichung in Blockly:

                  Zeig mal deine yaml bitte

                  Moin,

                  esphome:
                    name: grill
                    platform: ESP8266
                    board: d1_mini_pro #esp01_1m
                  
                  # Enable logging
                  logger:
                  
                  <<: !include secrets.yaml
                   
                  
                  
                  captive_portal:
                  
                  font:
                    - file: "Arial.ttf"
                      id: my_font
                      size: 20
                  # Activate i2c bus  
                  i2c:
                    sda: D2
                    scl: D1
                    scan: True
                    id: bus_a
                    
                  #Display OLED SSD 1306 128x64  
                  display:
                    - platform: ssd1306_i2c
                      model: "SSD1306 128x64"
                      reset_pin: D0
                      address: 0x3C
                      lambda: |-
                        it.print(0, 0, id(my_font), "Grilltemperatur: %.0f °C", id(gt).state)
                        
                  #ADS1115 4x AnalogIn      
                  ads1115:
                    - address: 0x48
                  #Sensor 0  
                  sensor:
                    - platform: ads1115
                      multiplexer: 'A0_GND'
                      gain: 6.144
                      name: "Grilltemperatur"
                      id: "gt"
                  #Sensor 1
                    - platform: ads1115
                      multiplexer: 'A1_GND'
                      gain: 6.144
                      name: "Fleischtemperatur1"
                      id: "ft1"
                  #Sensor 2
                    - platform: ads1115
                      multiplexer: 'A2_GND'
                      gain: 6.144
                      name: "Fleischtemperatur2"    
                      id: "ft2"
                  

                  Benötige ich die capitve_portal Zeile?
                  Ich hab die WiFi Einstellung in der Secret.yaml ausgelagert, kann ich dort auch einfach 2 Wifi Neztwerke hinterlegen unter wifi (nicht den Fallback)?

                  Dutchman 1 Reply Last reply Reply Quote 0
                  • Dutchman
                    Dutchman Developer Most Active Administrators @Nordischerjung last edited by

                    @nordischerjung sagte in Gleichung in Blockly:

                    Moin,

                    moinse, deine yaml hat nen Fehler

                    Schermafbeelding 2021-08-25 om 08.37.31.png

                    @nordischerjung sagte in Gleichung in Blockly:

                    Ich hab die WiFi Einstellung in der Secret.yaml ausgelagert, kann ich dort auch einfach 2 Wifi Neztwerke hinterlegen unter wifi (nicht den Fallback)?

                    https://esphome.io/components/wifi.html
                    Starting with version 1.10.0, you can give ESPHome a number of WiFi networks to connect to. ESPHome will then attempt to connect to the one with the highest signal strength.

                    To enable this mode, remove the ssid and password options from your wifi configuration and move everything under the networks key:

                    # Example configuration entry
                    wifi:
                      networks:
                      - ssid: FirstNetworkToConnectTo
                        password: VerySafePassword
                      - ssid: SecondNetworkToConnectTo
                        password: VerySafePassword
                      # Other options
                      # ...
                    
                    N 1 Reply Last reply Reply Quote 0
                    • N
                      Nordischerjung @Dutchman last edited by

                      @dutchman sagte in Gleichung in Blockly:

                      moinse, deine yaml hat nen Fehler

                      Ja ich weiß 😜
                      nur, wie behebe ich den? Weil er mit font nicht klar kommt. Wie installiere ich das?

                      a7c43795-67af-4796-b96a-7c2dd838c0f5-grafik.png

                      Dutchman FredF 2 Replies Last reply Reply Quote 0
                      • Dutchman
                        Dutchman Developer Most Active Administrators @Nordischerjung last edited by Dutchman

                        @nordischerjung sagte in Gleichung in Blockly:

                        nur, wie behebe ich den? Weil er mit font nicht klar kommt. Wie installiere ich das?

                        was soll my_font sein, ist ne variable die du nirgendwo definiert hast ?

                        dir fehlt das hier :

                        font:
                          - file: "fonts/Comic Sans MS.ttf"
                            id: my_font
                            size: 20
                        

                        Schermafbeelding 2021-08-25 om 12.33.08.png

                        https://esphome.io/components/display/index.html

                        N 1 Reply Last reply Reply Quote 0
                        • N
                          Nordischerjung @Dutchman last edited by

                          @dutchman Doch habe ich guck mal mein Screenshot

                          1 Reply Last reply Reply Quote 0
                          • FredF
                            FredF Most Active Forum Testing @Nordischerjung last edited by FredF

                            @nordischerjung Steht doch da:

                            Please install the pillow python package to use this feature. (pip install pillow)
                            
                            Dutchman 1 Reply Last reply Reply Quote 0
                            • Dutchman
                              Dutchman Developer Most Active Administrators @FredF last edited by

                              @fredf sagte in Gleichung in Blockly:

                              @nordischerjung Steht doch da:

                              Please install the pillow python package to use this feature. (pip install pillow)
                              

                              stimmmt er benutzt ne font die es standard nicht gibt

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                Nordischerjung @Dutchman last edited by

                                @dutchman Welche ist den Standard und wie installiere ich das? In der Konsole? Über ESPhome?

                                Dutchman 1 Reply Last reply Reply Quote 0
                                • Dutchman
                                  Dutchman Developer Most Active Administrators @Nordischerjung last edited by Dutchman

                                  @nordischerjung sagte in Gleichung in Blockly:

                                  @dutchman Welche ist den Standard und wie installiere ich das? In der Konsole? Über ESPhome?

                                  pip und Python ist lose vom ESPHome, liegt auf deinem linux system. also ja einfach auf der console

                                  pip install pillow
                                  

                                  oder probiere zum Testen de Eintrag ohne abhängigkeiten 😉

                                  N 1 Reply Last reply Reply Quote 0
                                  • N
                                    Nordischerjung @Dutchman last edited by

                                    @dutchman sagte in Gleichung in Blockly:

                                    @nordischerjung sagte in Gleichung in Blockly:

                                    @dutchman Welche ist den Standard und wie installiere ich das? In der Konsole? Über ESPhome?

                                    pip und Python ist lose vom ESPHome, liegt auf deinem linux system. also ja einfach auf der console

                                    pip install pillow
                                    

                                    Ich bin zu blöd dazu, funktioniert beides nicht. Aber ist pillow dann nicht schon vorhanden?

                                    sb@iobroker:~$  pip install pillow
                                    Defaulting to user installation because normal site-packages is not writeable
                                    Requirement already satisfied: pillow in ./.local/lib/python3.7/site-packages (8.3.1)
                                    sb@iobroker:~$
                                    
                                    

                                    oder probiere zum Testen de Eintrag ohne abhängigkeiten 😉

                                    INFO Compiling app...
                                    INFO Running:  platformio run -d /opt/iobroker/iobroker-data/esphome.0/grill
                                    Processing grill (board: d1_mini_pro; framework: arduino; platform: platformio/espressif8266@2.6.2)
                                    --------------------------------------------------------------------------------
                                    HARDWARE: ESP8266 80MHz, 80KB RAM, 16MB Flash
                                    PACKAGES: 
                                     - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
                                     - tool-esptool 1.413.0 (4.13) 
                                     - tool-esptoolpy 1.20800.0 (2.8.0) 
                                     - toolchain-xtensa 2.40802.200502 (4.8.2)
                                    Library Manager: Installing Update
                                    Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
                                    Dependency Graph
                                    |-- <ESPAsyncTCP-esphome> 1.2.3
                                    |   |-- <ESP8266WiFi> 1.0
                                    |-- <ESPAsyncWebServer-esphome> 1.3.0
                                    |   |-- <ESPAsyncTCP-esphome> 1.2.3
                                    |   |   |-- <ESP8266WiFi> 1.0
                                    |   |-- <Hash> 1.0
                                    |   |-- <ESP8266WiFi> 1.0
                                    |-- <ESP8266WiFi> 1.0
                                    |-- <ESP8266mDNS> 1.2
                                    |   |-- <ESP8266WiFi> 1.0
                                    |-- <Wire> 1.0
                                    |-- <DNSServer> 1.1.1
                                    |   |-- <ESP8266WiFi> 1.0
                                    Compiling .pioenvs/grill/src/main.cpp.o
                                    Compiling .pioenvs/grill/libd43/ESP8266WiFi/WiFiClient.cpp.o
                                    /opt/iobroker/iobroker-data/esphome.0/grill.yaml: In lambda function:
                                    /opt/iobroker/iobroker-data/esphome.0/grill.yaml:34:60: error: no matching function for call to 'esphome::display::DisplayBuffer::print(int, int, const char [26], float&)'
                                           it.print(0, 0, "Grilltemperatur: %.0f °C", id(gt).state)
                                                                                                ^
                                    /opt/iobroker/iobroker-data/esphome.0/grill.yaml:34:60: note: candidates are:
                                    In file included from src/esphome.h:15:0,
                                                     from src/main.cpp:3:
                                    src/esphome/components/display/display_buffer.h:140:8: note: void esphome::display::DisplayBuffer::print(int, int, esphome::display::Font*, esphome::Color, esphome::display::TextAlign, const char*)
                                       void print(int x, int y, Font *font, Color color, TextAlign align, const char *text);
                                            ^
                                    src/esphome/components/display/display_buffer.h:140:8: note:   candidate expects 6 arguments, 4 provided
                                    src/esphome/components/display/display_buffer.h:150:8: note: void esphome::display::DisplayBuffer::print(int, int, esphome::display::Font*, esphome::Color, const char*)
                                       void print(int x, int y, Font *font, Color color, const char *text);
                                            ^
                                    src/esphome/components/display/display_buffer.h:150:8: note:   candidate expects 5 arguments, 4 provided
                                    src/esphome/components/display/display_buffer.h:160:8: note: void esphome::display::DisplayBuffer::print(int, int, esphome::display::Font*, esphome::display::TextAlign, const char*)
                                       void print(int x, int y, Font *font, TextAlign align, const char *text);
                                            ^
                                    src/esphome/components/display/display_buffer.h:160:8: note:   candidate expects 5 arguments, 4 provided
                                    src/esphome/components/display/display_buffer.h:169:8: note: void esphome::display::DisplayBuffer::print(int, int, esphome::display::Font*, const char*)
                                       void print(int x, int y, Font *font, const char *text);
                                            ^
                                    src/esphome/components/display/display_buffer.h:169:8: note:   no known conversion for argument 3 from 'const char [26]' to 'esphome::display::Font*'
                                    /opt/iobroker/iobroker-data/esphome.0/grill.yaml:35:3: error: expected ';' before '}' token
                                           
                                       ^
                                    Compiling .pioenvs/grill/libd43/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
                                    *** [.pioenvs/grill/src/main.cpp.o] Error 1
                                    ========================= [FAILED] Took 11.44 seconds =========================
                                    
                                    Dutchman 1 Reply Last reply Reply Quote 0
                                    • Dutchman
                                      Dutchman Developer Most Active Administrators @Nordischerjung last edited by

                                      @nordischerjung sagte in Gleichung in Blockly:

                                      Ich bin zu blöd dazu, funktioniert beides nicht. Aber ist pillow dann nicht schon vorhanden?

                                      poste mal bitte deine komplette yaml. als text dan baue ich das bei mir nach

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        Nordischerjung @Dutchman last edited by

                                        @dutchman
                                        grill.txt
                                        secrets.txt

                                        So? iwas läuft hier mächtig schief, hatte das Display deaktiviert, dann Binary erzeugt und wollte die als Firmware in ESPeasy hochladen. Kam auch ein Fehler

                                        Update error: ERROR[9]: new Flash config wrong real: 4194304

                                        Dutchman 1 Reply Last reply Reply Quote 0
                                        • Dutchman
                                          Dutchman Developer Most Active Administrators @Nordischerjung last edited by

                                          @nordischerjung sagte in Gleichung in Blockly:

                                          @dutchman
                                          grill.txt
                                          secrets.txt

                                          So? iwas läuft hier mächtig schief, hatte das Display deaktiviert, dann Binary erzeugt und wollte die als Firmware in ESPeasy hochladen. Kam auch ein Fehler

                                          Update error: ERROR[9]: new Flash config wrong real: 4194304

                                          ich schaue es mir nach der Arbeit mal an 🙂

                                          1 Reply Last reply Reply Quote 0
                                          • Dutchman
                                            Dutchman Developer Most Active Administrators last edited by

                                            so nachdem ich mich diesem morgen damit beschäftigt habe, wurde mir mal wieder deutlich das auch ich lesen muss 😛

                                            Laut ESPHome docu fuer Displays :

                                            Drawing Static Text
                                            The rendering engine also has a powerful font drawer which integrates seamlessly into ESPHome. Whereas in most Arduino display projects you have to use one of a few pre-defined fonts in very specific sizes, with ESPHome you have the option to use any TrueType (.ttf) font file at any size! Granted the reason for it is actually not having to worry about the licensing of font files :)
                                            
                                            To use fonts you first have to define a font object in your ESPHome configuration file. Just grab a .ttf file from somewhere on the internet and place it, for example, inside a fonts folder next to your configuration file.
                                            

                                            Ergo, man muss sich selber irgendwo eine *.ttf laden, diese ins Verzeichnis kopieren und dan gehts auch :))

                                            Die Datei gehört in /opt/iobroker/iobroker-data/esphome.0/
                                            

                                            ich habe da nen ordner fonts erstellt und es da rein kopiert :

                                            ls -l /opt/iobroker/iobroker-data/esphome.0/fonts/
                                            total 10572
                                            -rw-rw-r--+ 1 iobroker iobroker  584424 Aug 26 12:32 FreeMono.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  296284 Aug 26 12:32 FreeMonoBold.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  295360 Aug 26 12:32 FreeMonoBoldOblique.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  390692 Aug 26 12:32 FreeMonoOblique.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker 1563256 Aug 26 12:32 FreeSans.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  416128 Aug 26 12:32 FreeSansBold.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  342488 Aug 26 12:32 FreeSansBoldOblique.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  763696 Aug 26 12:32 FreeSansOblique.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker 3303588 Aug 26 12:32 FreeSerif.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker 1310828 Aug 26 12:32 FreeSerifBold.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  608708 Aug 26 12:32 FreeSerifBoldItalic.ttf
                                            -rw-rw-r--+ 1 iobroker iobroker  922088 Aug 26 12:32 FreeSerifItalic.ttf
                                            

                                            und siehe da

                                            Schermafbeelding 2021-08-26 om 12.47.24.png

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            750
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            blockly
                                            3
                                            31
                                            1787
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo