Announcement

Collapse
No announcement yet.

1-wire dual counter Lightning to mcsMQTT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    1-wire dual counter Lightning to mcsMQTT

    @Michael,


    Here a while ago moved the old Hobby boards lightning sensor to the attic versus the roof and it is working fine.


    Both counters are seen in OWFS fine.


    [ATTACH]68127[/ATTACH]


    Way back I was using mcsTemperature and xAP to do an hourly rate and a zero set at midnight on the counters.


    Asking your suggestion to replicate same said stuff with mcsMQTT?


    That and want to let Node Red do some of the work for the two variables.

    This morning added a counter to the Node Red an playing a bit with a pulse counter.




    On another note here also using the AS3935 Lightning sensor to get lightning strikes / distance currently just displaying stuff in a web page. It is just a python script and want to install Mosquitto on the RPi for use with Pythong script to output these variables. (after doing the HB stuff).

    AS3935 Lightning Detection Monitor Script - v0.1
    Monitor Status: ONLINE

    Disturber detected - masking
    1 2017-07-02 23:16:00.074464 1 1 0

    Overhead lightning detected - distance = 1 km at 18:16:00.067 2017-07-02
    1 2017-07-02 23:16:01.165121 1 1 0

    Overhead lightning detected - distance = 1 km at 18:16:01.158 2017-07-02
    1 2017-07-02 23:16:03.188902 1 1 0

    Overhead lightning detected - distance = 1 km at 18:16:03.178 2017-07-02

    [ATTACH]68128[/ATTACH]
    Last edited by Pete; April 12, 2018, 08:09 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    #2
    I agree with you that the functionality for a daily reset should exists before messages are published which in your case appears to be Node-Red. I have not used Node-Red to provide specific example, but clock and logic functions should exist.

    For my Sonoff/Tasmota counters for rainfall the daily reset is done in the Sonoff. The reset function is something I brought out to the browser config page. For my irrigation water counter I do not reset the counts daily.

    Comment


      #3
      HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
      2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

      Comment


        #4
        I think it is a mixed bag between closed and open product offerings. Companies that want recurring revenue from the cloud and want to tie their products together into their own ecosystem will continue to operate that way. It is no different now than it has been in the past.

        Sonoff seems to have made it easy with schematics and board layouts that give hackers easy access. The impression I have with Sonoff is that they welcome the community that leverages their products. They do not have a cloud revenue model. They just have a hardware one.

        Expressif is more helpful to user community now than they were originally and much of the IOT is based on their micro-controllers. There is much available that is at the board level with explicit intention of being customized by the user. NodeMCU, Wemos and the entire Arduino family fit into this category. I do not see these going away or becoming closed.

        Comment


          #5
          Thank you Michael.

          Thinking the old Temp08 Hobby Boards dual counter configuration did allow a reset.

          Fast forward to mcsTemperature / xAP lightning counter stuff did reset my lightning counts in software.

          Noticed with OWFS that I cannot reset the counts. They do reset if I power off the dual counter.

          I have found pulse scripts for Node Red relating to water and energy but nothing yet relating to the old hobby boards dual counter.

          I know you are not looking yet at node red.

          That said this is the counter / reset that I am using or playing with at this time: (energy). The counter counts number of messages plus data in messages.
          Such that one counter can just count number of strikes per day starting at a zero count and the other counter can do a strikes per hour rate.
          With Node Red I can add a debug / message node relating to each number conversion.

          var lastDt = context.get("lastDt");
          var nextDt = new Date(msg.payload);
          context.set("lastDt", nextDt);

          var lastWh = context.get("lastWh");
          var nextWh = +msg.count;
          context.set("lastWh", nextWh);

          if (lastDt && lastWh) {
          var diffHr = (nextDt - lastDt) / 1000 / 60 / 60;
          var diffWh = nextWh - lastWh;
          msg.payload = diffWh / diffHr;
          }
          else {
          msg = null;
          }
          return msg;

          [ATTACH]68161[/ATTACH]
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment

          Working...
          X