Giter Site home page Giter Site logo

Comments (5)

bertmelis avatar bertmelis commented on May 28, 2024

It it possible to share the whole code (remove credentials)?

from vitowifi.

GnomiBerlin avatar GnomiBerlin commented on May 28, 2024

temporary dropbox exchange deleted again

from vitowifi.

GnomiBerlin avatar GnomiBerlin commented on May 28, 2024

I found a way for my problem.

I used the group identifier for "synchronize" and "on_request" datapoints.
e.g.:

DPTemp getTempA("gettempa", "synchronize", 0x0800);               //Aussentemperatur
DPStat getAlarmStatus("getalarmstatus", "synchronize", 0x0847);   //Sammelstoerung Ja/Nein  0x0A82 0x7579
DP8Timer getAnlagenzeit("getanlagenzeit", "synchronize", 0x088E);   //Anlagenzeit  DPHours 0x088E DPCount
DP8Timer getTimerZirkuSa("gettimerzirkusa", "on_request", 0x2228);   //Zirkulationspumpe Zeiten Samstag
DP8Timer setTimerZirkuSa("settimerzirkusa", "on_request", 0x2228);   //Zirkulationspumpe Zeiten Samstag
...

in the loop part I changed VitoWiFi.readAll() --> VitoWiFi.readGroup("synchronize") for all on minute received values:

void loop() {
  if (!bStopVito) {
    VitoWiFi.loop();
    if (updateVitoWiFi && mqttClient.connected()) {
      updateVitoWiFi = false;
      VitoWiFi.readGroup("synchronize");   //VitoWiFi.readAll();
    }
  }
...

for all "on_request" datapoints I added MQTT subscriptions and its handling:

if (strcmp(topic, "VITOWIFI/settimerzirkusa") == 0) {
    uint64_t setTimer = strtoull(payload, NULL, 16);
    DPValue value(setTimer);
    VitoWiFi.writeDatapoint(setTimerZirkuSa, value);   // 06000730160018300000000000000000 = FFFFFFFF93803B30
    VitoWiFi.readDatapoint(getTimerZirkuSa);
  }
  if (strcmp(topic, "VITOWIFI/retrievetimerzirkusa") == 0) {
    uint64_t setTimer = strtoull(payload, NULL, 16);
    DPValue value(setTimer);
    VitoWiFi.readDatapoint(getTimerZirkuSa);
  }

I hope this is clearly described.

Is the idea o.k. or any other ideas? If yes I can close the issue.

from vitowifi.

bertmelis avatar bertmelis commented on May 28, 2024

I don't think there is anything wrong with this way of work.

from vitowifi.

GnomiBerlin avatar GnomiBerlin commented on May 28, 2024

With workaround solved

from vitowifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.