Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Entwicklung und Bau von Hardware aller Art, die im HM-Umfeld eingesetzt werden kann

Moderator: Co-Administratoren

Benutzeravatar
NilsG
Beiträge: 1692
Registriert: 09.08.2013, 23:44
System: CCU
Hat sich bedankt: 383 Mal
Danksagung erhalten: 30 Mal
Kontaktdaten:

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von NilsG » 04.03.2019, 20:50

Hallo zusammen ...

Ließt hier jemand mit, der mir ggf. zwei dieser Geräte für die Levejet-Integration in Homematic nach der Anleitung von Tom
steckerfertig basteln könnnte/würde?!?
Den Rest mit Scripten etc. traue ich mir selbst zu ... Die Löterei leider nicht :|

Bitte PN!

Danke,

Nils
Grüße und DANKE! 🍻

Nils

-----------------------------------------
CCU3 + 2x LAN-Gateway

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 05.03.2019, 06:00

Du meinst das hier:

https://github.com/TomMajor/AskSinPP_Ex ... B-SEN-LJet

Das ist doch nun wirklich keine große Sache. Aber bekommst Du es hin, einen Sketch aufzuspielen?
Schreib mir mal eine PN.
Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 05.03.2019, 19:58

Ich bekomme beim Kompilieren eine Unmenge an Fehlermeldungen. Hat jemand eine Idee, woran das liegen könnte?
Ich habe in Zeile 28 "src" entfernt, weil er ständig gemeckert hat, dass er die Datei so nicht findet.

https://github.com/TomMajor/AskSinPP_Ex ... N-LJet.ino

Code: Alles auswählen

In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:31:3: error: stray '\302' in program
   <title>AskSinPP_Examples/Leveljet.h at master · TomMajor/AskSinPP_Examples · GitHub</title>
   ^
/tmp/arduino_build_883/sketch/Leveljet.h:31:3: error: stray '\267' in program
/tmp/arduino_build_883/sketch/Leveljet.h:31:3: error: stray '\302' in program
/tmp/arduino_build_883/sketch/Leveljet.h:31:3: error: stray '\267' in program
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:243:5: error: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="123202370" data-scoped-search-url="/TomMajor/AskSinPP_Examples/search" data-unscoped-search-url="/search" action="/TomMajor/AskSinPP_Examples/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
     ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:289:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:289:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:289:7: error: stray '\265' in program
/tmp/arduino_build_883/sketch/Leveljet.h:294:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:294:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:294:7: error: stray '\265' in program
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:330:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:330:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:330:7: error: stray '\265' in program
/tmp/arduino_build_883/sketch/Leveljet.h:335:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:335:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:335:7: error: stray '\265' in program
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:362:7: error: stray '\342' in program
       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:362:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:362:7: error: stray '\265' in program
/tmp/arduino_build_883/sketch/Leveljet.h:367:7: error: stray '\342' in program
       <span class="d-inline-block ml-1 v-align-middle">↵</span>
       ^
/tmp/arduino_build_883/sketch/Leveljet.h:367:7: error: stray '\206' in program
/tmp/arduino_build_883/sketch/Leveljet.h:367:7: error: stray '\265' in program
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:534:11: error: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/site/dismiss_signup_prompt" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="hatUebAJoRYAX8s5iKek5Jnr0rY4jUGwHdBdCN4DcioVLaz1G7WrF6SCCbvtRoa4mCE2USN1GK6vkfQqIPI3iA==" />
           ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:681:70: error: stray '#' in program
         <td id="LC12" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">ifndef</span> _LEVELJET_H_</td>
                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:685:70: error: stray '#' in program
         <td id="LC13" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">define</span> <span class="pl-en">_LEVELJET_H_</span></td>
                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:694:70: error: stray '#' in program
         <td id="LC15" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>Peiltabelle.h<span class="pl-pds">&quot;</span></span></td>
                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:926:70: error: stray '#' in program
         <td id="LC71" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">ifndef</span> NDEBUG</td>
                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:934:70: error: stray '#' in program
         <td id="LC73" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:1087:71: error: stray '#' in program
         <td id="LC111" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">ifndef</span> NDEBUG</td>
                                                                       ^
/tmp/arduino_build_883/sketch/Leveljet.h:1099:71: error: stray '#' in program
         <td id="LC114" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
                                                                       ^
/tmp/arduino_build_883/sketch/Leveljet.h:1299:71: error: stray '#' in program
         <td id="LC163" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">endif</span></td>
                                                                       ^
/tmp/arduino_build_883/sketch/Leveljet.h:1326:7: error: missing terminating ' character
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
       ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:1381:5: error: stray '\342' in program
     You can’t perform that action at this time.
     ^
/tmp/arduino_build_883/sketch/Leveljet.h:1381:5: error: stray '\200' in program
/tmp/arduino_build_883/sketch/Leveljet.h:1381:5: error: stray '\231' in program
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:7:1: error: expected unqualified-id before '<' token
 <!DOCTYPE html>
 ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:146:267: error: expected unqualified-id before '<' token
                     <a href="/features" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Features <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a>
                                                                                                                                                                                                                                                                           ^
/tmp/arduino_build_883/sketch/Leveljet.h:159:328: error: expected unqualified-id before '<' token
                       <li class="edge-item-fix"><a href="/case-studies" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Customer stories">Customer stories <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a></li>
                                                                                                                                                                                                                                                                                                                                        ^
/tmp/arduino_build_883/sketch/Leveljet.h:160:308: error: expected unqualified-id before '<' token
                       <li class="edge-item-fix"><a href="/security" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Security">Security <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a></li>
                                                                                                                                                                                                                                                                                                                    ^
/tmp/arduino_build_883/sketch/Leveljet.h:180:300: error: expected unqualified-id before '<' token
                       <li class="edge-item-fix"><a href="/explore" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Explore GitHub <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a></li>
                                                                                                                                                                                                                                                                                                            ^
/tmp/arduino_build_883/sketch/Leveljet.h:183:108: error: 'contribute' does not name a type
                     <h4 class="text-gray-light text-normal text-mono f5 mb-2  border-top pt-3">Learn &amp; contribute</h4>
                                                                                                            ^
/tmp/arduino_build_883/sketch/Leveljet.h:216:262: error: expected unqualified-id before '<' token
                     <a href="/pricing" class="pb-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Pricing">Plans <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a>
                                                                                                                                                                                                                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:224:312: error: expected unqualified-id before '<' token
                       <li class="edge-item-fix"><a href="/nonprofit" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Nonprofits">Nonprofit <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a></li>
                                                                                                                                                                                                                                                                                                                        ^
/tmp/arduino_build_883/sketch/Leveljet.h:225:335: error: expected unqualified-id before '<' token
                       <li class="edge-item-fix"><a href="https://education.github.com" class="py-2 pb-0 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover"  data-ga-click="(Logged out) Header, go to Education">Education <span class="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</span></a></li>
                                                                                                                                                                                                                                                                                                                                               ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:382:236: error: 'in' does not name a type
         <a class="HeaderMenu-link no-underline mr-3" href="/login?return_to=%2FTomMajor%2FAskSinPP_Examples%2Fblob%2Fmaster%2FHB-SEN-LJet%2Fsrc%2FLeveljet.h" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign&nbsp;in</a>
                                                                                                                                                                                                                                            ^
/tmp/arduino_build_883/sketch/Leveljet.h:383:200: error: 'up' does not name a type
           <a class="HeaderMenu-link d-inline-block no-underline border border-gray-dark rounded-1 px-2 py-1" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign&nbsp;up</a>
                                                                                                                                                                                                        ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:584:7: error: expected unqualified-id before '<' token
       </div>
       ^
In file included from /tmp/arduino_modified_sketch_381601/HomeMatic_HB_SEN_Ljet.ino:28:0:
/tmp/arduino_build_883/sketch/Leveljet.h:694:151: error: expected unqualified-id before '<' token
         <td id="LC15" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>Peiltabelle.h<span class="pl-pds">&quot;</span></span></td>
                                                                                                                                                       ^
/tmp/arduino_build_883/sketch/Leveljet.h:694:198: error: expected unqualified-id before '<' token
         <td id="LC15" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>Peiltabelle.h<span class="pl-pds">&quot;</span></span></td>
                                                                                                                                                                                                      ^
/tmp/arduino_build_883/sketch/Leveljet.h:703:315: error: expected unqualified-id before '<' token
         <td id="LC17" class="blob-code blob-code-inner js-file-line"><span class="pl-k">const</span> <span class="pl-c1">uint16_t</span> cLAST_TABLE_INDEX = (<span class="pl-k">sizeof</span>(PEILTABELLE) / <span class="pl-k">sizeof</span>(PEILTABELLE[<span class="pl-c1">0</span>])) - <span class="pl-c1">1</span>;</td>
                                                                                                                                                                                                                                                                                                                           ^
/tmp/arduino_build_883/sketch/Leveljet.h:707:187: error: expected unqualified-id before '<' token
         <td id="LC18" class="blob-code blob-code-inner js-file-line"><span class="pl-k">const</span> <span class="pl-c1">uint16_t</span> cTANK_ANZAHL      = <span class="pl-c1">4</span>;</td>

Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

jp112sdl
Beiträge: 12108
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 848 Mal
Danksagung erhalten: 2148 Mal
Kontaktdaten:

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von jp112sdl » 05.03.2019, 20:12

Hi.

Du hast HTML Code in deinen Sketch eingefügt.

Es darf nur der reine Quelltext verwendet werden.

VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 05.03.2019, 20:23

An welcher Stelle denn? Eigentlich habe ich den Sketch nur per copy/paste in die Arduino IDE kopiert.

Könntest Du mal testen, ob Du ihn kompilieren kannst?


Code: Alles auswählen

//---------------------------------------------------------
// HB-SEN-LevelJet
// 2018-12-19 Tom Major (Creative Commons)
// https://creativecommons.org/licenses/by-nc-sa/3.0/
// You are free to Share & Adapt under the following terms:
// Give Credit, NonCommercial, ShareAlike
// +++
// AskSin++ 2016-10-31 papa Creative Commons
// HB-UNI-Sen-LEV-US 2018-04-16 jp112sdl Creative Commons
//---------------------------------------------------------

//---------------------------------------------------------
// !! NDEBUG beim LevelJet Sketch unbedingt ausgeschaltet lassen
// Serial Port Init (DINIT) via AskSinPP/Debug.h wird 2fach benutzt: Tx AskSinPP Debug out, Rx LevelJet (19200 Baud erforderlich)
//#define NDEBUG

//---------------------------------------------------------
// define this to read the device id, serial and device type from bootloader section
// #define USE_OTA_BOOTLOADER

#define EI_NOTEXTERNAL
#include <EnableInterrupt.h>
#include <AskSinPP.h>
#include <LowPower.h>
#include <MultiChannelDevice.h>
#include <Register.h>
#include "src/Leveljet.h"

//---------------------------------------------------------
// Pin definitions
#define CONFIG_BUTTON_PIN 8
#define LED_PIN 4

// number of available peers per channel
#define PEERS_PER_CHANNEL 6

// all library classes are placed in the namespace 'as'
using namespace as;

LEVELJET leveljet;

// define all device properties
// Bei mehreren Geräten des gleichen Typs muss Device ID und Device Serial unterschiedlich sein!
const struct DeviceInfo PROGMEM devinfo = {
    { 0xA5, 0xA6, 0x00 },    // Device ID
    "LEVELJET01",            // Device Serial
    { 0xF1, 0x04 },          // Device Model
    // Firmware Version
    // die CCU Addon xml Datei ist mit der Zeile <parameter index="9.0" size="1.0" cond_op="E" const_value="0x10" />
    // fest an diese Firmware Version gebunden! cond_op: E Equal, GE Greater or Equal
    // bei Änderungen von Payload, message layout, Datenpunkt-Typen usw. muss die Version an beiden Stellen hochgezogen werden!
    0x10,
    0x53,             // Device Type
    { 0x01, 0x01 }    // Info Bytes
};

// Configure the used hardware
typedef AvrSPI<10, 11, 12, 13>                SPIType;
typedef Radio<SPIType, 2>                     RadioType;
typedef StatusLed<LED_PIN>                    LedType;
typedef AskSin<LedType, NoBattery, RadioType> Hal;
Hal                                           hal;

// die "freien" Register 0x20/21 werden hier als 16bit memory für das Update
// Intervall in Sek. benutzt siehe auch hb-sen-leveljet.xml, <parameter id="Sendeintervall">
DEFREGISTER(Reg0, MASTERID_REGS, DREG_TRANSMITTRYMAX, 0x20, 0x21)
class SensorList0 : public RegList0<Reg0> {
public:
    SensorList0(uint16_t addr)
        : RegList0<Reg0>(addr)
    {
    }

    bool updIntervall(uint16_t value) const
    {
        return this->writeRegister(0x20, (value >> 8) & 0xff) && this->writeRegister(0x21, value & 0xff);
    }
    uint16_t updIntervall() const { return (this->readRegister(0x20, 0) << 8) + this->readRegister(0x21, 0); }

    void defaults()
    {
        clear();
        transmitDevTryMax(6);
        updIntervall(21600);    // 6h
    }
};

class MeasureEventMsg : public Message {
public:
    void init(uint8_t msgcnt, uint8_t percent, uint16_t levelMM, uint16_t volumeLiter)
    {
        // als Standard wird BCAST gesendet um Energie zu sparen, siehe Beschreibung HB-UNI-Sensor1.
        // Bei jeder 10. Nachricht senden wir stattdessen BIDI|WKMEUP, um eventuell anstehende Konfigurationsänderungen auch
        // ohne Betätigung des Anlerntaster übernehmen zu können (mit Verzögerung, worst-case 10x Sendeintervall).
        uint8_t flags = BCAST;
        if ((msgcnt % 10) == 2) {
            flags = BIDI | WKMEUP;
        }
        Message::init(15, msgcnt, 0x53, flags, percent, 0);
        pload[0] = volumeLiter >> 8;
        pload[1] = volumeLiter & 0xff;
        pload[2] = levelMM >> 8;
        pload[3] = levelMM & 0xff;
    }
};

class MeasureChannel : public Channel<Hal, List1, EmptyList, List4, PEERS_PER_CHANNEL, SensorList0>, public Alarm {
    MeasureEventMsg msg;
    uint8_t         percent;
    uint16_t        levelMM;
    uint16_t        volumeLiter;

public:
    MeasureChannel()
        : Channel()
        , Alarm(seconds2ticks(60))
        , percent(0)
        , levelMM(0)
        , volumeLiter(0)
    {
    }
    virtual ~MeasureChannel() {}

    virtual void trigger(AlarmClock& clock)
    {
        uint8_t msgcnt = device().nextcount();
        measure();
        msg.init(msgcnt, percent, levelMM, volumeLiter);
        device().sendPeerEvent(msg, *this);
        // reactivate for next measure
        uint16_t updCycle = this->device().getList0().updIntervall();
        set(seconds2ticks(updCycle));
        clock.add(*this);
    }

    void measure()
    {
        percent     = leveljet.percent();
        levelMM     = leveljet.level();
        volumeLiter = leveljet.volume();
    }

    void setupSensor()
    {
        leveljet.init();
        DPRINTLN("Sensor setup done");
    }

    void setup(Device<Hal, SensorList0>* dev, uint8_t number, uint16_t addr)
    {
        Channel::setup(dev, number, addr);
        setupSensor();
        set(seconds2ticks(20));    // first message in 20 sec.
        sysclock.add(*this);
    }

    void configChanged()
    {
        // DPRINTLN("Config changed: List1");
    }

    uint8_t status() const { return 0; }

    uint8_t flags() const { return 0; }
};

class SensChannelDevice : public MultiChannelDevice<Hal, MeasureChannel, 1, SensorList0> {
public:
    typedef MultiChannelDevice<Hal, MeasureChannel, 1, SensorList0> TSDevice;
    SensChannelDevice(const DeviceInfo& info, uint16_t addr)
        : TSDevice(info, addr)
    {
    }
    virtual ~SensChannelDevice() {}

    virtual void configChanged()
    {
        TSDevice::configChanged();
        DPRINTLN("Config Changed: List0");

        uint8_t txDevTryMax = this->getList0().transmitDevTryMax();
        DPRINT("transmitDevTryMax: ");
        DDECLN(txDevTryMax);

        uint16_t updCycle = this->getList0().updIntervall();
        DPRINT("updCycle: ");
        DDECLN(updCycle);
    }
};

SensChannelDevice               sdev(devinfo, 0x20);
ConfigButton<SensChannelDevice> cfgBtn(sdev);

void setup()
{
    // !! Serial Port Init (DINIT) via AskSinPP/Debug.h wird 2fach benutzt: Tx AskSinPP Debug out, Rx LevelJet (19200 Baud erforderlich)
    DINIT(19200, ASKSIN_PLUS_PLUS_IDENTIFIER);
    sdev.init(hal);
    buttonISR(cfgBtn, CONFIG_BUTTON_PIN);
    sdev.initDone();
}

void loop()
{
    bool worked = hal.runready();
    bool poll   = sdev.pollRadio();
    if (worked == false && poll == false) {
        // Device ist Netzteil betrieben und sollte wach bleiben um die seriellen Telegramme vom Leveljet zu empfangen
        // if nothing to do - go sleep
        // hal.activity.savePower<Sleep<>>(hal);
        leveljet.loop();
        delay(1);
    }
}
Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

jp112sdl
Beiträge: 12108
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 848 Mal
Danksagung erhalten: 2148 Mal
Kontaktdaten:

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von jp112sdl » 05.03.2019, 20:45

Gelegenheitsbastler hat geschrieben:
05.03.2019, 20:23
An welcher Stelle denn?
:arrow:
Gelegenheitsbastler hat geschrieben:
05.03.2019, 20:23
Leveljet.h:243:5: error: missing terminating ' character
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="123202370" data-scoped-search-url="/TomMajor/AskSinPP_Examples/search" data-unscoped-search-url="/search" action="/TomMajor/AskSinPP_Examples/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
^
Ich kopiere nichts, sondern lade Github Repos grundsätzlich entweder als ZIP oder via 'git clone' herunter.

Ja, ich kann es auf Anhieb kompilieren...

Code: Alles auswählen

In file included from ~/Documents/Git/TomMajor/AskSinPP_Examples/HB-SEN-LJet/HB-SEN-LJet.ino:23:0:
~/Documents/Arduino/libraries/EnableInterrupt/EnableInterrupt.h:22:125: note: #pragma message: NOTICE: *** EnableInterrupt library version pre-0.9.6. This is not a problem. Keep calm, and carry on. ***
 #pragma message("NOTICE: *** EnableInterrupt library version pre-0.9.6. This is not a problem. Keep calm, and carry on. ***")
                                                                                                                             ^
Der Sketch verwendet 20990 Bytes (65%) des Programmspeicherplatzes. Das Maximum sind 32256 Bytes.
Globale Variablen verwenden 964 Bytes (47%) des dynamischen Speichers, 1084 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.

VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 05.03.2019, 20:59

Nun habe ich das ZIP herunter geladen und entpackt. Wenn ich nun über die Arduino IDE die HB-SEN-LJet.ino öffne und kompiliere, klappt es. Merkwürdig. Trotzdem vielen Dank für den Tipp!
Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

TomMajor
Beiträge: 1793
Registriert: 30.08.2017, 23:25
Hat sich bedankt: 175 Mal
Danksagung erhalten: 399 Mal
Kontaktdaten:

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von TomMajor » 05.03.2019, 23:25

Gelegenheitsbastler hat geschrieben:
05.03.2019, 20:59
Nun habe ich das ZIP herunter geladen und entpackt. Wenn ich nun über die Arduino IDE die HB-SEN-LJet.ino öffne und kompiliere, klappt es. Merkwürdig. Trotzdem vielen Dank für den Tipp!
Nicht Merkwürdig sondern völlig normal, wenn du den sketch im browser anzeigst und sicherst wird natürlich der html code von github mit gesichert. Es gibt rechts einen Button 'Raw', wenn du den drückst und dann sicherst hast du eine kompilierfähige Datei.
Oder wie Jerome schreibt, download zip oder git clone.
Viele Grüße,
Tom

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 06.03.2019, 06:08

Merkwürdig deshalb, weil ich es im Grunde so gemacht habe, wie ich es immer mache. Diesmal hat es aber nicht geklappt.
Wie auch immer, jetzt funktioniert es ja. Trotzdem danke für den Hinweis auf den RAW-Button. Ist sicherlich in Zukunft hilfreich.
Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

Benutzeravatar
Gelegenheitsbastler
Beiträge: 586
Registriert: 15.10.2017, 07:29
Hat sich bedankt: 14 Mal
Danksagung erhalten: 41 Mal

Re: Komfort Füllstandmessung mit Hydrostatik Sensor, OLED Display und HomeMatic Anbindung

Beitrag von Gelegenheitsbastler » 06.03.2019, 08:12

Noch eine Frage zur Pinbelegung, weil für mich nicht ganz klar ist, ob die Abbildung die Buchse oder den Stecker zeigt.
https://github.com/TomMajor/AskSinPP_Ex ... N-LJet.png

Ist das linke rote Kabel auf dem Foto Pin1 oder Pin6?

Ich würde es ja selber ausmessen, habe aber keinen LevelJet hier.
RJ12 oben.jpg
RJ12 vorne.jpg
Das Komplizierteste an der Hausautomatisation ist der WAF.™ ​

Übersicht meiner Projekte


RaspberryMatic 3.47.22.20191026 auf Raspberry Pi 3B mit HomeMatic Funkmodul von ELV und RTC

Etliche selbst gebaute Aktoren und Sender

Antworten

Zurück zu „Hardwareentwicklung und Selbstbau von Aktoren und Sensoren“