Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Domoticz
  4. gw.request - how is it done?

gw.request - how is it done?

Scheduled Pinned Locked Moved Domoticz
15 Posts 4 Posters 6.0k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #6

    Ok, guess you have to ask someone over at Domoticz forum if it even supports REQ/VARx.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hyla
      wrote on last edited by
      #7

      Okay, will do.
      But apart from that: really nobody here with Domoticz who successfully worked with
      "request"? Can't believe that...

      Thanks,
      Christoph

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hyla
        wrote on last edited by
        #8

        Hi,

        this is my workaround for my problem:
        Ive added a 1F goldcap capacitor as an emergency power supply.
        If my powersupply voltage drops a routine is called which stores
        the current counter value via gw.setState() and then enters an
        endless loop. And an LED is switched on to empty the capacitor.
        Next time the sensor boots up, first thing it'll do is to retrieve the
        old value for the pulsecount from the EEPROM.

        With this I can use the setstate function in case it's necessary
        but I don't have to write to the EEPROM continuously which
        wouldn't work for long (100k write cycle limit).

        It's probably not failsafe. For example: what happens if there
        are multiple reboots because the brownout watchdog "barks"
        and the final power cut happens while the EEPROM is written to?

        But for now it seems to work. Dah!

        :)
        Christoph

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mediacj
          wrote on last edited by
          #9

          Interesting workaround!

          Could you please share your sketch?

          H 1 Reply Last reply
          0
          • sundberg84S Offline
            sundberg84S Offline
            sundberg84
            Hardware Contributor
            wrote on last edited by sundberg84
            #10

            I have made a sketch requesting VVAR1 from Domoticz. It didnt work with the stable version but better with the beta.
            But as i wrote in this post im still having issues with getting the request back: http://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller

            The sketch is in the link, but its a rain gauge.

            Controller: Proxmox VM - Home Assistant
            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

            H 1 Reply Last reply
            1
            • H Offline
              H Offline
              hyla
              wrote on last edited by
              #11

              @Mediacj sure. It's not cleaned up. And a hack of various sources.
              I guess You won't mind ;)
              EnergyMeterPulseSensorGrace.ino

              The fun stuff happens in the void graceful() routine.

              First of all You'll have to run this line once to set Your startup value:
              pulseCount = ((1912810 * PULSE_FACTOR / 10) + 5) / 10; graceful();

              After that You can comment this out and hopefully won't ever need it again :)
              With the next booting of the sensor the value will be read from the EEPROM:

              pulseCount = 0;
              pulseCount += gw.loadState(GRACE + 3); // get highest byte
              pulseCount *= 256;
              pulseCount += gw.loadState(GRACE + 2);
              pulseCount *= 256;
              (and so on).

              If the pre-voltage-regulator voltage drops the gold cap will still hold enough power
              to save the current value to the EEPROM.

              Still. I'd much prefer the software solution ...

              Christoph

              1 Reply Last reply
              0
              • sundberg84S sundberg84

                I have made a sketch requesting VVAR1 from Domoticz. It didnt work with the stable version but better with the beta.
                But as i wrote in this post im still having issues with getting the request back: http://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller

                The sketch is in the link, but its a rain gauge.

                H Offline
                H Offline
                hyla
                wrote on last edited by
                #12

                @sundberg84 I'll have a look at that.
                I've just tried the TimeAwareSensor example mentioned and it doesn't work.
                But I DO get some reads, as far as I could see I got them from those
                sensors that are repeater enabled.
                But NEVER anything from "GW". WHat's it's address anyway?

                Christoph

                1 Reply Last reply
                0
                • M Mediacj

                  Interesting workaround!

                  Could you please share your sketch?

                  H Offline
                  H Offline
                  hyla
                  wrote on last edited by
                  #13

                  @Mediacj

                  You guessed it:

                  pulseCount = ((1912810 * PULSE_FACTOR / 10) + 5) / 10; graceful();
                  You don't use the number 1912810 of course: that's just my kWh at the time I started, MULTIPLYED BY 100!

                  Christoph

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Mediacj
                    wrote on last edited by
                    #14

                    Thanks for sharing!!

                    Yes it would be better to have a stable software solution but your solution is good also and even safer when there is a power failure!

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mediacj
                      wrote on last edited by Mediacj
                      #15

                      Gizmocuz has a working sketch example

                      I have successfully used it.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      14

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular