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 Ja das kenne ich, aber damit bekomme ich doch nicht die Formel berechnet. Ich kann nicht mal die ganze Formel dort eintragen

      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 Ja das kenne ich, aber damit bekomme ich doch nicht die Formel berechnet. Ich kann nicht mal die ganze Formel dort eintragen

        eh doch... musst die Formel nur richtig aufbauen das geht

        das ist doch deine Formel ?

         Temp = (1.0 / (c1 + c2 * ADC-Wert + c3 * ADC-Wert *ADC-Wert * ADC-Wert));  // in Kelvin
         Temp = Temp - 273.15;                     // von Kelvin nach Grad Celsius
        

        da sind schonmal 2 Berechnungen drin das muss zurueck zur einer Formel, z.b.:

        (1.0 / (c1 + c2 * ADC-Wert + c3 * ADC-Wert *ADC-Wert * ADC-Wert)) - 273.15
        

        der ADC wert (vom sensor) ist eine variable %value%, also ungefähr so :

        (1.0 / (c1 + c2 * %value% + c3 * %value% *%value% * %value%)) - 273.15
        
        

        und mathematisch sichere waehre :

        (1.0 / (c1 + (c2 * %value%) + ((c3 * %value%) *%value% * %value%))) - 273.15
        
        
        N 1 Reply Last reply Reply Quote 0
        • N
          Nordischerjung @Dutchman last edited by

          @dutchman Hmm

          9e9d066d-6078-4fb4-8bbc-e754f669aa01-grafik.png

          mehr geht da nicht reinzuschreiben. Normalerweise müsste die Formel dann so aussehen

          (1.0 / (0.001129148 + 0.000234125 * (%value% / (1024 - %value%))  + 0.0000000876741 * (%value% / (1024 - %value%)) * (%value% / (1024 - %value%)) * (%value% / (1024 - %value%)))) - 273.15
          
          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 Hmm

            9e9d066d-6078-4fb4-8bbc-e754f669aa01-grafik.png

            mehr geht da nicht reinzuschreiben. Normalerweise müsste die Formel dann so aussehen

            (1.0 / (0.001129148 + 0.000234125 * (%value% / (1024 - %value%))  + 0.0000000876741 * (%value% / (1024 - %value%)) * (%value% / (1024 - %value%)) * (%value% / (1024 - %value%)))) - 273.15
            

            dan ist der Webinterface abgeschnitten, es geht definitiv länger oder nimm halt ESPHome 🙂

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

              @dutchman sagte in Gleichung in Blockly:

              dan ist der Webinterface abgeschnitten, es geht definitiv länger oder nimm halt ESPHome 🙂

              damit hab ich mich ja noch gar nicht befasst 🤔

              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 sagte in Gleichung in Blockly:

                dan ist der Webinterface abgeschnitten, es geht definitiv länger oder nimm halt ESPHome 🙂

                damit hab ich mich ja noch gar nicht befasst 🤔

                Du hast 3 moeglichkeiten

                • die Formel in espeasy entragen auch wen man es nicht sieht
                • die Berechnung in nem blockly/javascript machen
                • umstellen auf ESPHome und es damit machen, hier meine docu dazu : https://drozmotix.github.io/languages/de/Adapter/ESPHome/01.basics.html
                Dutchman 1 Reply Last reply Reply Quote 0
                • Dutchman
                  Dutchman Developer Most Active Administrators @Dutchman last edited by Dutchman

                  @Nordischerjung

                  und bei Interesse hier mal ne Beispiel config der analogen sensor

                  sensor:
                    - platform: adc
                      pin: 35
                      # unit_of_measurement: '%' <<< wen du as # wecknimmst kan man hier die Einheit übergeben
                      attenuation: 11db
                      accuracy_decimals: 4
                      filters:
                        - median:
                            window_size: 7
                            send_every: 5
                            send_first_at: 1
                      # filters:
                      #   - lambda: |-
                      #       if (x > 1.1) {
                      #         return 0;
                      #       } else if (x < 0.51) {
                      #         return 100;
                      #       } else {
                      #         return (1.1-x) / (1.1-0.51) * 100.0;
                      #       }
                      name: "Palm Luca"
                      update_interval: 5s
                  
                  

                  Info zu den filtern : https://esphome.io/components/sensor/index.html

                  beispiel meiner dev Umgebung, dhabe die Berechnung momentan kurz ausgeschaltet da ich es anders ueebewache
                  Schermafbeelding 2021-08-24 om 16.20.04.png

                  N 1 Reply Last reply Reply Quote 0
                  • 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
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            468
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            blockly
                                            3
                                            31
                                            1794
                                            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