+ Antworten
Seite 12 von 18 ErsteErste ... 2 10 11 12 13 14 ... LetzteLetzte
Ergebnis 111 bis 120 von 179

Thema: Tempest

  1. #111
    Registriert seit
    Sep 2009
    Beiträge
    1,261

    UDP Socket läuft auf Anhieb.

    Gibt es für unsere Lokale Anwendung eigentlich einen Vorteil die REST API oder den Socket zu nutzen ?
    OAUTH bzw. Dauer Token ist lokal aus meiner Sicht auch überflüssig
    Symcon 5.5 Windows + RASPI / KNX + Homematic + RAZBERRY / IPSVIEW

  2. #112
    Registriert seit
    Feb 2013
    Ort
    Grünstadt
    Beiträge
    32

    ich habe meine heute auch bekommen. Danke @bumaas.
    Installation nach Anleitung hat funktioniert. Und ist auch schon draußen montiert.
    Datenempfang über UDP Socket funktioniert auch.

  3. #113
    Registriert seit
    Jul 2010
    Ort
    Südwestpfalz
    Beiträge
    7,152

    Danke Michael, gerade wurde mir das Paket in die Hand gedrückt.

    Nun hab ich noch ne neue Baustelle.


    Gesendet von iPhone XS mit Tapatalk
    Gruß Boui . . . IPS-unlim. auf Tinker Board S und aktuell auf einem Pi3 läuft pivccu3

    Die gefährlichste Form der Zensur ist die Schere im eigenen Kopf.(Curzio Malaparte)

  4. #114
    Registriert seit
    Jan 2010
    Beiträge
    317

    Gibt hier wen der noch weis wie man an das Gerät ran kommt ( kaufen kann) ?

  5. #115
    Registriert seit
    Sep 2009
    Beiträge
    1,261

    Standard Auslesen und speichern der Wetter Daten

    1.) UDP Socket anlegen (siehe Screenshot Paresy)
    2.) Unten stehendes Script anlegen
    3.) Register Variable erzeugen und mit UDP Socket sowie Script verbinden

    Jetzt Geduld und warten bis sich die Variablen füllen (dauert ca.2 Min.)

    Änderungen (Stand 23.11.2020) : Automatische Ermittlung der Archiv Handler ID hinzugefügt plus Error Codes und Profil Farben + Logging optimiert, Fehler in der Status Ermittlung behoben

    Änderungen 27.11.2020 : Besser Strukturiert, Batterieprofil angelegt das Energie Sparmaßnahmen unterschiedlich nach Laden und Entladen zeigt, Alle übermittelte Daten werden jetzt interpretiert und die Rohdaten zusätzlich mit abgelegt

    Fehler behoben (Falsches Profil bei Reboot Count und Bus Error Count)



    PHP-Code:

    <?php

    $profil_update 
    false;
    $trigger_value_volt_change 0.004;


    if (
    $_IPS['SENDER'] == "RegisterVariable"
    {
        
    $data $_IPS['VALUE'];  
        
    $array json_decode($datatrue);
    }
    elseif(
    $_IPS['SENDER'] == "Execute")
    {
        
    $data GetValueString(25581); // Für Testzwecke ID der Variablen für Rohdaten eingeben. Die Variable wird in jeder Kategorie  angelegt und gefüllt wenn das Script über die Registervariable gestartet wird.
        
    $array unserialize($data); 
    }
    else
    {
      return;  
    }

    $config initialize_framework();
    $prefix_profil_name $config['prefix_profil_name'];
    $variable_types $config['variable_types'];

    $cat_id check_category($array['type'],$_IPS['SELF']);

    foreach (
    $config['profile_names'] as $key => $val)
    {
        
    check_profile($profil_update,$prefix_profil_name.$key,$val['type'],$val['nachkommastellen'],$val['prefix'],$val['suffix'],$val['association'],$val['minimalwert'],$val['maximalwert'],$val['schrittweite']);
    }

    $var_id check_variable($_IPS['SELF'],'Rohdaten',$variable_types['String'],'~TextBox','0',false);
    SetValueString($var_id,serialize($array));

    if(
    $array['type'] == "obs_st")

        
    $detailed_data $array['obs'][0];
        
    $data_descriptions $config['data_descriptions']['obs_st'];
        foreach(
    $detailed_data as $key => $val)
        {
            foreach(
    $config['profile_names']   as $key1 => $val1)
            { 
                if(
    in_array($data_descriptions[$key],$val1,true))
                {
                    
    $var_id check_variable($cat_id,   $data_descriptions[$key],$val1['type'], $prefix_profil_name.$key1 ,'0',true);
                    
    SetValue($var_id,$val);
                }
                else
                {

                }
            }
        }
        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));

        
    $archive_id IPS_GetInstanceListByModuleID ('{43192F0B-135B-4CE7-A0A7-1475603F3060}')[0];
        
    $var_id IPS_GetObjectIDByName ('Battery',$cat_id);
        
    $werte AC_GetLoggedValues ($archive_id,$var_id , (time()-600), time(), 2);
        if(
    is_array$werte))
        { 
            if(
    array_key_exists(1,$werte))
            { 
                
    $delta $werte[0]['Value'] - $werte[1]['Value'];
                if(
    $delta $trigger_value_volt_change)
                    {
                        
    $var_id1 check_variable($cat_id,'Battery Status',$variable_types['Float'],$prefix_profil_name.'discharge','0',false);
                        
    IPS_SetVariableCustomProfile ($var_id1,'Tempest_discharge');
                        
    SetValueFloat($var_id1,GetValueFloat($var_id));
                    }
                    else
                    {
                        
    $var_id1 check_variable($cat_id,'Battery Status',$variable_types['Float'],$prefix_profil_name.'discharge','0',false);
                        
    IPS_SetVariableCustomProfile ($var_id1,'Tempest_charge');
                        
    SetValueFloat($var_id1,GetValueFloat($var_id));

                    }
            }
        }
        else
        {

        }

    }
    elseif(
    $array['type'] == "device_status")
    {
        
    $detailed_data $array;
        
    $data_descriptions $config['data_descriptions']['device_status'];

        foreach(
    $detailed_data as $key => $val)
        {
            
    $index 0;
            foreach(
    $config['profile_names']   as $key1 => $val1)
            { 
                if(
    in_array($key,$val1,true))
                { 
                    
    $var_id check_variable($cat_id$key,$val1['type'], $prefix_profil_name.$key1 ,'0',true);
                    
    SetValue($var_id,$val);
                }
                else
                {

                }     
            }
            
    $index $index+1;
         }
        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));

    }
    elseif(
    $array['type'] == "hub_status")
    {
        
    $detailed_data $array;
        
    $data_descriptions $config['data_descriptions']['hub_status'];
        
    $array_variablen = array("radio_stats");
        
    $profil_names $config['data_descriptions']['radio_stats'];
        foreach(
    $detailed_data as $key => $val)
        {
            
    $index 0;
            foreach(
    $config['profile_names']   as $key1 => $val1)
            { 
                if(
    in_array($key,$val1,true))
                {   
                    if(!
    in_array($key,$array_variablen,true))
                    { 
                        
    $var_id check_variable($cat_id$key,$val1['type'], $prefix_profil_name.$key1 ,'0',true);
                        
    SetValue($var_id,$val);
                    }
                    else
                    {
                        foreach(
    $val as $key2 => $val2)
                        {
                            foreach(
    $config['profile_names']   as $key3 => $val3)
                            { 
                                if(
    in_array($profil_names[$key2],$val3,true))
                                {   
                                    
    $var_id check_variable($cat_id$profil_names[$key2],$val3['type'], $prefix_profil_name.$key3,'0',true);
                                    
    SetValue($var_id,$val2);
                                }  
                            }
                        }
                    }
                }
                else
                {

                }     
            }
            
    $index $index+1;
         }
        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));


    }
    elseif(
    $array['type'] == "rapid_wind")
    {       
        
    $var_id check_variable($cat_id,'Time Epoch',$variable_types['Integer'],$prefix_profil_name.'seconds','0',false);
        
    SetValue($var_id,$array['ob'][0]);
        
    $var_id check_variable($cat_id,'Wind Speed',$variable_types['Float'],$prefix_profil_name.'meter_per_second','0',true);
        
    SetValue($var_id,$array['ob'][1]);
        
    $var_id check_variable($cat_id,'Wind Direction',$variable_types['Integer'],$prefix_profil_name.'degrees','0',true);
        
    SetValue($var_id,$array['ob'][2]);
        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));
           
    }
    elseif(
    $array['type'] == "evt_precip")
    {
        
    $var_id check_variable($cat_id,'Rain Start Event',$variable_types['Integer'],$prefix_profil_name.'seconds','0',true);
        
    SetValue($var_id,$array['evt_precip']['evt']);

        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));
    }
    elseif(
    $array['type'] == "evt_strike")
    {
        
    $var_id check_variable($cat_id,'Time Epoch',$variable_types['Integer'],$prefix_profil_name.'seconds','0',true);
        
    SetValue($var_id,$array['evt_strike']['evt'][0]);

        
    $var_id check_variable($cat_id,'Distance',$variable_types['Float'],$prefix_profil_name.'km','0',true);
        
    SetValue($var_id,$array['evt_strike']['evt'][1]);

        
    $var_id check_variable($cat_id,'Energy',$variable_types['Integer'],$prefix_profil_name.'energy','0',true);
        
    SetValue($var_id,$array['evt_strike']['evt'][2]);

        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));
    }
    else
    {
        
    $var_id check_variable($cat_id,'Rohdaten',$variable_types['String'],'~TextBox','0',false);
        
    SetValueString($var_id,serialize($array));
    }


    function 
    initialize_framework()
    {
        
    $config['prefix_profil_name'] = 'Tempest_';
    //----------------------------------------------------------------------------------------------
        
    $green =  hexdec('0x006400');
        
    $red =    hexdec('0xFF0000');
        
    $orange hexdec('0xFFA500');
        
    $yellow hexdec('0xcbcf00');
        
    $blue =   hexdec('0x0000FF');
        
    $purple hexdec('0x800080');

    //----------------------------------------------------------------------------------------------

        
    $config['data_descriptions']['obs_st'] = [
                                        
    => 'Time Epoch',
                                        
    => 'Wind Lull (minimum 3 second sample)',
                                        
    => 'Wind Avg (average over report interval)',
                                        
    => 'Wind Gust (maximum 3 second sample)',
                                        
    => 'Wind Direction',
                                        
    => 'Wind Sample Interval',
                                        
    => 'Station Pressure',
                                        
    => 'Air Temperature',
                                        
    => 'Relative Humidity',
                                        
    => 'Illuminance',
                                        
    10 => 'UV',
                                        
    11 => 'Solar Radiation',
                                        
    12 => 'Precip Accumulated',
                                        
    13 => 'Precipitation Type',
                                        
    14 => 'Lightning Strike Avg Distance',
                                        
    15 => 'Lightning Strike Count',
                                        
    16 => 'Battery',
                                        
    17 => 'Report Interval'
                                        
    ];

     
    $config['data_descriptions']['device_status'] = [
                                        
    => 'serial_number',
                                        
    => 'type',
                                        
    => 'hub_sn',
                                        
    => 'timestamp',
                                        
    => 'uptime',
                                        
    => 'voltage',
                                        
    => 'firmware_revision',
                                        
    => 'rssi',
                                        
    => 'hub_rssi',
                                        
    => 'sensor_status',
                                        
    10 => 'debug'
                                         
    ];

    $config['data_descriptions']['hub_status'] = [
                                        
    => 'serial_number',
                                        
    => 'type',
                                        
    => 'firmware_revision',
                                        
    => 'uptime',
                                        
    => 'rssi',
                                        
    => 'timestamp',
                                        
    => 'reset_flags',
                                        
    => 'seq',
                                        
    => 'fs',
                                        
    => 'radio_stats',
                                       
    10 => 'mqtt_stats'
                                         
    ];

     
    $config['data_descriptions']['radio_stats'] = [
                                        
    => 'Version',
                                        
    => 'Reboot Count',
                                        
    => 'I2C Bus Error Count',
                                        
    => 'Radio Status',
                                        
    => 'Radio Network ID'
                                         
    ];


     
    //---------------------------------------------------------------------------------------------------------

       
    $association_radio_stats['Text'] = [
                                        
    => ' Radio Off',
                                        
    => ' Radio On',
                                        
    => ' Radio Active' 
                                          
    ];

        
    $association_radio_stats['Color'] =[
                                        
    => $red,
                                        
    => $blue,
                                        
    => $green          
                                        
    ]; 

        
    $association_error_codes['Text'] = [
                                        
    => 'Sensors OK',
                                        
    => 'lightning failed',
                                        
    => 'lightning noise'
                                        
    => 'lightning disturber'
                                        
    => 'pressure failed',
                                        
    16 => 'temperature failed'
                                        
    32 => 'rh failed'
                                        
    64 => 'wind failed'
                                        
    128 => 'precip failed'
                                        
    256 => 'light/uv failed' 
                                            
    ];

        
    $association_error_codes['Color'] =[
                                        
    => $green,
                                        
    => $red,
                                        
    => $orange,          
                                        
    => $yellow
                                        
    => $red,
                                        
    16 =>  $red,
                                        
    32 =>  $red
                                        
    64 =>  $red
                                        
    128 => $red
                                        
    256 => $red 
                                            
    ]; 

        
    $association_percerception['Text'] = [
                                        
    => 'none',
                                        
    => 'rain',
                                        
    => 'hail'
                                             
    ];

        
    $association_percerception['Color'] = [
                                        
    => $green ,
                                        
    => $blue,
                                        
    => $red
                                              
    ];

        
    $association_uv_index['Text'] = [
                                        
    => 'Low',
                                        
    => 'Medium',
                                        
    => 'High' ,
                                        
    => 'Very High',
                                        
    11 => 'Extremly High'
                                        
    ];

        
    $association_uv_index['Color'] = [
                                        
    => $green ,
                                        
    => $yellow ,
                                        
    => $orange,
                                        
    => $red,
                                        
    11 => $purple
                                         
    ];
        
    $association_battery_charge['Text'] = [
                                        
    => '+ Hybernate',
                                        
    => ' + Wind 5 Min NO Lightning+Rain',
                                        
    => ' + Wind sampling interval set to one minute' ,
                                        
    => ' + Wind every 6 sec.',
                                        
    => ' + All sensors enabled and operating at full performance'
                                        
    ];

        
    $association_battery_charge['Color'] = [
                                        
    => $purple,
                                        
    => $red,
                                        
    => $orange,
                                        
    => $yellow,
                                        
    => $green
                                         
    ];

        
    $association_battery_charge['values'] = [
                                        
    => '2,33',
                                        
    => '2,355',
                                        
    => '2,375',
                                        
    => '2,41',
                                        
    => '2,455'
                                         
    ];

       
    $association_battery_discharge['Text'] = [
                                        
    => ' - Hybernate',
                                        
    => ' - Wind 5 Min NO Lightning+Rain',
                                        
    => ' - Wind sampling interval set to one minute' ,
                                        
    => ' - Wind every 6 sec.',
                                        
    => ' - All sensors enabled and operating at full performance'
                                        
    ];

        
    $association_battery_discharge['Color'] = [
                                        
    => $purple,
                                        
    => $red,
                                        
    => $orange,
                                        
    => $yellow,
                                        
    => $green
                                         
    ];



    $association_battery_discharge['values'] = [
                                        
    => '2,33',
                                        
    => '2,355',
                                        
    => '2,39',
                                        
    => '2,415',
                                        
    => '2,455'
                                         
    ];

    //----------------------------------------------------------------------------------------------


        
    $variable_types = [
                                        
    'Boolean' => 0,
                                        
    'Integer' => 1,
                                        
    'Float' => 2,
                                        
    'String' => 3
                          
    ];


    //----------------------------------------------------------------------------------------------

        
    $config['profile_names']['Radio_Status'] = [
                                        
    $config['data_descriptions']['hub_status'][9],
                                        
    $config['data_descriptions']['radio_stats'][3],

                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Radio Status'
                                        
    'association' => $association_radio_stats
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 3
                                        
    'schrittweite' => 1
                                             
    ];

        
    $config['profile_names']['seconds'] = [
                                        
    $config['data_descriptions']['obs_st'][0],
                                        
    $config['data_descriptions']['obs_st'][5],
                                        
    $config['data_descriptions']['device_status'][3],
                                        
    $config['data_descriptions']['device_status'][4],
                                        
    $config['data_descriptions']['hub_status'][3],
                                        
    $config['data_descriptions']['hub_status'][5],

                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Seconds'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 999999999
                                        
    'schrittweite' => 1
                                             
    ];

        
    $config['profile_names']['meter_per_second'] = [
                                        
    $config['data_descriptions']['obs_st'][1],
                                        
    $config['data_descriptions']['obs_st'][2],
                                        
    $config['data_descriptions']['obs_st'][3],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' m/s'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 100
                                        
    'schrittweite' => 1
                            
    ];


        
    $config['profile_names']['degrees'] = [
                                        
    $config['data_descriptions']['obs_st'][4],
                                        
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Degree'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 360
                                        
    'schrittweite' => 1
                    
    ];

        
    $config['profile_names']['milli_bar'] = [
                                        
    $config['data_descriptions']['obs_st'][6],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' milli Bar'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 9999
                                        
    'schrittweite' => 1
                    
    ];


        
    $config['profile_names']['celcius'] = [
                                        
    $config['data_descriptions']['obs_st'][7],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' C°'
                                        
    'association' => NULL
                                        
    'minimalwert' => -40,
                                        
    'maximalwert' => 45
                                        
    'schrittweite' => '0,01'
                    
    ];


        
    $config['profile_names']['percent'] = [
                                        
    $config['data_descriptions']['obs_st'][8],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' %'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 100
                                        
    'schrittweite' => '0,01'
                  
    ];


        
    $config['profile_names']['lux'] = [
                                        
    $config['data_descriptions']['obs_st'][9],
                                        
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Lx'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 120000
                                        
    'schrittweite' => 1
                
    ];


        
    $config['profile_names']['index'] = [
                                        
    $config['data_descriptions']['obs_st'][10],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' UVI'
                                        
    'association' => $association_uv_index
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 15
                                        
    'schrittweite' => '0,01'
                
    ];


        
    $config['profile_names']['energy'] = [
                                        
    $config['data_descriptions']['obs_st'][11],
                                        
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' W/m^2'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 1000
                                        
    'schrittweite' => 1
                 
    ];


        
    $config['profile_names']['mm'] = [
                                        
    $config['data_descriptions']['obs_st'][12],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 6,
                                        
    'prefix' => '',
                                        
    'suffix' => ' mm'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 100
                                        
    'schrittweite' => '0,000001'
             
    ];


        
    $config['profile_names']['perception_type'] = [
                                        
    $config['data_descriptions']['obs_st'][13],
                                        
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ''
                                        
    'association' => $association_percerception
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 2
                                        
    'schrittweite' => 1
                          
    ];


        
    $config['profile_names']['km'] = [
                                        
    $config['data_descriptions']['obs_st'][14],
                                        
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 2,
                                        
    'prefix' => '',
                                        
    'suffix' => ' km'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 100
                                        
    'schrittweite' => '0,01'
              
    ];


     
    $config['profile_names']['count'] = [
                                          
    $config['data_descriptions']['obs_st'][15],
                                     
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Lightning Strikes'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 100
                                        
    'schrittweite' => 1
                
    ];

     
    $config['profile_names']['counter'] = [
                                          
    $config['data_descriptions']['radio_stats'][1],
                                          
    $config['data_descriptions']['radio_stats'][2],
                                    
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ''
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 1000
                                        
    'schrittweite' => 1
                
    ];




        
    $config['profile_names']['volt'] = [   
                                        
    $config['data_descriptions']['obs_st'][16],
                                        
    $config['data_descriptions']['device_status'][5],

                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 3,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Volt'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 4
                                        
    'schrittweite' => '0,001'
                
    ];

        
    $config['profile_names']['charge'] = [   
     
                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 3,
                                        
    'prefix' => ' Charging ',
                                        
    'suffix' => ''
                                        
    'association' => $association_battery_charge
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 4
                                        
    'schrittweite' => '0,001'
                
    ];

        
    $config['profile_names']['discharge'] = [    
                                        
    $config['data_descriptions']['obs_st'][16],
                                        
    $config['data_descriptions']['device_status'][5],

                                        
    'type' => $variable_types['Float'],
                                        
    'nachkommastellen' => 3,
                                        
    'prefix' => 'Discharging ',
                                        
    'suffix' => ''
                                        
    'association' => $association_battery_discharge
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 4
                                        
    'schrittweite' => '0,001'
                
    ];


        
    $config['profile_names']['minutes'] = [
                                        
    $config['data_descriptions']['obs_st'][17],
                                        
                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' Minutes'
                                        
    'association' => NULL
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 60
                                        
    'schrittweite' => 1
                  
    ];

        
    $config['profile_names']['rssi'] = [
                                        
    $config['data_descriptions']['device_status'][7],
                                        
    $config['data_descriptions']['device_status'][8],
                                        
    $config['data_descriptions']['hub_status'][4],

                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' db'
                                        
    'association' => NULL
                                        
    'minimalwert' => -100,
                                        
    'maximalwert' => 0
                                        
    'schrittweite' => 1
                  
    ];


        
    $config['profile_names']['status'] = [
                                        
    $config['data_descriptions']['device_status'][9],

                                        
    'type' => $variable_types['Integer'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ' (Status)'
                                        
    'association' => $association_error_codes
                                        
    'minimalwert' => 0,
                                        
    'maximalwert' => 256
                                        
    'schrittweite' => 1
                 
    ];

        
    $config['profile_names']['text'] = [
                                        
    $config['data_descriptions']['device_status'][0],
                                        
    $config['data_descriptions']['device_status'][1],
                                        
    $config['data_descriptions']['device_status'][2],
                                        
    $config['data_descriptions']['device_status'][6],
                                        
    $config['data_descriptions']['device_status'][10],
                                        
    $config['data_descriptions']['hub_status'][0],
                                        
    $config['data_descriptions']['hub_status'][1],
                                        
    $config['data_descriptions']['hub_status'][2],
                                        
    $config['data_descriptions']['hub_status'][6],
                                        
    $config['data_descriptions']['hub_status'][7],
                                        
    $config['data_descriptions']['radio_stats'][0],
                                        
    $config['data_descriptions']['radio_stats'][4],

                                        
    'type' => $variable_types['String'],
                                        
    'nachkommastellen' => 0,
                                        
    'prefix' => '',
                                        
    'suffix' => ''
                                        
    'association' => NULL
                                        
    'minimalwert' => NULL,
                                        
    'maximalwert' => NULL
                                        
    'schrittweite' => NULL
                 
    ];

    //----------------------------------------------------------------------------------------------
        
    $config['variable_types'] = $variable_types;
        return 
    $config
    }

    function 
    check_category($name,$parent)
    {
        
    $CatID = @IPS_GetCategoryIDByName($name,$parent  );
        if(
    $CatID === false)
        {
            
    $CatID IPS_CreateCategory();      
            
    IPS_SetName($CatID$name); 
            
    IPS_SetParent($CatID,$parent ); 
        }
        else
        {
        }
        return 
    $CatID;
    }

    function 
    check_variable($parent,$name,$type,$profil,$aggregation_type,$logging)
    {
        
    $var_id = @IPS_GetVariableIDByName ($name$parent);
        if(
    $var_id === false)
        {
             
    $archive_id IPS_GetInstanceListByModuleID ('{43192F0B-135B-4CE7-A0A7-1475603F3060}')[0];
             
    $var_id IPS_CreateVariable ($type);
             
    IPS_SetVariableCustomProfile ($var_id$profil );
             
    IPS_SetName($var_id$name);
             
    IPS_SetParent($var_id$parent);
             if(
    $logging or ($type != 3))
             { 
                
    AC_SetLoggingStatus ($archive_id$var_id$logging);
                
    AC_SetAggregationType ($archive_id$var_id$aggregation_type);
             }
             else
             {
                
    AC_SetLoggingStatus ($archive_id$var_id$logging);
             }
             
    IPS_ApplyChanges($archive_id);
        }
        else
        {
        }
        return 
    $var_id;
    }

    function 
    check_profile($update,$name,$type,$digits,$prefix,$suffix,$associations,$Minimalwert,$Maximalwert,$Schrittweite)
    {
     

        
    $profiles =  IPS_GetVariableProfileListByType ($type);
        if (
    IPS_VariableProfileExists ($name))
        {
            if(
    $update)
            {
                
    IPS_DeleteVariableProfile($name);
                
    check_profile($update,$name,$type,$digits,$prefix,$suffix,$associations,$Minimalwert,$Maximalwert,$Schrittweite);            
            }

        }
        else
        {
            
            
    IPS_CreateVariableProfile ($name,$type);
            
    IPS_SetVariableProfileText ($name,$prefix,$suffix);
            if(
    $type != 3)
            {
                
    IPS_SetVariableProfileDigits ($name,$digits);
                
    IPS_SetVariableProfileValues ($name$Minimalwert$Maximalwert$Schrittweite);
                if(
    is_array($associations))
                { 
                    foreach(
    $associations['Text'] as $key => $var)
                    {
                        if(
    array_key_exists('values',$associations))
                        { 
                            
    $value $associations['values'][$key];
                        }
                        else
                        {
                            
    $value $key;
                        }
                        
    IPS_SetVariableProfileAssociation ($name$value$var,'',intval($associations['Color'][$key] ));
                    }
                }
            }

        }

    }
    Geändert von BestEx (Heute um 14:06 Uhr)
    Symcon 5.5 Windows + RASPI / KNX + Homematic + RAZBERRY / IPSVIEW

  6. #116
    Registriert seit
    Jul 2010
    Ort
    Südwestpfalz
    Beiträge
    7,152

    Die Daten sprudeln. Vielen Dank für das Script.
    Nun konzentriere ich mich mal auf den geeigneten Befestigungsort.


    Gesendet von iPhone XS mit Tapatalk
    Gruß Boui . . . IPS-unlim. auf Tinker Board S und aktuell auf einem Pi3 läuft pivccu3

    Die gefährlichste Form der Zensur ist die Schere im eigenen Kopf.(Curzio Malaparte)

  7. #117
    Registriert seit
    Feb 2005
    Ort
    Lübeck
    Beiträge
    24,120

    Anbei mein erster Wurf für ein Tempest Modul: GitHub - paresy/Tempest: IP-Symcon integration for Tempest Smart Weather Station

    Es fehlen noch Profile, Übersetzungen... und ich bin mir nicht sicher, ob ich immer alle Variable aktualisieren will, da z.B. der rapid_wind Report alle 3 Sekunden kommt. Außerdem finde ich den hub_status und device_status nur mittelmäßig sinnvoll. Wie seht ihr dies?

    Hier die Doku: https://weatherflow.github.io/Tempest/api/udp/v143/

    Aber ich habe coole Tests gebaut und das Modul komplett mit den Stubs entwickelt und dann lief es auf Anhieb

    Viel Spaß und Gute Nacht!

    paresy

  8. #118
    Registriert seit
    Jul 2010
    Ort
    Südwestpfalz
    Beiträge
    7,152

    Guten Morgen,

    ich habe das Modul mal getestet und finde es genau richtig. Die Installation ist simpel und die Auswahl der Daten finde ich ausreichend.

    Vielen Dank.

    Ich muss mich mal mit den angezeigten Daten beschäftigen, denn der Aussagewert bei einigen Angaben erschließt sich mir noch nicht wirklich.


    Gesendet von iPhone XS mit Tapatalk
    Gruß Boui . . . IPS-unlim. auf Tinker Board S und aktuell auf einem Pi3 läuft pivccu3

    Die gefährlichste Form der Zensur ist die Schere im eigenen Kopf.(Curzio Malaparte)

  9. #119
    Registriert seit
    Sep 2009
    Beiträge
    1,261

    Ich würde die folgenden Daten speichern :

    type = obs_st
    Alles ausser Report Interval

    type = device_status "rssi": -17,
    "hub_rssi": -87
    "sensor_status": 0,


    Den Rest braucht man eigentlich nicht denke ich.

    @Paresy wenn du Dir Tipparbeit sparen willst ich habe im obigen script die Profile und associationen definiert


    Vielen Dank für das Modul
    Symcon 5.5 Windows + RASPI / KNX + Homematic + RAZBERRY / IPSVIEW

  10. #120
    Registriert seit
    Dec 2006
    Ort
    Oberkrämer bei Berlin
    Beiträge
    1,615

    Zitat Zitat von paresy Beitrag anzeigen
    ich bin mir nicht sicher, ob ich immer alle Variable aktualisieren will, da z.B. der rapid_wind Report alle 3 Sekunden kommt. Außerdem finde ich den hub_status und device_status nur mittelmäßig sinnvoll. Wie seht ihr dies?
    Eine Meldung alle 3 Sekunden braucht man nicht, aber wie sieht es mit einen Windböhenerkennung aus? Bekommt man die noch auf anderem Wege?

    Ich bekomme mein Gerät erst noch. Daher kann ich noch nicht selbst schauen.
    MfG: Heiner_________________IPS5.5, NUC-i5 Lüfterlos, SSD, Win10Home, 24/7; IPS-Mobile Android V5.5.1; FHZ1300PC: FS20, HMS100, KS300, PS50, FHT; WDE1; Harmony1100 + Wandlung einzelner FHT80TF in FS20 Adressen mit FS20Manager; 3x ChromoflexII + 14x IIIRC; DMX4ALL, ArtNet (Dimmer6); IPS-868: EKM, RGBW, WDT, JKM/Termojet; 1Wire über blauem DS9490R; HomeMatic: CCU3, LAN_Adapter, Hm + HmIP, Winmatic; XBee Pro: Roomba;