FHEM+Arduino Firmata via Ethernet+RF 433 Mhz Sender+Baumarkt-Funksteckdosen

Begonnen von blueberry63, 08 April 2014, 16:16:31

Vorheriges Thema - Nächstes Thema

blueberry63

Bei mir sieht das z.Bsp. so aus:

define ARDnano FRM 3035 global
attr ARDnano model nano

define SENDER433n FRM_RCOUT 7
attr SENDER433n IODev ARDnano
attr SENDER433n defaultBitCount 24

define EMPF433n FRM_RCIN 2
attr EMPF433n IODev ARDnano


Gruß
Blueberry63
FHEM auf BBB mit Wheezy: 1x CUL_HM_HM_SCI_3_FM, 1x INSTAR CAM3010, 1x HM-LC-SW1-PL2, 1x HM-LC-Bl1PBU-FM, 1x HM-Sen-MDIR-O, Viessmann Heizung, Gaszähler via GPIO, Klingel via HM-LC-Bl1PBU-FM an FBox, Mailcheck, AVR, XBMC, NanoCUL 433+668 an Raspi per Ethernet, Funksteckdosen (Pollin, IT), Automower

zentis666

Das wollte ich ja auch so machen, lief auch schon mal mit nem Uno. Ich bekomme halt immer diese Fehlermeldung wenn ich Sender/Empfänger definieren will. Das IODev sollte wenn ich das richtig verstanden habe automatisch gesetzt werden. Die attr Befehle kann ich gar nicht absetzen da das define nicht funktioniert hat. Sollte ich die Zeilen einfach mal in die fhem.config reinkopieren und neu starten? Wollte eigentlich nicht direkt an der config basteln...


Gesendet von iPhone mit Tapatalk
--
FHEM auf Debian VM - ESXi 6.0 Intel Nuc i5 4th Gen, Homematic auf HMCCU - RaspberryMatic auf Raspberry PI 3,
EM1000 & FS20 über CUNO,  IT über Arduino Firmata, MiLight über WLAN-nRF Gateway, Ebus, 1Wire, diverse Squeezeboxen, Dreambox 920UHD, Homebridge

blueberry63

ZitatSollte ich die Zeilen einfach mal in die fhem.config reinkopieren und neu starten? Wollte eigentlich nicht direkt an der config basteln...

Ich glaube, ich hatte das damals direkt über fhem.cfg gemacht (Neustart).

Gruß
Blueberry63
FHEM auf BBB mit Wheezy: 1x CUL_HM_HM_SCI_3_FM, 1x INSTAR CAM3010, 1x HM-LC-SW1-PL2, 1x HM-LC-Bl1PBU-FM, 1x HM-Sen-MDIR-O, Viessmann Heizung, Gaszähler via GPIO, Klingel via HM-LC-Bl1PBU-FM an FBox, Mailcheck, AVR, XBMC, NanoCUL 433+668 an Raspi per Ethernet, Funksteckdosen (Pollin, IT), Automower

zentis666

Hi blueberry63,
reinkopieren und fhem neu starten hat funktioniert,
danke!
Gruß
Sven
--
FHEM auf Debian VM - ESXi 6.0 Intel Nuc i5 4th Gen, Homematic auf HMCCU - RaspberryMatic auf Raspberry PI 3,
EM1000 & FS20 über CUNO,  IT über Arduino Firmata, MiLight über WLAN-nRF Gateway, Ebus, 1Wire, diverse Squeezeboxen, Dreambox 920UHD, Homebridge

Pythonf

Ich grab diesen Thread mal wieder aus, da Ich einige Fragen dazu hab.

Die erste wäre: Wenn das Modul funktioniert, könnte man hierzu doch einen Eintrag im Wiki erstellen. Unter anderem auch zu den Teilen die man an der ConfigurableFirmata abändern um die Bauteile zu implementieren. Generell finde ich sind leider nicht alle funktionierenden Module irgendwo vermerkt was die Recherche aber auch die Kreativität durch Unwissenheit was alles geht ein wenig eingeschränkt - außerdem spart man so Geld ein paar wenige Euro für Arduino und I/O paar oder ein 433mHz CUL machen doch einen Unterschied.

Eine zweite Frage wäre ob z.B. der PIR-1000 Bewegungsmelder mit der Firmata funktioniert, sprich kann man Nachrichten nicht nur senden sondern auch empfangen? Auch bezüglich IT Fernbedienungen?

Und meine dritte Frage wäre, ob man hier eine Erweiterung einführen kann um Rohdaten zu senden und zu empfangen. Was ich damit meine ist, ob man die hier vorgestellten Sende und Empfangsoptionen auf simple Weise hinzufügen kann http://forum.fhem.de/index.php/topic,12599.45.html Wenn ich mich mit der Programmierung von Arduinos und FHEM Modulen besser auskennen würde, würde ich das auch selbst versuchen, aber dazu fehlt mir die Erfahrung. Wenn meine Empfänger/Sender angekommen sind müsste ich bisher nämlich leider 2 Arduinos programmieren um zum einen meine IT Steckdosen und dann eventl. den Beweungsmelder zu empfangen und zu steuern und mit dem anderen die Rolläden.

Beste Grüße
Fabian

Christian.

Zitat von: Pythonf am 26 September 2015, 01:33:44
Wenn das Modul funktioniert, könnte man hierzu doch einen Eintrag im Wiki erstellen.
Das ist eine gute Idee, auch wenn ich dazu aus Zeitgründen momentan nichts beisteuern kann. Jedes Modul ist aber gemäß FHEM-Konvention am Dateiende dokumentiert, dort solltest Du alles Notwendige finden. Das Archiv aus Antwort #197 ist nach wie vor aktuell. Der Arduino-Sketch RCSwitchFirmata ist ohne Änderungen lauffähig; Du kannst bei Bedarf einzelne Firmata-Features auskommentieren, um Speicher zu sparen.

Zitat
Eine zweite Frage wäre ob z.B. der PIR-1000 Bewegungsmelder mit der Firmata funktioniert, sprich kann man Nachrichten nicht nur senden sondern auch empfangen? Auch bezüglich IT Fernbedienungen?
Grundsätzlich funktioniert der Empfang von Intertechno-Fernbedienungen, dafür ist das Modul FRM_RCIN zuständig. Ich habe es mit meinen Funksteckdosen erfolgreich ausprobiert. Unterstützt werden alle Protokolle der RCSwitch-Bibliothek. Ob das auch für Deine Bewegungsmelder gilt, weiß ich nicht.

Zitat
Und meine dritte Frage wäre, ob man hier eine Erweiterung einführen kann um Rohdaten zu senden und zu empfangen.
Für das Senden ist FRM_RCOUT zuständig, damit können auch Rohdaten gesendet werden. Hier gilt ebenfalls, das alle Protokolle der RCSwitch-Bibliothek unterstützt werden.

Zitat
Was ich damit meine ist, ob man die hier vorgestellten Sende und Empfangsoptionen auf simple Weise hinzufügen kann
Möglich ist das sicher. Falls das Protokoll nicht von RCSwitch unterstützt wird, müsste neben den FHEM-Modulen zusätzlich entweder RCSwitchFirmata oder besser direkt RCSwitch erweitert werden. Ob das auf simple Weise möglich ist, hängt von Deinen Vorkenntnissen ab.
Raspberry Pi 3 mit FHEM; Arduino Nano mit ConfigurableFirmata (S0-Stromzähler); nanoCUL (MAX!); SIGNALduino (RXB6, 433 MHz); eBus; RS485 & D0 (SolarView); DVB-T (Thermo-/Hygrometer); Z-Wave; ZigBee

jdelphi

Hallo Leute,

ich kam dieses WE mal dazu, mich mit dem Funk auseinander zu setzen.
Der Aufbau und die Inbetriebnahme ging für die Komplexität recht gut.

Einzig bei dem Definieren vom Sender und Empfänger mittels ,,define EMPF433 FRM_RCIN 2" gab es das bekannte Hänger, dass er gerne als erstes dass IODev hätte. Die Zeile hatte ich dann von Hand in die Config eingetragen.

Nun zu meinen Problemchen:

Wenn ich den Empfänger angeschlossen habe, geht bei mir das Senden nicht mehr.
Empfangen geht jedoch wunderbar, hatte plötzlich dank autocreate neue Devices :-)

Meine Steckdosen reagieren nicht auf den Code, den ich empfangen habe, ich muss sie nochmal erneut mit anlernen. (Es ist das Home easy System von ELRO / ELV / sonstiges) Diese haben am Empfänger keinen einstellbaren code, sondern sind Lernfähig. Den Sender kann man nicht umstellen.  So beim schreiben kommt mir die Vermutung, das diese noch mehr als nur das reine 1,0,T Signal auswerten. (Bspw. Pulspausenverhältniss, was ach das obere Problem erklären könnte, (Int Auslösung vom Empfänger → langsammeres Pulspausenverhältniss beim Senden → Empfänger erkennt das signal als eines von einem anderen Sender).

Eine meiner Steckdosen lassen sich leider nicht anlernen :-( warum auch immer, mit der Original Fernbedienung geht sie.

Momentan kämpfe ich noch ein wenig mit der Reichweite rum, hier bin ich offen für Empfehlungen, was ihr so an Antennen Verwendet, sowie die Ausrichtung und deren Länge.
Sowie Versorgungsspannung des Senders.

Nun zu meinen Fragen, kann man mehr als einen Arduino mit Firmata anschließen ?

Ich denke da an sowas wie:
Sender 1
define FIRMATA1 FRM 3030 [global]

define EMPF433_1 FRM_RCIN 2
attr EMPF433_1 IODev FIRMATA1

define ELRO1 IT 011F00000F FF F0
attr ELRO1 IODev SENDER433_1

Sender 2
define FIRMATA2 FRM 3031 [global]

define EMPF433_2 FRM_RCIN 2
attr EMPF433_2 IODev FIRMATA2

define ELRO2 IT 011000000F FF F0
attr ELRO2 IODev SENDER433_2

Wzut

Zitat von: jdelphi am 14 Dezember 2015, 11:09:13
Nun zu meinen Fragen, kann man mehr als einen Arduino mit Firmata anschließen ?
define FIRMATA1 FRM 3030
define FIRMATA2 FRM 3031
Sicher geht das , hast schon richtig zwei verschiedene Ports vorgesehen.
Denk aber bitte auch daran die andere Portnummer (3031) auch im Arduino Sketch zu verwenden und neben einer anderen Source IP auch die gerne vergessene MAC Adresse zu  ändern :)
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

jdelphi

Okay das mit den 2 Firmata scheint schon einmal zu klappen.

Aber nun ein neues kleines Problem, das Autocreate legt ja schön fein neue Devices an, wenn ich mit der Original Fernbedienung was sende.
Ich hatte nun mal alle Devices gelöscht,und wollte alles neu anlernen.
Leider legt Autocreate keine neuen Devices mehr an, die es schon einmal angelegt hatte.
Wie kann ich Autocreate nun dazu überreden, das es doch so lieb ist, und mir die Devices nochmal erneut anlegt?

pinguin

Hallo,

ich habe eine Frage zu diesem Thema in den Anfängerbereich gestellt:

https://forum.fhem.de/index.php/topic,60144.0.html

Ich denke aber, dass das u.U. hier besser aufgehoben ist. Vielleicht wäre es möglich, dass sich mal jemand ansieht.

Danke und viele Grüße

Torsten

Meck

Hallo,

gefällt mir was ihr hier gemacht habt. Jetzt bin ich gerade dabei das ganze auch aus zu probieren.

Folgende Randbedienungen habe ich.

1. Meine IDE ist aktuell 1.8.5
2. ConfigurableFirmata ist aktuell 2.10.0
   https://github.com/firmata/ConfigurableFirmata
3. RCSwitch ist aktuell 2.6.2
   https://github.com/sui77/rc-switch
4. Verwende aktuel einen Arduino Uno R3

Wenn ich jetzt dieses Setup verwende

Mir die vorherigen Beiträge anschaue und daraus dann folgenden Code ableite

/*
  Firmata is a generic protocol for communicating with microcontrollers
  from software on a host computer. It is intended to work with
  any host computer software package.

  To download a host software package, please clink on the following link
  to open the download page in your default browser.

  https://github.com/firmata/ConfigurableFirmata#firmata-client-libraries

  Copyright (C) 2006-2008 Hans-Christoph Steiner.  All rights reserved.
  Copyright (C) 2010-2011 Paul Stoffregen.  All rights reserved.
  Copyright (C) 2009 Shigeru Kobayashi.  All rights reserved.
  Copyright (C) 2013 Norbert Truchsess. All rights reserved.
  Copyright (C) 2014 Nicolas Panel. All rights reserved.
  Copyright (C) 2009-2017 Jeff Hoefs.  All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  See file LICENSE.txt for further informations on licensing terms.

  Last updated: September 16th, 2017
*/

/*
README

This is an example use of ConfigurableFirmata. The easiest way to create a configuration is to
use http://firmatabuilder.com and select the communication transport and the firmata features
to include and an Arduino sketch (.ino) file will be generated and downloaded automatically.

To manually configure a sketch, copy this file and follow the instructions in the
ETHERNET CONFIGURATION OPTION (if you want to use Ethernet instead of Serial/USB) and
FIRMATA FEATURE CONFIGURATION sections in this file.
*/

#include "ConfigurableFirmata.h"

/*==============================================================================
* ETHERNET CONFIGURATION OPTION
*
* By default Firmata uses the Serial-port (over USB) of the Arduino. ConfigurableFirmata may also
* comunicate over ethernet using tcp/ip. To configure this sketch to use Ethernet instead of
* Serial, uncomment the approprate includes for your particular hardware. See STEPS 1 - 5 below.
* If you want to use Serial (over USB) then skip ahead to the FIRMATA FEATURE CONFIGURATION
* section further down in this file.
*
* If you enable Ethernet, you will need a Firmata client library with a network transport that can
* act as a server in order to establish a connection between ConfigurableFirmataEthernet and the
* Firmata host application (your application).
*
* To use ConfigurableFirmata with Ethernet you will need to have one of the following
* boards or shields:
*
*  - Arduino Ethernet shield (or clone)
*  - Arduino Ethernet board (or clone)
*  - Arduino Yun
*
*  If you are using an Arduino Ethernet shield you cannot use the following pins on
*  the following boards. Firmata will ignore any requests to use these pins:
*
*  - Arduino Uno or other ATMega328 boards: (D4, D10, D11, D12, D13)
*  - Arduino Mega: (D4, D10, D50, D51, D52, D53)
*  - Arduino Leonardo: (D4, D10)
*  - Arduino Due: (D4, D10)
*  - Arduino Zero: (D4, D10)
*
*  If you are using an ArduinoEthernet board, the following pins cannot be used (same as Uno):
*  - D4, D10, D11, D12, D13
*============================================================================*/

// STEP 1 [REQUIRED]
// Uncomment / comment the appropriate set of includes for your hardware (OPTION A, B or C)

/*
* OPTION A: Configure for Arduino Ethernet board or Arduino Ethernet shield (or clone)
*
* To configure ConfigurableFirmata to use the an Arduino Ethernet Shield or Arduino Ethernet
* Board (both use the same WIZ5100-based Ethernet controller), uncomment the SPI and Ethernet
* includes below.
*/
#include <SPI.h>
#include <Ethernet.h>


/*
* OPTION B: Configure for a board or shield using an ENC28J60-based Ethernet controller,
* uncomment out the UIPEthernet include below.
*
* The UIPEthernet-library can be downloaded
* from: https://github.com/ntruchsess/arduino_uip
*/
//#include <UIPEthernet.h>


/*
* OPTION C: Configure for Arduino Yun
*
* The Ethernet port on the Arduino Yun board can be used with Firmata in this configuration.
* To execute StandardFirmataEthernet on Yun uncomment the Bridge and YunClient includes below.
*
* NOTE: in order to compile for the Yun you will also need to comment out some of the includes
* and declarations in the FIRMATA FEATURE CONFIGURATION section later in this file. Including all
* features exceeds the RAM and Flash memory of the Yun. Comment out anything you don't need.
*
* On Yun there's no need to configure local_ip and mac address as this is automatically
* configured on the linux-side of Yun.
*
* Establishing a connection with the Yun may take several seconds.
*/
//#include <Bridge.h>
//#include <YunClient.h>

#if defined ethernet_h || defined UIPETHERNET_H || defined _YUN_CLIENT_H_
#define NETWORK_FIRMATA

// STEP 2 [REQUIRED for all boards and shields]
// replace with IP of the server you want to connect to, comment out if using 'remote_host'
#define remote_ip IPAddress(192, 168, 1, 35)
// OR replace with hostname of server you want to connect to, comment out if using 'remote_ip'
// #define remote_host "server.local"

// STEP 3 [REQUIRED unless using Arduino Yun]
// Replace with the port that your server is listening on
#define remote_port 3030

// STEP 4 [REQUIRED unless using Arduino Yun OR if not using DHCP]
// Replace with your board or Ethernet shield's IP address
// Comment out if you want to use DHCP
#define local_ip IPAddress(192, 168, 1, 172)

// STEP 5 [REQUIRED unless using Arduino Yun]
// replace with Ethernet shield mac. Must be unique for your network
const byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0x07, 0x02};
#endif

/*==============================================================================
* FIRMATA FEATURE CONFIGURATION
*
* Comment out the include and declaration for any features that you do not need
* below.
*
* WARNING: Including all of the following features (especially if also using
* Ethernet) may exceed the Flash and/or RAM of lower memory boards such as the
* Arduino Uno or Leonardo.
*============================================================================*/

#include <DigitalInputFirmata.h>
DigitalInputFirmata digitalInput;

#include <DigitalOutputFirmata.h>
DigitalOutputFirmata digitalOutput;

//#include <AnalogInputFirmata.h>
//AnalogInputFirmata analogInput;

//#include <AnalogOutputFirmata.h>
//AnalogOutputFirmata analogOutput;

#include <Servo.h>
//#include <ServoFirmata.h>
//ServoFirmata servo;
// ServoFirmata depends on AnalogOutputFirmata
//#if defined ServoFirmata_h && ! defined AnalogOutputFirmata_h
//#error AnalogOutputFirmata must be included to use ServoFirmata
//#endif

#include <Wire.h>
//#include <I2CFirmata.h>
//I2CFirmata i2c;

//#include <OneWireFirmata.h>
//OneWireFirmata oneWire;

// StepperFirmata is deprecated as of ConfigurableFirmata v2.10.0. Please update your
// client implementation to use the new, more full featured and scalable AccelStepperFirmata.
//#include <StepperFirmata.h>
//StepperFirmata stepper;

//#include <AccelStepperFirmata.h>
//AccelStepperFirmata accelStepper;

//#include <SerialFirmata.h>
//SerialFirmata serial;

#include <RCSwitch.h>
#include <RCOutputFirmata.h>
RCOutputFirmata rcOutput;

#include <RCSwitch.h>
#include <RCInputFirmata.h>
RCInputFirmata rcInput;


#include <FirmataExt.h>
FirmataExt firmataExt;

//#include <FirmataScheduler.h>
//FirmataScheduler scheduler;

// To add Encoder support you must first install the FirmataEncoder and Encoder libraries:
// https://github.com/firmata/FirmataEncoder
// https://www.pjrc.com/teensy/td_libs_Encoder.html
// #include <Encoder.h>
// #include <FirmataEncoder.h>
// FirmataEncoder encoder;

/*===================================================================================
* END FEATURE CONFIGURATION - you should not need to change anything below this line
*==================================================================================*/

// dependencies. Do not comment out the following lines
#if defined AnalogOutputFirmata_h || defined ServoFirmata_h
#include <AnalogWrite.h>
#endif

#if defined AnalogInputFirmata_h || defined I2CFirmata_h || defined FirmataEncoder_h || defined RCInputFirmata_h
#include <FirmataReporting.h>
FirmataReporting reporting;
#endif

// dependencies for Network Firmata. Do not comment out.
#ifdef NETWORK_FIRMATA
#if defined remote_ip && defined remote_host
#error "cannot define both remote_ip and remote_host at the same time!"
#endif
#include <EthernetClientStream.h>
#ifdef _YUN_CLIENT_H_
YunClient client;
#else
EthernetClient client;
#endif
#if defined remote_ip && !defined remote_host
#ifdef local_ip
EthernetClientStream stream(client, local_ip, remote_ip, NULL, remote_port);
#else
EthernetClientStream stream(client, IPAddress(0, 0, 0, 0), remote_ip, NULL, remote_port);
#endif
#endif
#if !defined remote_ip && defined remote_host
#ifdef local_ip
EthernetClientStream stream(client, local_ip, IPAddress(0, 0, 0, 0), remote_host, remote_port);
#else
EthernetClientStream stream(client, IPAddress(0, 0, 0, 0), IPAddress(0, 0, 0, 0), remote_host, remote_port);
#endif
#endif
#endif

/*==============================================================================
* FUNCTIONS
*============================================================================*/

void systemResetCallback()
{
  // initialize a default state

  // pins with analog capability default to analog input
  // otherwise, pins default to digital output
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_ANALOG(i)) {
#ifdef AnalogInputFirmata_h
      // turns off pull-up, configures everything
      Firmata.setPinMode(i, PIN_MODE_ANALOG);
#endif
    } else if (IS_PIN_DIGITAL(i)) {
#ifdef DigitalOutputFirmata_h
      // sets the output to 0, configures portConfigInputs
      Firmata.setPinMode(i, OUTPUT);
#endif
    }
  }

#ifdef FirmataExt_h
  firmataExt.reset();
#endif
}

/*==============================================================================
* SETUP()
*============================================================================*/

void setup()
{
  /*
   * ETHERNET SETUP
   */
#ifdef NETWORK_FIRMATA
#ifdef _YUN_CLIENT_H_
  Bridge.begin();
#else
#ifdef local_ip
  Ethernet.begin((uint8_t *)mac, local_ip); //start Ethernet
#else
  Ethernet.begin((uint8_t *)mac); //start Ethernet using dhcp
#endif
#endif
  delay(1000);
#endif

  /*
   * FIRMATA SETUP
   */
  Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

#ifdef FirmataExt_h
#ifdef DigitalInputFirmata_h
  firmataExt.addFeature(digitalInput);
#endif
#ifdef DigitalOutputFirmata_h
  firmataExt.addFeature(digitalOutput);
#endif
#ifdef AnalogInputFirmata_h
  firmataExt.addFeature(analogInput);
#endif
#ifdef AnalogOutputFirmata_h
  firmataExt.addFeature(analogOutput);
#endif
#ifdef ServoFirmata_h
  firmataExt.addFeature(servo);
#endif
#ifdef I2CFirmata_h
  firmataExt.addFeature(i2c);
#endif
#ifdef OneWireFirmata_h
  firmataExt.addFeature(oneWire);
#endif
#ifdef StepperFirmata_h
  firmataExt.addFeature(stepper);
#endif
#ifdef AccelStepperFirmata_h
  firmataExt.addFeature(accelStepper);
#endif
#ifdef SerialFirmata_h
  firmataExt.addFeature(serial);
#endif
#ifdef RCOutputFirmata_h
  firmataExt.addFeature(rcOutput);
#endif
#ifdef RCInputFirmata_h
  firmataExt.addFeature(rcInput);
#endif
#ifdef FirmataReporting_h
  firmataExt.addFeature(reporting);
#endif
#ifdef FirmataScheduler_h
  firmataExt.addFeature(scheduler);
#endif
#ifdef FirmataEncoder_h
  firmataExt.addFeature(encoder);
#endif
#endif
  /* systemResetCallback is declared here (in ConfigurableFirmata.ino) */
  Firmata.attach(SYSTEM_RESET, systemResetCallback);

  // Network Firmata communicates with Ethernet-shields over SPI. Therefor all
  // SPI-pins must be set to PIN_MODE_IGNORE. Otherwise Firmata would break SPI-communication.
  // add Pin 10 and configure pin 53 as output if using a MEGA with Ethernetshield.
  // No need to ignore pin 10 on MEGA with ENC28J60, as here pin 53 should be connected to SS:
#ifdef NETWORK_FIRMATA

  #ifndef _YUN_CLIENT_H_
  // ignore SPI and pin 4 that is SS for SD-Card on Ethernet-shield
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_SPI(i)
        || 4 == i  // SD Card on Ethernet shield uses pin 4 for SS
        || 10 == i // Ethernet-shield uses pin 10 for SS
       ) {
      Firmata.setPinMode(i, PIN_MODE_IGNORE);
    }
  }
  //  pinMode(PIN_TO_DIGITAL(53), OUTPUT); configure hardware-SS as output on MEGA
  pinMode(PIN_TO_DIGITAL(4), OUTPUT); // switch off SD-card bypassing Firmata
  digitalWrite(PIN_TO_DIGITAL(4), HIGH); // SS is active low;
  #endif

  #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    pinMode(PIN_TO_DIGITAL(53), OUTPUT); // configure hardware SS as output on MEGA
  #endif

  // start up Network Firmata:
  Firmata.begin(stream);
#else
  // Uncomment to save a couple of seconds by disabling the startup blink sequence.
  // Firmata.disableBlinkVersion();

  // start up the default Firmata using Serial interface:
  Firmata.begin(57600);
#endif
  systemResetCallback();  // reset to default config
}

/*==============================================================================
* LOOP()
*============================================================================*/
void loop()
{
#ifdef DigitalInputFirmata_h
  /* DIGITALREAD - as fast as possible, check for changes and output them to the
   * stream buffer using Firmata.write()  */
  digitalInput.report();
#endif

  /* STREAMREAD - processing incoming message as soon as possible, while still
   * checking digital inputs.  */
  while (Firmata.available()) {
    Firmata.processInput();
#ifdef FirmataScheduler_h
    if (!Firmata.isParsingMessage()) {
      goto runtasks;
    }
  }
  if (!Firmata.isParsingMessage()) {
runtasks: scheduler.runTasks();
#endif
  }

  /* SEND STREAM WRITE BUFFER - TO DO: make sure that the stream buffer doesn't go over
   * 60 bytes. use a timer to sending an event character every 4 ms to
   * trigger the buffer to dump. */

#ifdef FirmataReporting_h
  if (reporting.elapsed()) {
#ifdef AnalogInputFirmata_h
    /* ANALOGREAD - do all analogReads() at the configured sampling interval */
    analogInput.report();
#endif
#ifdef I2CFirmata_h
    // report i2c data for all device with read continuous mode enabled
    i2c.report();
#endif
#ifdef FirmataEncoder_h
    // report encoders positions if reporting enabled.
    encoder.report();
#endif
#ifdef EncoderFirmata_h
    // report encoders positions if reporting enabled.
    encoder.report();
#endif
#ifdef RCInputFirmata_h
    rcInput.report();
#endif
  }
#endif
#ifdef StepperFirmata_h
  stepper.update();
#endif
#ifdef AccelStepperFirmata_h
  accelStepper.update();
#endif
#ifdef SerialFirmata_h
  serial.update();
#endif

#if defined NETWORK_FIRMATA && !defined local_ip &&!defined _YUN_CLIENT_H_
  // only necessary when using DHCP, ensures local IP is updated appropriately if it changes
  if (Ethernet.maintain()) {
    stream.maintain(Ethernet.localIP());
  }
#endif
}


bekomme ich folgende Fehlermeldung:


/home/xxx/Arduino/RCGateway2/RCGateway2.ino:190:29: fatal error: RCOutputFirmata.h: No such file or directory
#include <RCOutputFirmata.h>
                             ^
compilation terminated.
exit status 1
Fehler beim Kompilieren für das Board Arduino/Genuino Uno.


also Schlussfolgere ich, dass mir folgende Liberys feheln.

#include <RCOutputFirmata.h>
#include <RCInputFirmata.h>


Jetzt frage ich auch was habe ich über sehen?

Vielen Dank für eure Unterstützung.

Wenn ich es zum laufen gebracht habe, werde ich mein Setup nochmals neu dokumentieren und hier zur Verfügung stellen.

Gruß
Meck


Edit:Antwort wohl überlesen #197 ist die RcFirmata die ich überlesen habe. Werde es ausprobieren. Und Rückmeldung gebe.

Christian.

Raspberry Pi 3 mit FHEM; Arduino Nano mit ConfigurableFirmata (S0-Stromzähler); nanoCUL (MAX!); SIGNALduino (RXB6, 433 MHz); eBus; RS485 & D0 (SolarView); DVB-T (Thermo-/Hygrometer); Z-Wave; ZigBee

Meck

Christian. Du hattest recht.
So nach mehreren versuchen habe ich es immer noch nicht zum laufen bekommen.

Abgespecktes Ziel ist es zunächst über ein über USB angeschlossenen Arduino Mini Pollin Funksteckdosen zuschalten bzw. die Fernbedienung zu empfangen .

Da ich es nicht geschafft habe, bitte ich euch um Unterstützung.  Am besten ich beschreibe einfach mal was ich gemacht habe. Da seid dem hier hier das gemacht habt sich auch bei Ardunino und FHEM etwas getan hat.

1. Meine IDE ist  1.8.5 unter Linux
    Mein Arduino ist ein Mini China clone mit CH340G Chip
2. ConfigurableFirmata ist 2.10.0
   https://github.com/firmata/ConfigurableFirmata
3. RCSwitch ist  2.6.2
   https://github.com/sui77/rc-switch
4. Verwedung der RCSwitchFirmata aus Post #197
5. Mein FHEM ist Rev  13447


Damit ich den Code kompilieren konnte musste ich die Dateien RCOutputFirmata.h RCInputFirmata.h aus der RCSwitchFirmata apassen.

#include <utility/FirmataFeature.h>

habe ich wie folgt geändert.

#include <FirmataFeature.h>

Danach habe ich die Dateien RCInputFirmata.cpp  RCInputFirmata.h  RCOutputFirmata.cpp  RCOutputFirmata.h in das Verzeichnis /home/[USER]/Arduino/libraries/ConfigurableFirmata/src/ kopiert.

Danach hab ich das angepasst Beispiel Sketch auf den Arduino gespielt.

/*
  Firmata is a generic protocol for communicating with microcontrollers
  from software on a host computer. It is intended to work with
  any host computer software package.

  To download a host software package, please clink on the following link
  to open the download page in your default browser.

  https://github.com/firmata/ConfigurableFirmata#firmata-client-libraries

  Copyright (C) 2006-2008 Hans-Christoph Steiner.  All rights reserved.
  Copyright (C) 2010-2011 Paul Stoffregen.  All rights reserved.
  Copyright (C) 2009 Shigeru Kobayashi.  All rights reserved.
  Copyright (C) 2013 Norbert Truchsess. All rights reserved.
  Copyright (C) 2014 Nicolas Panel. All rights reserved.
  Copyright (C) 2009-2017 Jeff Hoefs.  All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  See file LICENSE.txt for further informations on licensing terms.

  Last updated: September 16th, 2017
*/

/*
README

This is an example use of ConfigurableFirmata. The easiest way to create a configuration is to
use http://firmatabuilder.com and select the communication transport and the firmata features
to include and an Arduino sketch (.ino) file will be generated and downloaded automatically.

To manually configure a sketch, copy this file and follow the instructions in the
ETHERNET CONFIGURATION OPTION (if you want to use Ethernet instead of Serial/USB) and
FIRMATA FEATURE CONFIGURATION sections in this file.
*/

#include "ConfigurableFirmata.h"

/*==============================================================================
* ETHERNET CONFIGURATION OPTION
*
* By default Firmata uses the Serial-port (over USB) of the Arduino. ConfigurableFirmata may also
* comunicate over ethernet using tcp/ip. To configure this sketch to use Ethernet instead of
* Serial, uncomment the approprate includes for your particular hardware. See STEPS 1 - 5 below.
* If you want to use Serial (over USB) then skip ahead to the FIRMATA FEATURE CONFIGURATION
* section further down in this file.
*
* If you enable Ethernet, you will need a Firmata client library with a network transport that can
* act as a server in order to establish a connection between ConfigurableFirmataEthernet and the
* Firmata host application (your application).
*
* To use ConfigurableFirmata with Ethernet you will need to have one of the following
* boards or shields:
*
*  - Arduino Ethernet shield (or clone)
*  - Arduino Ethernet board (or clone)
*  - Arduino Yun
*
*  If you are using an Arduino Ethernet shield you cannot use the following pins on
*  the following boards. Firmata will ignore any requests to use these pins:
*
*  - Arduino Uno or other ATMega328 boards: (D4, D10, D11, D12, D13)
*  - Arduino Mega: (D4, D10, D50, D51, D52, D53)
*  - Arduino Leonardo: (D4, D10)
*  - Arduino Due: (D4, D10)
*  - Arduino Zero: (D4, D10)
*
*  If you are using an ArduinoEthernet board, the following pins cannot be used (same as Uno):
*  - D4, D10, D11, D12, D13
*============================================================================*/

// STEP 1 [REQUIRED]
// Uncomment / comment the appropriate set of includes for your hardware (OPTION A, B or C)

/*
* OPTION A: Configure for Arduino Ethernet board or Arduino Ethernet shield (or clone)
*
* To configure ConfigurableFirmata to use the an Arduino Ethernet Shield or Arduino Ethernet
* Board (both use the same WIZ5100-based Ethernet controller), uncomment the SPI and Ethernet
* includes below.
*/
//#include <SPI.h>
//#include <Ethernet.h>


/*
* OPTION B: Configure for a board or shield using an ENC28J60-based Ethernet controller,
* uncomment out the UIPEthernet include below.
*
* The UIPEthernet-library can be downloaded
* from: https://github.com/ntruchsess/arduino_uip
*/
//#include <UIPEthernet.h>


/*
* OPTION C: Configure for Arduino Yun
*
* The Ethernet port on the Arduino Yun board can be used with Firmata in this configuration.
* To execute StandardFirmataEthernet on Yun uncomment the Bridge and YunClient includes below.
*
* NOTE: in order to compile for the Yun you will also need to comment out some of the includes
* and declarations in the FIRMATA FEATURE CONFIGURATION section later in this file. Including all
* features exceeds the RAM and Flash memory of the Yun. Comment out anything you don't need.
*
* On Yun there's no need to configure local_ip and mac address as this is automatically
* configured on the linux-side of Yun.
*
* Establishing a connection with the Yun may take several seconds.
*/
//#include <Bridge.h>
//#include <YunClient.h>

#if defined ethernet_h || defined UIPETHERNET_H || defined _YUN_CLIENT_H_
#define NETWORK_FIRMATA

// STEP 2 [REQUIRED for all boards and shields]
// replace with IP of the server you want to connect to, comment out if using 'remote_host'
#define remote_ip IPAddress(192, 168, 1, 75)
// OR replace with hostname of server you want to connect to, comment out if using 'remote_ip'
// #define remote_host "server.local"

// STEP 3 [REQUIRED unless using Arduino Yun]
// Replace with the port that your server is listening on
#define remote_port 3030

// STEP 4 [REQUIRED unless using Arduino Yun OR if not using DHCP]
// Replace with your board or Ethernet shield's IP address
// Comment out if you want to use DHCP
#define local_ip IPAddress(192, 168, 1, 172)

// STEP 5 [REQUIRED unless using Arduino Yun]
// replace with Ethernet shield mac. Must be unique for your network
const byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0x07, 0x02};
#endif

/*==============================================================================
* FIRMATA FEATURE CONFIGURATION
*
* Comment out the include and declaration for any features that you do not need
* below.
*
* WARNING: Including all of the following features (especially if also using
* Ethernet) may exceed the Flash and/or RAM of lower memory boards such as the
* Arduino Uno or Leonardo.
*============================================================================*/

#include <DigitalInputFirmata.h>
DigitalInputFirmata digitalInput;

#include <DigitalOutputFirmata.h>
DigitalOutputFirmata digitalOutput;

//#include <AnalogInputFirmata.h>
//AnalogInputFirmata analogInput;

//#include <AnalogOutputFirmata.h>
//AnalogOutputFirmata analogOutput;

#include <Servo.h>
//#include <ServoFirmata.h>
//ServoFirmata servo;
// ServoFirmata depends on AnalogOutputFirmata
//#if defined ServoFirmata_h && ! defined AnalogOutputFirmata_h
//#error AnalogOutputFirmata must be included to use ServoFirmata
//#endif

#include <Wire.h>
//#include <I2CFirmata.h>
//I2CFirmata i2c;

//#include <OneWireFirmata.h>
//OneWireFirmata oneWire;

// StepperFirmata is deprecated as of ConfigurableFirmata v2.10.0. Please update your
// client implementation to use the new, more full featured and scalable AccelStepperFirmata.
//#include <StepperFirmata.h>
//StepperFirmata stepper;

//#include <AccelStepperFirmata.h>
//AccelStepperFirmata accelStepper;

//#include <SerialFirmata.h>
//SerialFirmata serial;

#include <RCSwitch.h>
#include <RCOutputFirmata.h>
RCOutputFirmata rcOutput;

#include <RCSwitch.h>
#include <RCInputFirmata.h>
RCInputFirmata rcInput;


#include <FirmataExt.h>
FirmataExt firmataExt;

//#include <FirmataScheduler.h>
//FirmataScheduler scheduler;

// To add Encoder support you must first install the FirmataEncoder and Encoder libraries:
// https://github.com/firmata/FirmataEncoder
// https://www.pjrc.com/teensy/td_libs_Encoder.html
// #include <Encoder.h>
// #include <FirmataEncoder.h>
// FirmataEncoder encoder;

/*===================================================================================
* END FEATURE CONFIGURATION - you should not need to change anything below this line
*==================================================================================*/

// dependencies. Do not comment out the following lines
#if defined AnalogOutputFirmata_h || defined ServoFirmata_h
#include <AnalogWrite.h>
#endif

#if defined AnalogInputFirmata_h || defined I2CFirmata_h || defined FirmataEncoder_h || defined RCInputFirmata_h
#include <FirmataReporting.h>
FirmataReporting reporting;
#endif

// dependencies for Network Firmata. Do not comment out.
#ifdef NETWORK_FIRMATA
#if defined remote_ip && defined remote_host
#error "cannot define both remote_ip and remote_host at the same time!"
#endif
#include <EthernetClientStream.h>
#ifdef _YUN_CLIENT_H_
YunClient client;
#else
EthernetClient client;
#endif
#if defined remote_ip && !defined remote_host
#ifdef local_ip
EthernetClientStream stream(client, local_ip, remote_ip, NULL, remote_port);
#else
EthernetClientStream stream(client, IPAddress(0, 0, 0, 0), remote_ip, NULL, remote_port);
#endif
#endif
#if !defined remote_ip && defined remote_host
#ifdef local_ip
EthernetClientStream stream(client, local_ip, IPAddress(0, 0, 0, 0), remote_host, remote_port);
#else
EthernetClientStream stream(client, IPAddress(0, 0, 0, 0), IPAddress(0, 0, 0, 0), remote_host, remote_port);
#endif
#endif
#endif

/*==============================================================================
* FUNCTIONS
*============================================================================*/

void systemResetCallback()
{
  // initialize a default state

  // pins with analog capability default to analog input
  // otherwise, pins default to digital output
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_ANALOG(i)) {
#ifdef AnalogInputFirmata_h
      // turns off pull-up, configures everything
      Firmata.setPinMode(i, PIN_MODE_ANALOG);
#endif
    } else if (IS_PIN_DIGITAL(i)) {
#ifdef DigitalOutputFirmata_h
      // sets the output to 0, configures portConfigInputs
      Firmata.setPinMode(i, OUTPUT);
#endif
    }
  }

#ifdef FirmataExt_h
  firmataExt.reset();
#endif
}

/*==============================================================================
* SETUP()
*============================================================================*/

void setup()
{
  /*
   * ETHERNET SETUP
   */
#ifdef NETWORK_FIRMATA
#ifdef _YUN_CLIENT_H_
  Bridge.begin();
#else
#ifdef local_ip
  Ethernet.begin((uint8_t *)mac, local_ip); //start Ethernet
#else
  Ethernet.begin((uint8_t *)mac); //start Ethernet using dhcp
#endif
#endif
  delay(1000);
#endif

  /*
   * FIRMATA SETUP
   */
  Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);

#ifdef FirmataExt_h
#ifdef DigitalInputFirmata_h
  firmataExt.addFeature(digitalInput);
#endif
#ifdef DigitalOutputFirmata_h
  firmataExt.addFeature(digitalOutput);
#endif
#ifdef AnalogInputFirmata_h
  firmataExt.addFeature(analogInput);
#endif
#ifdef AnalogOutputFirmata_h
  firmataExt.addFeature(analogOutput);
#endif
#ifdef ServoFirmata_h
  firmataExt.addFeature(servo);
#endif
#ifdef I2CFirmata_h
  firmataExt.addFeature(i2c);
#endif
#ifdef OneWireFirmata_h
  firmataExt.addFeature(oneWire);
#endif
#ifdef StepperFirmata_h
  firmataExt.addFeature(stepper);
#endif
#ifdef AccelStepperFirmata_h
  firmataExt.addFeature(accelStepper);
#endif
#ifdef SerialFirmata_h
  firmataExt.addFeature(serial);
#endif
#ifdef RCOutputFirmata_h
  firmataExt.addFeature(rcOutput);
#endif
#ifdef RCInputFirmata_h
  firmataExt.addFeature(rcInput);
#endif
#ifdef FirmataReporting_h
  firmataExt.addFeature(reporting);
#endif
#ifdef FirmataScheduler_h
  firmataExt.addFeature(scheduler);
#endif
#ifdef FirmataEncoder_h
  firmataExt.addFeature(encoder);
#endif
#endif
  /* systemResetCallback is declared here (in ConfigurableFirmata.ino) */
  Firmata.attach(SYSTEM_RESET, systemResetCallback);

  // Network Firmata communicates with Ethernet-shields over SPI. Therefor all
  // SPI-pins must be set to PIN_MODE_IGNORE. Otherwise Firmata would break SPI-communication.
  // add Pin 10 and configure pin 53 as output if using a MEGA with Ethernetshield.
  // No need to ignore pin 10 on MEGA with ENC28J60, as here pin 53 should be connected to SS:
#ifdef NETWORK_FIRMATA

  #ifndef _YUN_CLIENT_H_
  // ignore SPI and pin 4 that is SS for SD-Card on Ethernet-shield
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_SPI(i)
        || 4 == i  // SD Card on Ethernet shield uses pin 4 for SS
        || 10 == i // Ethernet-shield uses pin 10 for SS
       ) {
      Firmata.setPinMode(i, PIN_MODE_IGNORE);
    }
  }
  //  pinMode(PIN_TO_DIGITAL(53), OUTPUT); configure hardware-SS as output on MEGA
  pinMode(PIN_TO_DIGITAL(4), OUTPUT); // switch off SD-card bypassing Firmata
  digitalWrite(PIN_TO_DIGITAL(4), HIGH); // SS is active low;
  #endif

  #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    pinMode(PIN_TO_DIGITAL(53), OUTPUT); // configure hardware SS as output on MEGA
  #endif

  // start up Network Firmata:
  Firmata.begin(stream);
#else
  // Uncomment to save a couple of seconds by disabling the startup blink sequence.
  // Firmata.disableBlinkVersion();

  // start up the default Firmata using Serial interface:
  Firmata.begin(57600);
#endif
  systemResetCallback();  // reset to default config
}

/*==============================================================================
* LOOP()
*============================================================================*/
void loop()
{
#ifdef DigitalInputFirmata_h
  /* DIGITALREAD - as fast as possible, check for changes and output them to the
   * stream buffer using Firmata.write()  */
  digitalInput.report();
#endif

  /* STREAMREAD - processing incoming message as soon as possible, while still
   * checking digital inputs.  */
  while (Firmata.available()) {
    Firmata.processInput();
#ifdef FirmataScheduler_h
    if (!Firmata.isParsingMessage()) {
      goto runtasks;
    }
  }
  if (!Firmata.isParsingMessage()) {
runtasks: scheduler.runTasks();
#endif
  }

  /* SEND STREAM WRITE BUFFER - TO DO: make sure that the stream buffer doesn't go over
   * 60 bytes. use a timer to sending an event character every 4 ms to
   * trigger the buffer to dump. */

#ifdef FirmataReporting_h
  if (reporting.elapsed()) {
#ifdef AnalogInputFirmata_h
    /* ANALOGREAD - do all analogReads() at the configured sampling interval */
    analogInput.report();
#endif
#ifdef I2CFirmata_h
    // report i2c data for all device with read continuous mode enabled
    i2c.report();
#endif
#ifdef FirmataEncoder_h
    // report encoders positions if reporting enabled.
    encoder.report();
#endif
#ifdef EncoderFirmata_h
    // report encoders positions if reporting enabled.
    encoder.report();
#endif
#ifdef RCInputFirmata_h
    rcInput.report();
#endif
  }
#endif
#ifdef StepperFirmata_h
  stepper.update();
#endif
#ifdef AccelStepperFirmata_h
  accelStepper.update();
#endif
#ifdef SerialFirmata_h
  serial.update();
#endif

#if defined NETWORK_FIRMATA && !defined local_ip &&!defined _YUN_CLIENT_H_
  // only necessary when using DHCP, ensures local IP is updated appropriately if it changes
  if (Ethernet.maintain()) {
    stream.maintain(Ethernet.localIP());
  }
#endif
}


Folgende Info bekomme ich von der IDE

In file included from /home/[USER]/Arduino/RCGateway2/RCGateway2.ino:163:0:
/home/[USER]/Downloads/arduino-1.8.5/libraries/Servo/src/Servo.h:84:0: warning: "MAX_SERVOS" redefined
#define MAX_SERVOS   (_Nbr_16timers  * SERVOS_PER_TIMER)
^
In file included from /home/[USER]/Arduino/libraries/ConfigurableFirmata/src/ConfigurableFirmata.h:18:0,
                 from /home/[USER]/Arduino/RCGateway2/RCGateway2.ino:40:
/home/[USER]/Arduino/libraries/ConfigurableFirmata/src/utility/Boards.h:33:0: note: this is the location of the previous definition
#define MAX_SERVOS 0
^
In file included from /home/[USER]/Arduino/libraries/ConfigurableFirmata/src/OneWireFirmata.cpp:17:0:
/home/[USER]/Arduino/libraries/ConfigurableFirmata/src/OneWireFirmata.h:38:0: warning: "ONEWIRE_CRC" redefined
#define ONEWIRE_CRC 0 //for OneWire.h: crc-functions are not used by Firmata
^
In file included from /home/[USER]/Arduino/libraries/ConfigurableFirmata/src/OneWireFirmata.h:18:0,
                 from /home/meck/Arduino/libraries/ConfigurableFirmata/src/OneWireFirmata.cpp:17:
/home/[USER]/Arduino/libraries/ConfigurableFirmata/src/utility/OneWire.h:30:0: note: this is the location of the previous definition
#define ONEWIRE_CRC 1
^
Der Sketch verwendet 11566 Bytes (37%) des Programmspeicherplatzes. Das Maximum sind 30720 Bytes.
Globale Variablen verwenden 1091 Bytes (53%) des dynamischen Speichers, 957 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.



Folgende Dateien habe ich in das Verzeichnis /opt/fhem/FHEM/ Kopiert
15_FRM_RC.pm
20_FRM_RCIN.pm
20_FRM_RCOUT.pm

Danach in FHEM

reload 15_FRM_RC.pm
reload 20_FRM_RCOUT.pm
reload 20_FRM_RCIN.pm


Da das define vom SENDER433n auch bei mir nicht geklappt hat habe ich die config manuell angepasst und das System neu gestartet

opt/fhem/fhem.cfg


define RCSwitchGateWay FRM 3030 global
attr RCSwitchGateWay model mini
define SENDER433n FRM_RCOUT 7
attr SENDER433n IODev  RCSwitchGateWay
attr SENDER433n defaultBitCount 24
define EMPF433n FRM_RCIN 2
attr EMPF433n IODev  RCSwitchGateWay

Folgende Loggs wurden nach dem Start geschrieben

2017.12.01 21:07:47 1: PERL WARNING: Constant subroutine main::RC_ATTRIBUTES redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:07:47 1: PERL WARNING: Constant subroutine main::RC_TRISTATE_BIT_VALUES redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:07:47 1: PERL WARNING: Constant subroutine main::RC_TRISTATE_CHARS redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:07:47 1: PERL WARNING: Constant subroutine main::RC_TRISTATE_BITS redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Initialize redefined at ./FHEM/15_FRM_RC.pm line 37.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Define redefined at ./FHEM/15_FRM_RC.pm line 42.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Undefine redefined at ./FHEM/15_FRM_RC.pm line 51.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Init redefined at ./FHEM/15_FRM_RC.pm line 61.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Notify redefined at ./FHEM/15_FRM_RC.pm line 87.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_Attr redefined at ./FHEM/15_FRM_RC.pm line 116.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_register_observer redefined at ./FHEM/15_FRM_RC.pm line 139.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_unregister_observer redefined at ./FHEM/15_FRM_RC.pm line 162.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_apply_attribute redefined at ./FHEM/15_FRM_RC.pm line 169.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_set_parameter redefined at ./FHEM/15_FRM_RC.pm line 207.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_observe_sysex redefined at ./FHEM/15_FRM_RC.pm line 213.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_get_tristate_code redefined at ./FHEM/15_FRM_RC.pm line 247.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_get_tristate_bits redefined at ./FHEM/15_FRM_RC.pm line 254.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_get_tristate_byte redefined at ./FHEM/15_FRM_RC.pm line 259.
2017.12.01 21:07:47 1: PERL WARNING: Subroutine FRM_RC_send_message redefined at ./FHEM/15_FRM_RC.pm line 267.
2017.12.01 21:08:10 1: PERL WARNING: Constant subroutine main::RCIN_PARAMETERS redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:08:10 1: PERL WARNING: Constant subroutine main::RCIN_PARAMETER_NAMES redefined at /usr/share/perl/5.22/constant.pm line 171.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_Initialize redefined at ./FHEM/20_FRM_RCIN.pm line 30.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_Init redefined at ./FHEM/20_FRM_RCIN.pm line 50.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_Notify redefined at ./FHEM/20_FRM_RCIN.pm line 55.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_Attr redefined at ./FHEM/20_FRM_RCIN.pm line 61.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_handle_rc_response redefined at ./FHEM/20_FRM_RCIN.pm line 68.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_notify redefined at ./FHEM/20_FRM_RCIN.pm line 92.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_long_to_tristate_code redefined at ./FHEM/20_FRM_RCIN.pm line 140.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_get_attributes redefined at ./FHEM/20_FRM_RCIN.pm line 150.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_get_internal_value redefined at ./FHEM/20_FRM_RCIN.pm line 155.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_get_user_value redefined at ./FHEM/20_FRM_RCIN.pm line 163.
2017.12.01 21:08:10 1: PERL WARNING: Subroutine FRM_RCIN_is_rawdata_enabled redefined at ./FHEM/20_FRM_RCIN.pm line 171.


Leider funktioniert dieses Setup nicht.
Vielen Dank für eure Unterstützung.


Gruß
Meck

Christian.

Da fallen mir verschiedene Dinge ein bzw. auf.

  • Deine FRM-Definition define RCSwitchGateWay FRM 3030 global ist für einen Arduino im Netzwerk ausgelegt. Du schreibst aber, Du hast ihn per USB angeschlossen. Dann müsste es anders aussehen, etwa define RCSwitchGateWay FRM /dev/ttyUSB0@57600
  • Beim Verbinden des Arduino sollten einige Log-Meldungen von firmata mit Log-Level 3 auftauchen. Erhöhe ggf. bei den betroffenen Modulen das Attribut verbose.
  • Es gab schon einmal ein Problem, wenn die Version des Arduino-Sketches nicht zur FHEM-Seite passte; damals musste es die Version 2.06 sein (siehe hier). Evtl. kommst Du weiter, wenn Du (nur zum Testen) die Version mal im auf 2.6 anpasst. Die Version findest Du nach erfolgreichem Verbindungsaufbau auch in den Internals Deines RCSwitchGateWay.
  • Wenn ich mich recht erinnere, ist RCSwitch bereits in RCSwitchFirmata enthalten. Ich weiß nicht, ob eine aktuellere Version sich evtl. inkompatibel geändert hat.
Raspberry Pi 3 mit FHEM; Arduino Nano mit ConfigurableFirmata (S0-Stromzähler); nanoCUL (MAX!); SIGNALduino (RXB6, 433 MHz); eBus; RS485 & D0 (SolarView); DVB-T (Thermo-/Hygrometer); Z-Wave; ZigBee

Meck

Vielen Dank Christian. danke für deine Hilfe mit Punkt 1. Hattest du recht. 
Bei Punkt 3 muss ich sagen das in der RCSwitchFirmata nur die bereits von mir genannten Dateien sind.  Jetzt vermute ich auch wie du, dass das FHEM Modul sowie die Configurable Firmata nicht mehr zusammen passen.

2017.12.04 21:11:37 3: Setting RCSwitchGateWay serial parameters to 57600,8,N,1
2017.12.04 21:11:40 3: querying Firmata Firmware Version
2017.12.04 21:11:41 3: querying Firmata Firmware Version
2017.12.04 21:11:42 3: querying Firmata Firmware Version
2017.12.04 21:11:42 3: no response from Firmata, closing DevIO
2017.12.04 21:11:42 1: /dev/ttyUSB0 disconnected, waiting to reappear (RCSwitchGateWay)
2017.12.04 21:11:52 3: Setting RCSwitchGateWay serial parameters to 57600,8,N,1
2017.12.04 21:11:52 1: PERL WARNING: Use of uninitialized value in addition (+) at FHEM/lib/Device/Firmata/Protocol.pm line 206.
2017.12.04 21:11:55 3: querying Firmata Firmware Version
2017.12.04 21:11:56 3: querying Firmata Firmware Version
2017.12.04 21:11:56 3: Firmata Firmware Version: RCGateway2.ino V_2_10
2017.12.04 21:11:56 1: PERL WARNING: Use of uninitialized value $buf in unpack at ./FHEM/10_FRM.pm line 632.
2017.12.04 21:11:56 1: PERL WARNING: Use of uninitialized value $wbuf in string eq at /usr/lib/i386-linux-gnu/perl5/5.22/Device/SerialPort.pm line 1729.
2017.12.04 21:11:57 2: error initializing 'EMPF433n': Unsupported firmata protocol version V_2_10. Supported versions: V_2_06 V_2_05 V_2_04 V_2_03 V_2_02 V_2_01
2017.12.04 21:11:57 2: error initializing 'SENDER433n': Unsupported firmata protocol version V_2_10. Supported versions: V_2_06 V_2_05 V_2_04 V_2_03 V_2_02 V_2_01
2017.12.04 21:11:57 1: /dev/ttyUSB0 reappeared (RCSwitchGateWay)


Schade jetzt hört aufgrund meines geringen wissen meine Möglichkeiten auf.

Vielleicht werde ich es noch mal in der Zukunft aufgreifen wenn ich mein Wissen ausgebaut habe.