<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.18057">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hallo Andreas,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>hier gibt es was einfacheres:</FONT></DIV>
<DIV><FONT size=2 face=Arial><A 
href="http://iot-playground.com/2-uncategorised/41-esp8266-ds18b20-temperature-sensor-arduino-ide">http://iot-playground.com/2-uncategorised/41-esp8266-ds18b20-temperature-sensor-arduino-ide</A>.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Denke das wäre sehr einfach auf VZ 
umzustricken?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Allerdings muss dann auch wieder manuell SSID, 
Passwort, VZ-UUID usw einkompiliert werden, genau das finde ich das Schöne 
bei esp8266.nu.</FONT></DIV>
<DIV><FONT size=3 face=Arial></FONT> </DIV>
<DIV><FONT size=3 face=Arial>Zitat:" Ich Ã¼berlege mir seit einiger Zeit etwas 
ähnliches, hatte allerdings eher daran gedacht Sensor und ESP in einem Gehäuse 
zu verbauen und damit WLAN-fähige Sensoren zu fabrizieren."</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Wie meinst Du das ? Eigentlich ist esp8266.nu doch 
schon genau das, nur halt noch ohne Gehäuse ?</FONT></DIV>
<DIV><FONT size=2 face=Arial>Die loggen bereits direkt, allerdings momentan nur 
zu bestimmter Hardware, man müsste nur die richtigen Syntax für VZ einbauen 
?</FONT></DIV>
<DIV><FONT size=2 face=Arial>Ich habe momentan 2 am laufen, die mit DHT22 und 
1Wire die Daten per MQTT zu FHEM schicken, Ã¼ber diesen Umweg schreibe ich 
in VZ.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Denke es gibt einige hier, die innerhalb einer 
Stunde den Code bei esp8266.nu so Ã¤ndern könnten, das direkt auf VZ geloggt 
wird.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>Falls es was zum löten und mitentwickeln gibt, 
gerne immer her damit.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Viele Grüße</FONT></DIV>
<DIV><FONT size=2 face=Arial>Klaus</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=cpuidle@gmail.com href="mailto:cpuidle@gmail.com">Andreas Goetz</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=volkszaehler-dev@demo.volkszaehler.org 
  href="mailto:volkszaehler-dev@demo.volkszaehler.org">volkszaehler.org</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 19, 2015 4:07 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vz-dev] Interessantes 
  ESP8266-Projekt - nur leider reichen meine Arduino-Kenntnisse nicht</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr>Hallo Klaus,<BR>
  <DIV class=gmail_extra><BR>
  <DIV class=gmail_quote>2015-11-15 20:35 GMT+01:00 Klaus Reichenecker <SPAN 
  dir=ltr><<A href="mailto:kr@kr123.de" 
  target=_blank>kr@kr123.de</A>></SPAN>:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><U></U>
    <DIV bgcolor="#ffffff">
    <DIV><FONT size=2 face=Arial>Zufällig habe ich dieses Projekt hier 
    gefunden:</FONT></DIV>
    <DIV><FONT size=2 face=Arial><A 
    href="http://www.esp8266.nu/index.php/Main_Page" 
    target=_blank>http://www.esp8266.nu/index.php/Main_Page</A></FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Dort wird Ã¼ber ein ESP-WIFI-Modul Daten an 
    verschiedene Heimautomatisierungs-Software geschickt.</FONT></DIV>
    <DIV><FONT size=2 face=Arial>Vorteil ist, das die Interfaces Ã¼ber eine 
    Weboberfläche programmiert werden können, also nicht jedes mal wenns ein 
    zusätzlicher Sensor ist oder sich die IP Ã¤ndert wieder Ã„nderungen am Code 
    nötig sind.</FONT></DIV></DIV></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>In der Tat ziemlich charmant!<BR> <BR></DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT size=2 face=Arial>Ich denke das wäre ein sehr einfacher Weg, 
    Sensoren für VZ zu realisieren ?</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Platinen gibts z.B. hier für 7 
    â‚¬:</FONT></DIV>
    <DIV><FONT size=2 face=Arial><A 
    href="http://www.ebay.de/itm/WIFI-ESP8266-Seriell-Dev-Modul-Drahtlos-Test-Board-Full-IO-Leads-ESP-12-TE301/311484720899?_trksid=p2047675.c100011.m1850&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D20140107083420%26meid%3D1d203b50fed94739822dba52b6ed0b3e%26pid%3D100011%26rk%3D1%26rkt%3D10%26sd%3D201464921200&tfrom=201464921200&tpos=unknow&ttype=price&talgo=origal" 
    target=_blank>http://www.ebay.de/itm/WIFI-ESP8266-Seriell-Dev-Modul-Drahtlos-Test-Board-Full-IO-Leads-ESP-12-TE301/311484720899?_trksid=p2047675.c100011.m1850&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D20140107083420%26meid%3D1d203b50fed94739822dba52b6ed0b3e%26pid%3D100011%26rk%3D1%26rkt%3D10%26sd%3D201464921200&tfrom=201464921200&tpos=unknow&ttype=price&talgo=origal</A></FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Leider unterstützt die Software momentan nur 
    verschiedene vorgegeben Heimautomatisierungs-Zentralen oder 
    ThingSpeak</FONT></DIV>
    <DIV><FONT size=2 face=Arial><A 
    href="http://www.esp8266.nu/index.php/EasyProtocols" 
    target=_blank>http://www.esp8266.nu/index.php/EasyProtocols</A></FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Es müsste ein rel. einfaches sein, die Software 
    so zu Ã¤ndern, das sie auch in VZ loggt ?</FONT></DIV>
    <DIV><FONT size=2 face=Arial>Mir fehlen aber leider die detailierten 
    Arduino-Programmierkenntnisse, um das zu 
  Ã¤ndern.</FONT></DIV></DIV></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>Ich Ã¼berlege mir seit einiger Zeit etwas Ã¤hnliches, hatte allerdings eher 
  daran gedacht Sensor und ESP in einem Gehäuse zu verbauen und damit 
  WLAN-fähige Sensoren zu fabrizieren.<BR><BR></DIV>
  <DIV>Entscheidender Knackpunkt für ESPeasy aus meiner Sicht ist die wirklich 
  kleine Community. Sicher gut für Anregungen, vmtl aber nicht dauerhaft als 
  tragfähige Basis. <BR><BR></DIV>
  <DIV>Mit meinen Experimenten bin ich leider noch nicht sehr weit da die ESPs 
  relativ zickig sind und einiges an Infrastruktur brauchen. Ich melde mich mit 
  Update wenns was berichtenswertes gibt.<BR><BR></DIV>
  <DIV>Wer programmieren oder löten kann und gerne mitmachen möchte kann sich 
  gerne melden!<BR></DIV>
  <DIV><BR> </DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Als, falls jemand Lust hat ?</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Viele Grüße</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Klaus</FONT></DIV></DIV></BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV>Viele Grüße,<BR></DIV>
  <DIV>Andreas<BR> <BR></DIV>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 face=Arial>Hier noch ein Beispiel wie Daten momentan 
    geschickt werden:</FONT></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV>//#######################################################################################################<BR>//########################### 
    Controller Plugin 001: Domoticz HTTP 
    ######################################<BR>//#######################################################################################################<BR><BR>#define 
    CPLUGIN_001<BR>#define CPLUGIN_ID_001        
     1<BR>#define CPLUGIN_NAME_001       "Domoticz 
    HTTP"<BR><BR>boolean CPlugin_001(byte function, struct EventStruct 
    *event)<BR>{<BR>  boolean success = false;<BR><BR>  switch 
    (function)<BR>  {<BR>    case CPLUGIN_PROTOCOL_ADD:<BR>  
        {<BR>        
    Protocol[++protocolCount].Number = CPLUGIN_ID_001;<BR>      
      strcpy_P(Protocol[protocolCount].Name, 
    PSTR(CPLUGIN_NAME_001));<BR>        
    Protocol[protocolCount].usesMQTT = false;<BR>        
    Protocol[protocolCount].usesAccount = false;<BR>        
    Protocol[protocolCount].usesPassword = false;<BR>        
    break;<BR>      }<BR><BR>    case 
    CPLUGIN_PROTOCOL_SEND:<BR>      {<BR>      
      char log[80];<BR>        boolean success = 
    false;<BR>        char host[20];<BR>      
      sprintf_P(host, PSTR("%u.%u.%u.%u"), Settings.Controller_IP[0], 
    Settings.Controller_IP[1], Settings.Controller_IP[2], 
    Settings.Controller_IP[3]);<BR><BR>        
    sprintf_P(log, PSTR("%s%s"), "HTTP : connecting to ", host);<BR>  
          addLog(LOG_LEVEL_DEBUG, log);<BR>      
      if (printToWeb)<BR>        {<BR>    
          printWebString += log;<BR>        
      printWebString += "<BR>";<BR>        
    }<BR>        // Use WiFiClient class to create TCP 
    connections<BR>        WiFiClient client;<BR>  
          if (!client.connect(host, 
    Settings.ControllerPort))<BR>        {<BR>    
          connectionFailures++;<BR>        
      strcpy_P(log, PSTR("HTTP : connection failed"));<BR>    
          addLog(LOG_LEVEL_ERROR, log);<BR>      
        if (printToWeb)<BR>            
    printWebString += F("connection failed<BR>");<BR>      
        return false;<BR>        }<BR>  
          if (connectionFailures)<BR>        
      connectionFailures--;<BR><BR>        // We now 
    create a URI for the request<BR>        String url = 
    F("/json.htm?type=command&param=udevice&idx=");<BR>    
        url += event->idx;<BR><BR>        
    switch (event->sensorType)<BR>        {<BR>  
            case SENSOR_TYPE_SINGLE:      
                    // single value 
    sensor, used for Dallas, BH1750, etc<BR>          
      url += F("&svalue=");<BR>          
      url += UserVar[event->BaseVarIndex];<BR>      
          break;<BR>          case 
    SENSOR_TYPE_TEMP_HUM:                
          // temp + hum + hum_stat, used for DHT11<BR>  
              url += F("&svalue=");<BR>  
              url += 
    UserVar[event->BaseVarIndex];<BR>          
      url += ";";<BR>            url += 
    UserVar[event->BaseVarIndex + 1];<BR>          
      url += ";0";<BR>            
    break;<BR>          case 
    SENSOR_TYPE_TEMP_BARO:              
            // temp + hum + hum_stat + bar + bar_fore, used 
    for BMP085<BR>            url += 
    F("&svalue=");<BR>            url += 
    UserVar[event->BaseVarIndex];<BR>          
      url += ";0;0;";<BR>            url += 
    UserVar[event->BaseVarIndex + 1];<BR>          
      url += ";0";<BR>            
    break;<BR>          case 
    SENSOR_TYPE_SWITCH:<BR>            url = 
    F("/json.htm?type=command&param=switchlight&idx=");<BR>    
            url += event->idx;<BR>      
          url += F("&switchcmd=");<BR>      
          if (UserVar[event->BaseVarIndex] == 0)<BR>  
                url += "Off";<BR>    
            else<BR>          
        url += "On";<BR>            
    break;<BR>          case 
    SENSOR_TYPE_DIMMER:<BR>            url = 
    F("/json.htm?type=command&param=switchlight&idx=");<BR>    
            url += event->idx;<BR>      
          url += F("&switchcmd=");<BR>      
          if (UserVar[event->BaseVarIndex] == 0)<BR>  
                url += "Off";<BR>    
            else<BR>          
      {<BR>              url += 
    F("Set%20Level&level=");<BR>            
      url += UserVar[event->BaseVarIndex];<BR>      
          }<BR>            
    break;<BR>        }<BR><BR>        
    url.toCharArray(log, 80);<BR>        
    addLog(LOG_LEVEL_DEBUG_MORE, log);<BR>        if 
    (printToWeb)<BR>        {<BR>        
      printWebString += log;<BR>          
    printWebString += "<BR>";<BR>        
    }<BR><BR>        // This will send the request to the 
    server<BR>        client.print(String("GET ") + url + " 
    HTTP/1.1\r\n" +<BR>                
         "Host: " + host + "\r\n" +<BR>      
                   "Connection: 
    close\r\n\r\n");<BR><BR>        unsigned long timer = 
    millis() + 200;<BR>        while (!client.available() 
    && millis() < timer)<BR>          
    delay(1);<BR><BR>        // Read all the lines of the 
    reply from server and print them to Serial<BR>        
    while (client.available()) {<BR>          String 
    line = client.readStringUntil('\n');<BR>          
    line.toCharArray(log, 80);<BR>          
    addLog(LOG_LEVEL_DEBUG_MORE, log);<BR>          if 
    (line.substring(0, 15) == "HTTP/1.1 200 OK")<BR>        
      {<BR>            strcpy_P(log, 
    PSTR("HTTP : Succes!"));<BR>            
    addLog(LOG_LEVEL_DEBUG, log);<BR>            
    if (printToWeb)<BR>              
    printWebString += F("Success<BR>");<BR>        
        success = true;<BR>          
    }<BR>          delay(1);<BR>      
      }<BR>        strcpy_P(log, PSTR("HTTP : closing 
    connection"));<BR>        addLog(LOG_LEVEL_DEBUG, 
    log);<BR>        if (printToWeb)<BR>      
        printWebString += F("closing 
    connection<BR>");<BR><BR>        
    client.flush();<BR>        client.stop();<BR><BR>  
          break;<BR>      }<BR><BR>  
    }<BR>  return success;<BR>}<BR><BR>boolean Domoticz_getData(int idx, 
    float *data)<BR>{<BR>  boolean success = false;<BR>  char 
    host[20];<BR>  sprintf_P(host, PSTR("%u.%u.%u.%u"), 
    Settings.Controller_IP[0], Settings.Controller_IP[1], 
    Settings.Controller_IP[2], Settings.Controller_IP[3]);<BR><BR>  // Use 
    WiFiClient class to create TCP connections<BR>  WiFiClient 
    client;<BR>  if (!client.connect(host, 
    Settings.ControllerPort))<BR>  {<BR>    
    connectionFailures++;<BR>    return false;<BR>  }<BR>  
    if (connectionFailures)<BR>    connectionFailures--;<BR><BR>  
    // We now create a URI for the request<BR>  String url = 
    F("/json.htm?type=devices&rid=");<BR>  url += idx;<BR><BR>  // 
    This will send the request to the server<BR>  client.print(String("GET 
    ") + url + " HTTP/1.1\r\n" +<BR>            
       "Host: " + host + "\r\n" +<BR>        
           "Connection: close\r\n\r\n");<BR><BR>  
    unsigned long timer = millis() + 200;<BR>  while (!client.available() 
    && millis() < timer)<BR>    delay(1);<BR><BR>  // 
    Read all the lines of the reply from server and print them to 
    Serial<BR><BR>  while (client.available()) {<BR>    String 
    line = client.readStringUntil('\n');<BR>    if (line.substring(10, 
    14) == "Data")<BR>    {<BR>      String strValue = 
    line.substring(19);<BR>      byte pos = strValue.indexOf(' 
    ');<BR>      strValue = strValue.substring(0, pos);<BR>  
        strValue.trim();<BR>      float value = 
    strValue.toFloat();<BR>      *data = value;<BR>    
      success = true;<BR>    }<BR>  }<BR>  return 
    success;<BR>}<BR></DIV>
    <DIV><FONT size=2 face=Arial></FONT> </DIV>
    <DIV><FONT size=2 
  face=Arial></FONT> </DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></BLOCKQUOTE></BODY></HTML>