Gardena Smart System

Begonnen von emilio_35, 16 April 2017, 17:14:53

Vorheriges Thema - Nächstes Thema

mbrak

Hi. Kannst du mal posten was du genau in der fhem.cfg eingetragen hast? Hast du das mit einem Editor oder über das Web Interface gemacht? Letzteres sollte man immer verwenden!
Ist sicherlich ein typo :)


Gesendet von iPhone mit Tapatalk Pro

VolkerL

#76
Hallo mbrak,

in der fhem.cfg steht folgendes:

define Sileno dummy
attr Sileno room Außen,Garten
attr Sileno stateFormat status batt: battery_value
attr Sileno webCmd maehen_24Std:maehen_zeitplan:parken:parken_zeitplan

define DI_SilenoCmd DOIF ([Sileno:"maehen"]) ({sileno_cmd("maehen")}) DOELSEIF ([Sileno:"parken"]) ({sileno_cmd("parken")})
attr DI_SilenoCmd room Außen,Garten,Roboter

define SilenoStatusCall at +*00:01:00 {sileno_status}
attr SilenoStatusCall room Außen,Garten,Roboter


Die Sachen auf habe ich rein kopiert, da auch das attr "genericDeviceType" bei dem dummy nicht vorhanden ist.

Hier noch der Eintrag in die "99_myUtils.pm":

sub sileno_status {
my $device_id = "device-id";
my $location_id = "location-id";
my $gardena_email = "xxxx\@xxx.de";
my $gardena_password = "xxx";
my $sileno_status_D;
my $sileno_error_D;
my $sileno_source_next_start_D;

my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};

my $stats = `curl -s --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices?locationId=$location_id`;
my $decoded_stats = decode_json( $stats );

my $sileno_manufacturer = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[0]{'value'};
my $sileno_product = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[1]{'value'};
my $sileno_serial_number = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[2]{'value'};
my $sileno_version = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[3]{'value'};
my $sileno_category = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[4]{'value'};
my $sileno_last_time_online = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[5]{'value'};
my $sileno_sgtin = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[6]{'value'};
my $batterie_value = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[0]{'value'};
my $batterie_status = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[1]{'value'};
my $batterie_is_charging = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[2]{'value'};
my $sileno_quality = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[0]{'value'};
my $sileno_connection_status = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[1]{'value'};
my $sileno_state = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[2]{'value'};
my $sileno_temparture = $decoded_stats->{'devices'}[1]{'abilities'}[3]{'properties'}[0]{'value'};
my $sileno_manual_operation = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[0]{'value'};
my $sileno_status = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[1]{'value'};
my $sileno_error = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[2]{'value'};
my $sileno_source_next_start = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[3]{'value'};
my $sileno_timestamp_next_start = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[4]{'value'};
my $sileno_override_end_time = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[5]{'value'};
my $sileno_firmware_status = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[0]{'value'};
my $sileno_firmware_upload_progress = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[1]{'value'};
my $sileno_firmware_available_version = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[2]{'value'};
my $sileno_inclusion_status = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[3]{'value'};
my $sileno_firmware_update_start = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[4]{'value'};
my $sileno_firmware_command = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[5]{'value'};

if ( $sileno_status eq "parked_autotimer") {
      $sileno_status_D = "Geparkt durch SensorControl";
}
elsif ( $sileno_status eq "paused") {
      $sileno_status_D = "Pausiert";
}
elsif ( $sileno_status eq "ok_cutting") {
      $sileno_status_D = "Mähen";
}
elsif ( $sileno_status eq "ok_searching") {
     $sileno_status_D = "Suche Ladestation";
}
elsif ( $sileno_status eq "ok_charging") {
     $sileno_status_D = "Lädt";
}
elsif ( $sileno_status eq "ok_leaving") {
     $sileno_status_D = "Mähen";
}
elsif ( $sileno_status eq "parked_timer") {
     $sileno_status_D = "Geparkt nach Zeitplan";
}
elsif ( $sileno_status eq "off_disabled") {
     $sileno_status_D = "Der Mäher ist ausgeschaltet";
}
elsif ( $sileno_status eq "parked_park_selected") {
     $sileno_status_D = "Geparkt";
}
elsif ( $sileno_status eq "off_hatch_open") {
     $sileno_status_D = "Deaktiviert. Abdeckung ist offen oder PIN-Code erforderlich";
}
elsif ( $sileno_status eq "error") {
     $sileno_status_D = "Fehler";
}
elsif ( $sileno_status eq "error_at_power_up") {
     $sileno_status_D = "Neustart ...";
}
elsif ( $sileno_status eq "off_hatch_closed") {
     $sileno_status_D = "Deaktiviert. Manueller Start erforderlich";
}
elsif ( $sileno_status eq "ok_cutting_timer_overridden") {
     $sileno_status_D = "Manuelles Mähen";
}
elsif ( $sileno_status eq "parked_daily_limit_reached") {
     $sileno_status_D = "Abgeschlossen";
}

if ( $sileno_error eq "no_message") {
      $sileno_error_D = "Kein Fehler";
}
elsif ( $sileno_error eq "outside_working_area") {
      $sileno_error_D = "Außerhalb des Arbeitsbereichs";
}
elsif ( $sileno_error eq "no_loop_signal") {
      $sileno_error_D = "Kein Schleifensignal";
}
elsif ( $sileno_error eq "wrong_loop_signal") {
      $sileno_error_D = "Falsches Schleifensignal";
}
elsif ( $sileno_error eq "loop_sensor_problem_front") {
      $sileno_error_D = "Problem Schleifensensor, vorne";
}
elsif ( $sileno_error eq "loop_sensor_problem_rear") {
      $sileno_error_D = "Problem Schleifensensor, hinten";
}
elsif ( $sileno_error eq "trapped") {
      $sileno_error_D = "Eingeschlossen";
}
elsif ( $sileno_error eq "upside_down") {
      $sileno_error_D = "Steht auf dem Kopf";
}
elsif ( $sileno_error eq "low_battery") {
      $sileno_error_D = "Niedriger Batteriestand";
}
elsif ( $sileno_error eq "empty_battery") {
      $sileno_error_D = "Batterie ist leer";
}
elsif ( $sileno_error eq "no_drive") {
      $sileno_error_D = "Kein Antrieb";
}
elsif ( $sileno_error eq "lifted") {
      $sileno_error_D = "Angehoben";
}
elsif ( $sileno_error eq "stuck_in_charging_station") {
      $sileno_error_D = "Eingeklemmt in Ladestation";
}
elsif ( $sileno_error eq "charging_station_blocked") {
      $sileno_error_D = "Ladestation blockiert";
}
elsif ( $sileno_error eq "collision_sensor_problem_rear") {
      $sileno_error_D = "Problem Stoßsensor hinten";
}
elsif ( $sileno_error eq "collision_sensor_problem_front") {
      $sileno_error_D = "Problem Stoßsensor vorne";
}
elsif ( $sileno_error eq "wheel_motor_blocked_right") {
      $sileno_error_D = "Radmotor rechts blockiert";
}
elsif ( $sileno_error eq "wheel_motor_blocked_left") {
      $sileno_error_D = "Radmotor links blockiert";
}
elsif ( $sileno_error eq "wheel_drive_problem_right") {
      $sileno_error_D = "Problem Antrieb, rechts";
}
elsif ( $sileno_error eq "wheel_drive_problem_left") {
      $sileno_error_D = "Problem Antrieb, links";
}
elsif ( $sileno_error eq "cutting_system_blocked") {
      $sileno_error_D = "Schneidsystem blockiert";
}
elsif ( $sileno_error eq "invalid_sub_device_combination") {
      $sileno_error_D = "Fehlerhafte Verbindung";
}
elsif ( $sileno_error eq "settings_restored") {
      $sileno_error_D = "Standardeinstellungen";
}
elsif ( $sileno_error eq "electronic_problem") {
      $sileno_error_D = "Elektronisches Problem";
}
elsif ( $sileno_error eq "charging_system_problem") {
      $sileno_error_D = "Problem Ladesystem";
}
elsif ( $sileno_error eq "tilt_sensor_problem") {
      $sileno_error_D = "Kippsensorproblem";
}
elsif ( $sileno_error eq "wheel_motor_overloaded_right") {
      $sileno_error_D = "Rechter Radmotor überlastet";
}
elsif ( $sileno_error eq "wheel_motor_overloaded_left") {
      $sileno_error_D = "Linker Radmotor überlastet";
}
elsif ( $sileno_error eq "charging_current_too_high") {
      $sileno_error_D = "Ladestrom zu hoch";
}
elsif ( $sileno_error eq "temporary_problem") {
      $sileno_error_D = "Vorübergehendes Problem";
}
elsif ( $sileno_error eq "guide_1_not_found") {
      $sileno_error_D = "SK 1 nicht gefunden";
}
elsif ( $sileno_error eq "guide_2_not_found") {
      $sileno_error_D = "SK 2 nicht gefunden";
}
elsif ( $sileno_error eq "guide_3_not_found") {
      $sileno_error_D = "SK 3 nicht gefunden";
}
elsif ( $sileno_error eq "difficult_finding_home") {
      $sileno_error_D = "Problem die Ladestation zu finden";
}
elsif ( $sileno_error eq "guide_calibration_accomplished") {
      $sileno_error_D = "Kalibration des Suchkabels beendet";
}
elsif ( $sileno_error eq "guide_calibration_failed") {
      $sileno_error_D = "Kalibration des Suchkabels fehlgeschlagen";
}
elsif ( $sileno_error eq "temporary_battery_problem") {
      $sileno_error_D = "Kurzzeitiges Batterieproblem";
}
elsif ( $sileno_error eq "battery_problem") {
      $sileno_error_D = "Batterieproblem";
}
elsif ( $sileno_error eq "alarm_mower_switched_off") {
      $sileno_error_D = "Alarm! Mäher ausgeschalten";
}
elsif ( $sileno_error eq "alarm_mower_stopped") {
      $sileno_error_D = "Alarm! Mäher gestoppt";
}
elsif ( $sileno_error eq "alarm_mower_lifted") {
      $sileno_error_D = "Alarm! Mäher angehoben";
}
elsif ( $sileno_error eq "alarm_mower_tilted") {
      $sileno_error_D = "Alarm! Mäher gekippt";
}
elsif ( $sileno_error eq "connection_changed") {
      $sileno_error_D = "Verbindung geändert";
}
elsif ( $sileno_error eq "connection_not_changed") {
      $sileno_error_D = "Verbindung nicht geändert";
}
elsif ( $sileno_error eq "com_board_not_available") {
      $sileno_error_D = "COM board nicht verfügbar";
}
elsif ( $sileno_error eq "slipped") {
      $sileno_error_D = "Rutscht";
}

if ( $sileno_source_next_start eq "no_source") {
      $sileno_source_next_start_D = "OK";
}
elsif ( $sileno_source_next_start eq "mower_charging") {
      $sileno_source_next_start_D = "Mäher wurde geladen";
}
elsif ( $sileno_source_next_start eq "completed_cutting_autotimer") {
      $sileno_source_next_start_D = "SensorControl erreicht";
}
elsif ( $sileno_source_next_start eq "week_timer") {
      $sileno_source_next_start_D = "Wochentimer erreicht";
}
elsif ( $sileno_source_next_start eq "countdown_timer") {
      $sileno_source_next_start_D = "Stoppuhr Timer";
}
elsif ( $sileno_source_next_start eq "undefined") {
      $sileno_source_next_start_D = "Unklar";
}

fhem("setreading Sileno signal_quality $sileno_quality");
fhem("setreading Sileno connection_status $sileno_connection_status");
fhem("setreading Sileno signal_strength $sileno_state");
fhem("setreading Sileno Temperatur $sileno_temparture");
fhem("setreading Sileno batterie_value $batterie_value");
fhem("setreading Sileno batterie_status $batterie_status");
fhem("setreading Sileno batterie_is_charging $batterie_is_charging");
fhem("setreading Sileno status $sileno_status_D");
fhem("setreading Sileno error $sileno_error_D");
fhem("setreading Sileno source_next_start $sileno_source_next_start_D");
fhem("setreading Sileno next_start $sileno_timestamp_next_start");
fhem("setreading Sileno Hersteller $sileno_manufacturer");
fhem("setreading Sileno Produkt $sileno_product");
fhem("setreading Sileno Seriennummer $sileno_serial_number");
fhem("setreading Sileno Version $sileno_version");
fhem("setreading Sileno Modell $sileno_category");
fhem("setreading Sileno Letzte_Uebertragung $sileno_last_time_online");
fhem("setreading Sileno Sgtin $sileno_sgtin");
fhem("setreading Sileno firmware_status $sileno_firmware_status");
fhem("setreading Sileno firmware_upload_progress $sileno_firmware_upload_progress");
fhem("setreading Sileno inclusion_status $sileno_inclusion_status");
fhem("setreading Sileno firmware_update_start $sileno_firmware_update_start");
fhem("setreading Sileno firmware_command $sileno_firmware_command");

}


Und die Readings als Bild(da schein auch noch was nicht zu passen):

Danke

Volker

Raspberry PI mit fhem 5.8, COC & HM-CFG-LAN für Homematic & CUL für FS20

Kenneth

#77
Moin Volker,

das
attr Sileno webCmd maehen_24Std:maehen_zeitplan:parken:parken_zeitplan


passt nicht zu dem
define DI_SilenoCmd DOIF ([Sileno:"maehen"]) ({sileno_cmd("maehen")}) DOELSEIF ([Sileno:"parken"]) ({sileno_cmd("parken")})

du scheinst meine Sachen mit denen von Bigchees gemischt zu haben.

der DIOF müsste dann ehr so ausssehen:
([Sileno:"maehen 24STD"]) ({sileno_cmd("maehen_24Std")}) DOELSEIF ([Sileno:"maehen Zeitplan"]) ({sileno_cmd("maehen_zeitplan")}) DOELSEIF ([Sileno:"parken"]) ({sileno_cmd("parken")}) DOELSEIF ([Sileno:"parken Zeitplan"]) ({sileno_cmd("parken_zeitplan")})

natürlich muss deine sub "sileno_cmd" auch dazu passen

Achso.. deine persönlichen Daten (Passwort etc) solltest du evtl. das nächste mal vor dem Posten entfernen :o

sub sileno_cmd {
my $command = $_[0];
my $device_id = "78f69110-5c61-4196-a195-774455c91646";
my $location_id = "fd81c964-9d74-40ac-9d02-b4650395ff17";
my $gardena_email = "volker_lorenz\@t-online.de";
my $gardena_password = "Dein_hoffentlich_geändertes_Passwort";

my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen_24Std") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "maehen_zeitplan") {
  my $payload ='"name":"start_resume_schedule"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken_zeitplan") {
  my $payload ='"name":"park_until_next_timer"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}

Intel NUC @Ubuntu > FHEM 5.8
HM-LAN, NanoCul, Signalduino
EchoDot, Gardena Sileno, XT1, Somfy RTS
TabletUI

VolkerL

Hallo,

hab alles so eingetragen wie angegeben, der Status wird auch abgerufen und angezeigt. Was ich nicht hin bekomme ist, dass ich den Mäher über fhem starten oder parken kann. Da macht er keine Reaktion. Hier nochmals meine myUtil und Auszug aus der fhem.cfg

99_myUtils.pm:
######Gardena smart auslesen ###############

sub sileno_status {
my $device_id = "78f69110-5c61-4196-a195-774455c91646";
my $location_id = "fd81c964-9d74-40ac-9d02-b4650395ff17";
my $gardena_email = "volker_lorenz\@t-online.de";
my $gardena_password = "NeuesPasswort";
my $sileno_status_D;
my $sileno_error_D;
my $sileno_source_next_start_D;

my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};

my $stats = `curl -s --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices?locationId=$location_id`;
my $decoded_stats = decode_json( $stats );

my $sileno_manufacturer = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[0]{'value'};
my $sileno_product = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[1]{'value'};
my $sileno_serial_number = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[2]{'value'};
my $sileno_version = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[3]{'value'};
my $sileno_category = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[4]{'value'};
my $sileno_last_time_online = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[5]{'value'};
my $sileno_sgtin = $decoded_stats->{'devices'}[1]{'abilities'}[0]{'properties'}[6]{'value'};
my $batterie_value = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[0]{'value'};
my $batterie_status = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[1]{'value'};
my $batterie_is_charging = $decoded_stats->{'devices'}[1]{'abilities'}[1]{'properties'}[2]{'value'};
my $sileno_quality = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[0]{'value'};
my $sileno_connection_status = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[1]{'value'};
my $sileno_state = $decoded_stats->{'devices'}[1]{'abilities'}[2]{'properties'}[2]{'value'};
my $sileno_temparture = $decoded_stats->{'devices'}[1]{'abilities'}[3]{'properties'}[0]{'value'};
my $sileno_manual_operation = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[0]{'value'};
my $sileno_status = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[1]{'value'};
my $sileno_error = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[2]{'value'};
my $sileno_source_next_start = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[3]{'value'};
my $sileno_timestamp_next_start = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[4]{'value'};
my $sileno_override_end_time = $decoded_stats->{'devices'}[1]{'abilities'}[4]{'properties'}[5]{'value'};
my $sileno_firmware_status = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[0]{'value'};
my $sileno_firmware_upload_progress = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[1]{'value'};
my $sileno_firmware_available_version = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[2]{'value'};
my $sileno_inclusion_status = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[3]{'value'};
my $sileno_firmware_update_start = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[4]{'value'};
my $sileno_firmware_command = $decoded_stats->{'devices'}[1]{'abilities'}[5]{'properties'}[5]{'value'};

if ( $sileno_status eq "parked_autotimer") {
      $sileno_status_D = "Geparkt durch SensorControl";
}
elsif ( $sileno_status eq "paused") {
      $sileno_status_D = "Pausiert";
}
elsif ( $sileno_status eq "ok_cutting") {
      $sileno_status_D = "Mähen";
}
elsif ( $sileno_status eq "ok_searching") {
  $sileno_status_D = "Suche Ladestation";
}
elsif ( $sileno_status eq "ok_charging") {
  $sileno_status_D = "Lädt";
}
elsif ( $sileno_status eq "ok_leaving") {
  $sileno_status_D = "Mähen";
}
elsif ( $sileno_status eq "parked_timer") {
  $sileno_status_D = "Geparkt nach Zeitplan";
}
elsif ( $sileno_status eq "off_disabled") {
  $sileno_status_D = "Der Mäher ist ausgeschaltet";
}
elsif ( $sileno_status eq "parked_park_selected") {
  $sileno_status_D = "Geparkt";
}
elsif ( $sileno_status eq "off_hatch_open") {
  $sileno_status_D = "Deaktiviert. Abdeckung ist offen oder PIN-Code erforderlich";
}
elsif ( $sileno_status eq "error") {
  $sileno_status_D = "Fehler";
}
elsif ( $sileno_status eq "error_at_power_up") {
  $sileno_status_D = "Neustart ...";
}
elsif ( $sileno_status eq "off_hatch_closed") {
  $sileno_status_D = "Deaktiviert. Manueller Start erforderlich";
}
elsif ( $sileno_status eq "ok_cutting_timer_overridden") {
  $sileno_status_D = "Manuelles Mähen";
}
elsif ( $sileno_status eq "parked_daily_limit_reached") {
  $sileno_status_D = "Abgeschlossen";
}

if ( $sileno_error eq "no_message") {
      $sileno_error_D = "Kein Fehler";
}
elsif ( $sileno_error eq "outside_working_area") {
      $sileno_error_D = "Außerhalb des Arbeitsbereichs";
}
elsif ( $sileno_error eq "no_loop_signal") {
      $sileno_error_D = "Kein Schleifensignal";
}
elsif ( $sileno_error eq "wrong_loop_signal") {
      $sileno_error_D = "Falsches Schleifensignal";
}
elsif ( $sileno_error eq "loop_sensor_problem_front") {
      $sileno_error_D = "Problem Schleifensensor, vorne";
}
elsif ( $sileno_error eq "loop_sensor_problem_rear") {
      $sileno_error_D = "Problem Schleifensensor, hinten";
}
elsif ( $sileno_error eq "trapped") {
      $sileno_error_D = "Eingeschlossen";
}
elsif ( $sileno_error eq "upside_down") {
      $sileno_error_D = "Steht auf dem Kopf";
}
elsif ( $sileno_error eq "low_battery") {
      $sileno_error_D = "Niedriger Batteriestand";
}
elsif ( $sileno_error eq "empty_battery") {
      $sileno_error_D = "Batterie ist leer";
}
elsif ( $sileno_error eq "no_drive") {
      $sileno_error_D = "Kein Antrieb";
}
elsif ( $sileno_error eq "lifted") {
      $sileno_error_D = "Angehoben";
}
elsif ( $sileno_error eq "stuck_in_charging_station") {
      $sileno_error_D = "Eingeklemmt in Ladestation";
}
elsif ( $sileno_error eq "charging_station_blocked") {
      $sileno_error_D = "Ladestation blockiert";
}
elsif ( $sileno_error eq "collision_sensor_problem_rear") {
      $sileno_error_D = "Problem Stoßsensor hinten";
}
elsif ( $sileno_error eq "collision_sensor_problem_front") {
      $sileno_error_D = "Problem Stoßsensor vorne";
}
elsif ( $sileno_error eq "wheel_motor_blocked_right") {
      $sileno_error_D = "Radmotor rechts blockiert";
}
elsif ( $sileno_error eq "wheel_motor_blocked_left") {
      $sileno_error_D = "Radmotor links blockiert";
}
elsif ( $sileno_error eq "wheel_drive_problem_right") {
      $sileno_error_D = "Problem Antrieb, rechts";
}
elsif ( $sileno_error eq "wheel_drive_problem_left") {
      $sileno_error_D = "Problem Antrieb, links";
}
elsif ( $sileno_error eq "cutting_system_blocked") {
      $sileno_error_D = "Schneidsystem blockiert";
}
elsif ( $sileno_error eq "invalid_sub_device_combination") {
      $sileno_error_D = "Fehlerhafte Verbindung";
}
elsif ( $sileno_error eq "settings_restored") {
      $sileno_error_D = "Standardeinstellungen";
}
elsif ( $sileno_error eq "electronic_problem") {
      $sileno_error_D = "Elektronisches Problem";
}
elsif ( $sileno_error eq "charging_system_problem") {
      $sileno_error_D = "Problem Ladesystem";
}
elsif ( $sileno_error eq "tilt_sensor_problem") {
      $sileno_error_D = "Kippsensorproblem";
}
elsif ( $sileno_error eq "wheel_motor_overloaded_right") {
      $sileno_error_D = "Rechter Radmotor überlastet";
}
elsif ( $sileno_error eq "wheel_motor_overloaded_left") {
      $sileno_error_D = "Linker Radmotor überlastet";
}
elsif ( $sileno_error eq "charging_current_too_high") {
      $sileno_error_D = "Ladestrom zu hoch";
}
elsif ( $sileno_error eq "temporary_problem") {
      $sileno_error_D = "Vorübergehendes Problem";
}
elsif ( $sileno_error eq "guide_1_not_found") {
      $sileno_error_D = "SK 1 nicht gefunden";
}
elsif ( $sileno_error eq "guide_2_not_found") {
      $sileno_error_D = "SK 2 nicht gefunden";
}
elsif ( $sileno_error eq "guide_3_not_found") {
      $sileno_error_D = "SK 3 nicht gefunden";
}
elsif ( $sileno_error eq "difficult_finding_home") {
      $sileno_error_D = "Problem die Ladestation zu finden";
}
elsif ( $sileno_error eq "guide_calibration_accomplished") {
      $sileno_error_D = "Kalibration des Suchkabels beendet";
}
elsif ( $sileno_error eq "guide_calibration_failed") {
      $sileno_error_D = "Kalibration des Suchkabels fehlgeschlagen";
}
elsif ( $sileno_error eq "temporary_battery_problem") {
      $sileno_error_D = "Kurzzeitiges Batterieproblem";
}
elsif ( $sileno_error eq "battery_problem") {
      $sileno_error_D = "Batterieproblem";
}
elsif ( $sileno_error eq "alarm_mower_switched_off") {
      $sileno_error_D = "Alarm! Mäher ausgeschalten";
}
elsif ( $sileno_error eq "alarm_mower_stopped") {
      $sileno_error_D = "Alarm! Mäher gestoppt";
}
elsif ( $sileno_error eq "alarm_mower_lifted") {
      $sileno_error_D = "Alarm! Mäher angehoben";
}
elsif ( $sileno_error eq "alarm_mower_tilted") {
      $sileno_error_D = "Alarm! Mäher gekippt";
}
elsif ( $sileno_error eq "connection_changed") {
      $sileno_error_D = "Verbindung geändert";
}
elsif ( $sileno_error eq "connection_not_changed") {
      $sileno_error_D = "Verbindung nicht geändert";
}
elsif ( $sileno_error eq "com_board_not_available") {
      $sileno_error_D = "COM board nicht verfügbar";
}
elsif ( $sileno_error eq "slipped") {
      $sileno_error_D = "Rutscht";
}

if ( $sileno_source_next_start eq "no_source") {
      $sileno_source_next_start_D = "OK";
}
elsif ( $sileno_source_next_start eq "mower_charging") {
      $sileno_source_next_start_D = "Mäher wurde geladen";
}
elsif ( $sileno_source_next_start eq "completed_cutting_autotimer") {
      $sileno_source_next_start_D = "SensorControl erreicht";
}
elsif ( $sileno_source_next_start eq "week_timer") {
      $sileno_source_next_start_D = "Wochentimer erreicht";
}
elsif ( $sileno_source_next_start eq "countdown_timer") {
      $sileno_source_next_start_D = "Stoppuhr Timer";
}
elsif ( $sileno_source_next_start eq "undefined") {
      $sileno_source_next_start_D = "Unklar";
}

fhem("setreading Sileno signal_quality $sileno_quality");
fhem("setreading Sileno connection_status $sileno_connection_status");
fhem("setreading Sileno signal_strength $sileno_state");
fhem("setreading Sileno Temperatur $sileno_temparture");
fhem("setreading Sileno batterie_value $batterie_value");
fhem("setreading Sileno batterie_status $batterie_status");
fhem("setreading Sileno batterie_is_charging $batterie_is_charging");
fhem("setreading Sileno status $sileno_status_D");
fhem("setreading Sileno error $sileno_error_D");
fhem("setreading Sileno source_next_start $sileno_source_next_start_D");
fhem("setreading Sileno next_start $sileno_timestamp_next_start");
fhem("setreading Sileno Hersteller $sileno_manufacturer");
fhem("setreading Sileno Produkt $sileno_product");
fhem("setreading Sileno Seriennummer $sileno_serial_number");
fhem("setreading Sileno Version $sileno_version");
fhem("setreading Sileno Modell $sileno_category");
fhem("setreading Sileno Letzte_Uebertragung $sileno_last_time_online");
fhem("setreading Sileno Sgtin $sileno_sgtin");
fhem("setreading Sileno firmware_status $sileno_firmware_status");
fhem("setreading Sileno firmware_upload_progress $sileno_firmware_upload_progress");
fhem("setreading Sileno inclusion_status $sileno_inclusion_status");
fhem("setreading Sileno firmware_update_start $sileno_firmware_update_start");
fhem("setreading Sileno firmware_command $sileno_firmware_command");

}

####Sileno_CMD
sub sileno_cmd {
my $command = $_[0];
my $device_id = "78f69110-5c61-4196-a195-774455c91646";
my $location_id = "fd81c964-9d74-40ac-9d02-b4650395ff17";
my $gardena_email = "volker_lorenz\@t-online.de";
my $gardena_password = "NeuesPasswort";

my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen_24Std") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "maehen_zeitplan") {
  my $payload ='"name":"start_resume_schedule"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken_zeitplan") {
  my $payload ='"name":"park_until_next_timer"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}

my $curl = `curl --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}}


fhem.cfg:
define Sileno dummy
attr Sileno room Außen,Garten
attr Sileno webCmd maehen_24Std:maehen_zeitplan:parken:parken_zeitplan

define DI_SilenoCmd DOIF ([Sileno:"maehen 24STD"]) ({sileno_cmd("maehen_24Std")}) DOELSEIF ([Sileno:"maehen Zeitplan"]) ({sileno_cmd("maehen_zeitplan")}) DOELSEIF ([Sileno:"parken"]) ({sileno_cmd("parken")}) DOELSEIF ([Sileno:"parken Zeitplan"]) ({sileno_cmd("parken_zeitplan")})
attr DI_SilenoCmd room Außen,Garten

define SilenoStatusCall at +*00:01:00 {sileno_status}
attr SilenoStatusCall room Außen,Garten

define FL_Sileno FileLog /opt/fhem/Sileno_%Y_%m.log Sileno:Temperatur|Sileno:batterie_is_charging|Sileno:batterie_value|Sileno:error:.*|Sileno:signal_quality|Sileno:status:.*
define SVG_FL_Sileno_2 SVG FL_Sileno:SVG_FL_Sileno_2:CURRENT
attr SVG_FL_Sileno_2 room Garten


In dem Plot wird auch der Ladevorgang nicht angezeigt, da der Status nur false oder true und nicht 0 oder 1 ist. Mit eventMap hatte ich kein Erfolg.

Danke

Volker


Raspberry PI mit fhem 5.8, COC & HM-CFG-LAN für Homematic & CUL für FS20

mbrak

Hi

Hast du nur die eine sub (sileno status) in deine 98_myUtils.pm geschrieben ?

das mit dem Status ist wohl einer neueren Firmware des Mähers zu schulden. meiner sagt 0 oder 1. die neueren Mäher false und true.
Matthias hat das bei sich schon geändert. kannst du auch in dem Mapping in der sub eintragen und der Status wird angepasst. vielleicht meldet sich matthias noch dazu.
ich werde jetzt erstmal nicht weiter basteln, da ich auf das modul von cooltux warte. für die zeit bis dahin habe ich genug infos :)

Kenneth

#80
Zitat von: VolkerL am 01 August 2017, 00:20:20

In dem Plot wird auch der Ladevorgang nicht angezeigt, da der Status nur false oder true und nicht 0 oder 1 ist. Mit eventMap hatte ich kein Erfolg.

Danke

Volker


Hi,

so wie Michael schon geschrieben liegt es an der FW.
Folgende Änderungen in der sub "sileno_status" sind nötig:

- neu Variabel definieren
- mappen von true auf "1" und false auf "0"
- Nachricht an den Dummy mit der neuen gemappten Variable versehen

und im SVG den  RegEx ändern auf $fld[3]*20

Variable:
my $batterie_is_charging_SVG; 

Mappen:
  if ( $batterie_is_charging eq "true") {
    $batterie_is_charging_SVG = "1";
}
elsif ( $batterie_is_charging eq "false") {
    $batterie_is_charging_SVG = "0";
}



     fhem("setreading Sileno batterie_is_charging $batterie_is_charging_SVG");
   [/CODE]

Falls du die komplette Sub sehen möchtest sag bescheid.

An der Sileno_CMD seh ich erst mal keinen Fehler.
Ich hab der Übersichtshalber einen Dummy für den Status und einen für die CMDs. Aber daran sollte die Funktion dahinter nicht scheitern.



Gesendet von iPhone mit Tapatalk
Intel NUC @Ubuntu > FHEM 5.8
HM-LAN, NanoCul, Signalduino
EchoDot, Gardena Sileno, XT1, Somfy RTS
TabletUI

Kenneth

Zitat von: VolkerL am 01 August 2017, 00:20:20
Hallo,

hab alles so eingetragen wie angegeben, der Status wird auch abgerufen und angezeigt. Was ich nicht hin bekomme ist, dass ich den Mäher über fhem starten oder parken kann. Da macht er keine Reaktion. Hier nochmals meine myUtil und Auszug aus der fhem.cfg

99_myUtils.pm:

####Sileno_CMD
sub sileno_cmd {
my $command = $_[0];
my $device_id = "78f69110-5c61-4196-a195-774455c91646";
my $location_id = "fd81c964-9d74-40ac-9d02-b4650395ff17";
my $gardena_email = "volker_lorenz\@t-online.de";
my $gardena_password = "NeuesPasswort";

my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen_24Std") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "maehen_zeitplan") {
  my $payload ='"name":"start_resume_schedule"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken_zeitplan") {
  my $payload ='"name":"park_until_next_timer"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}

my $curl = `curl --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}}




Danke

Volker

Hi,

deine Sub "sileno_cmd" ist doch falsch (hab ich vorhin auf dem Handy nicht gesehen)


du hast da ein bissel zu viel drin:



my $curl = `curl --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}}



es sollte wie folgt aussehen:

####Sileno_CMD
sub sileno_cmd {
my $command = $_[0];
my $device_id = "78f69110-5c61-4196-a195-774455c91646";
my $location_id = "fd81c964-9d74-40ac-9d02-b4650395ff17";
my $gardena_email = "volker_lorenz\@t-online.de";
my $gardena_password = "NeuesPasswort";


my $curl = `curl -s --data '{"sessions":{"email":"$gardena_email","password":"$gardena_password"}}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;
my $decoded_json = decode_json( $curl );
my $session_id = $decoded_json->{'sessions'}{'token'};
print $session_id;

if ($command eq "maehen_24Std") {
  my $payload ='"name":"start_override_timer","parameters":{"duration":1440}';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "maehen_zeitplan") {
  my $payload ='"name":"start_resume_schedule"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken") {
  my $payload ='"name":"park_until_further_notice"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}
elsif ($command eq "parken_zeitplan") {
  my $payload ='"name":"park_until_next_timer"';
  my $exec = `curl --data '{$payload}' --header "Content-Type:application/json" --header "X-Session:$session_id" https://sg-api.dss.husqvarnagroup.net/sg-1/devices/$device_id/abilities/mower/command?locationId=$location_id`;
}


Grüße
  Matthias
Intel NUC @Ubuntu > FHEM 5.8
HM-LAN, NanoCul, Signalduino
EchoDot, Gardena Sileno, XT1, Somfy RTS
TabletUI

VolkerL

Danke,

ich werde das alles später mal ausprobieren.

Danke und viele Grüße

Volker
Raspberry PI mit fhem 5.8, COC & HM-CFG-LAN für Homematic & CUL für FS20

CoolTux

#83
Abend schön

Ich wollte einen kurzen Statusreport abgeben. Dank Kenneth's Zugangsdaten bekommt das Bridge Modul nach einem define nun session_id (Token), user_id und locations_id. Ausserdem bekomme ich eine Liste der Devices.
Die nächsten Schritte sind nun die Liste der Devices aus zu werten und die Devices entsprechend von autocreate anlegen zu lassen.
Es gibt also noch viel zu tun. Aber die Sache mit den tokens hatte mich leider länger aufgehalten.



Grüße
Leon
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Kenneth

Zitat von: VolkerL am 01 August 2017, 12:35:58
Danke,

ich werde das alles später mal ausprobieren.

Danke und viele Grüße

Volker

Hi Volker,

wie schauts aus, passt alles?




Zitat von: CoolTux am 02 August 2017, 21:30:17
Abend schön

Ich wollte einen kurzen Statusreport abgeben. Dank Kenneth's Zugangsdaten bekommt das Bridge Modul nach einem define nun session_id (Token), user_id und locations_id. Ausserdem bekomme ich eine Liste der Devices.
Die nächsten Schritte sind nun die Liste der Devices aus zu werten und die Devices entsprechend von autocreate anlegen zu lassen.
Es gibt also noch viel zu tun. Aber die Sache mit den tokens hatte mich leider länger aufgehalten.



Grüße
Leon

klingt ja schon mal super :)

Grüße
Matthias
Intel NUC @Ubuntu > FHEM 5.8
HM-LAN, NanoCul, Signalduino
EchoDot, Gardena Sileno, XT1, Somfy RTS
TabletUI

CoolTux

#85
Hier mal ein Screen von einer Bridge. Später wird man auch mehrere Bridges automatisch anlegen können.
Aber im Moment denke ich das eine reicht.

Aktueller Stand. Definition der Bridge mit

define <name> GardenaSmartBridge <email> <password>


Danach werden automatisch alle nötigen id's und der token geholt und ein DeviceList gemacht.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Und wieder einen Schritt weiter.

Aktuell wird die Bridge angelegt und mit Readings gefüllt. Ausserdem werden gefundene Devices angelegt.

Jetzt brauche ichmal bitte Eure Mithilfe,

Ich möchte sofern möglich den aktuellen Status einen jeden Gerätes einzeln abrufen. Dazu muß es einen Statusaufruf geben wo die Device_ID mitgegeben wird. Wenn jemand Zeit hat zum Schauen wäre das wirklich toll.



Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Kenneth

Hey Leon,
Was soll ich machen?

Grüße
Matthias


Gesendet von iPhone mit Tapatalk
Intel NUC @Ubuntu > FHEM 5.8
HM-LAN, NanoCul, Signalduino
EchoDot, Gardena Sileno, XT1, Somfy RTS
TabletUI

CoolTux

Zitat von: Kenneth am 04 August 2017, 11:19:41
Hey Leon,
Was soll ich machen?

Grüße
Matthias


Gesendet von iPhone mit Tapatalk

Im Netz nach Informationen suchen ob man auch einzelne Geräte abfragen kann nach dem Status.
Ich denke ich habe einen Ansatz gefunden. Wenn Du magst stelle ich Dir mal einen payload String zusammen den Du mal bitte testen kannst.


`curl -s --data '{"name":"device_info"}' --header "Content-Type:application/json" https://sg-api.dss.husqvarnagroup.net/sg-1/sessions`;


Müsstest auf die schnelle ein kleines perl oder bash script schreiben

Schau mal bitte ob Du hierüber etwas zurück bekommst
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

mbrak

hi

ich kenn dazu nur den curl aufruf, welcher alle geräte abfragt. kommt ein mächtige json string zurück als antwort.

kann dir meinen nachher schicken wenn ich zuhause bin. habe aber nur einen mäher.