Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. fredswed
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    fredswed

    @fredswed

    12
    Reputation
    26
    Posts
    648
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    fredswed Follow

    Best posts made by fredswed

    • RE: What did you build today (Pictures) ?

      Great fun to see all these build pictures!

      My pic of the day is a trivial battery powered DHT22 sensor just to try things out with prototyping, programming and connecting to OpenHAB. This is my first project since highschool. (The gw and first sensor is on a breadboard.)

      It feels great to be soldering again after almost 30 years and I'm really looking forward to step into the MySensors world!

      0_1514584701721_DHTSensor01.jpg

      posted in General Discussion
      fredswed
      fredswed
    • RE: Which are trustworthy brands for a simple USB wall charger?

      I second the IKEA alternative for USB chargers. They are hard to beat as a huge company with focus both on cost and safety. And the lygte-info.dk is a great resource.

      Just remember that a USB charger is optimized to deliver 1-2 A for a couple of hours at a time. That is very different to providing 50 mA continously. I'm thinking of heat dissipation but also efficiency at low power. (So use the lygte-info.dk link to find a good one that performs well at the power you need.)

      posted in Hardware
      fredswed
      fredswed
    • RE: 💬 Easy/Newbie PCB for MySensors

      Hi,

      First of all: I really appreciate the simplicity and flexibility of this board!

      Now then, I have a problem with battery life which is only around 3 weeks for my DHT22 node and around 8 weeks for my BMP280 node. Both are 3.3V mini clones with NRF24 radios (probably clones) that run on 2xAAA batteries and a booster. I use NodeManager for software and report sensor values in 2 minute intervals. LED and voltage regulator has been desoldered from the Pro Mini.

      Why isn't battery life better - am I missing anything obvious?

      1. Can/should I remove C2 (10uF) and C3 (0.1uF) capacitors? I added them first but after checking the schematics I now think they are not used at all for the battery/booster setup?

      2. What battery life can I expect for a BMP280 on 2xAAA batteries and booster?

      3. New batteries report at 3.13V. When the nodes fail, reported battery voltage is around 2.6V. However, when measured I get it to around 1.6V (at no load). This could be a software problem but I include it as a clue. My setup in NodeManager is:

      battery.setBatteryPin(0);
      battery.setMinVoltage(1.8);
      battery.setMaxVoltage(3.1);
      

      0_1568660005477_EasyPCB-3.3V-BMP280.jpg

      posted in OpenHardware.io
      fredswed
      fredswed
    • RE: What did you build today (Pictures) ?

      You are of course both right! It was only intended to get things going so I didn’t want to complicate things. My “production” sensors will be quite different. Maybe I’ll save this one in a frame on the wall 😉

      posted in General Discussion
      fredswed
      fredswed
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @martim I'm running OpenHAB with a few MYS sensors (and other subsystems) and I really like the system system. It is complex with a steep learning curve but incredibly flexible and powerful.

      As for your problems with MYS/MQTT I have no solution but to use the direct connection over ethernet instead. I have tried switching to MQTT twice and failed miserably both times.

      The MYS addon requires the new MQTT binding which easily collides with the old one. (The new MQTT binding is almost ready for release so it may have been fixed, if you are lucky.)

      I don't know if the cause of this problem is with the OpenHAB MQTT bindings or with the MYS binding but it was not trivial to fix with the instructions available. As I could not really see any upside of using MQTT except to have an "all MQTT System" I went back to the ethernet connection which works fine.

      I would recommend connecting it as ethernet connection first and get it working that way. Then you can switch to MQTT if you want to. The biggets hurdles are installation of supportive packages (mqtt and serial transports) and getting MQTT to work in parallel with MQTT binding version 1. If you post your logs (WARN level for the Mys binding) I can try help you decode it.

      posted in OpenHAB
      fredswed
      fredswed
    • RE: 💬 OpenHAB

      Can you please add a link/button at the top of the page - Download and installation - that links to https://github.com/tobof/openhab2-addons/wiki
      It is a very useful page but also very hard to find.
      The two middle buttons should preferably be removed as the "Support Forum" button is sufficient.

      • "OpenHAB binding" links to instructions for OpenHAB v1.x which is obsolete
      • "OpenHAB 2 binding" links to instructions for an old version of the plugin
      posted in Announcements
      fredswed
      fredswed
    • RE: 💬 Water Meter Pulse Sensor

      @bjacobse I believe you can replace the meter yourself if you own it yourself and have the necessary skills. I live in such an area and was told I could mount it myself if I was confident enough. But of course, the fault will be yours if your bad job causes damages. In reality it is quite unlikely that you can mount it badly and not notice the problem immediately.

      A more critical issue is that water meters are usually owned by the municipality or water company and they are sealed. It is impossible to replace the meter without breaking the seal and when the company notices they won't be happy at all.

      posted in Announcements
      fredswed
      fredswed

    Latest posts made by fredswed

    • RE: 💬 Easy/Newbie PCB for MySensors

      Hi,

      First of all: I really appreciate the simplicity and flexibility of this board!

      Now then, I have a problem with battery life which is only around 3 weeks for my DHT22 node and around 8 weeks for my BMP280 node. Both are 3.3V mini clones with NRF24 radios (probably clones) that run on 2xAAA batteries and a booster. I use NodeManager for software and report sensor values in 2 minute intervals. LED and voltage regulator has been desoldered from the Pro Mini.

      Why isn't battery life better - am I missing anything obvious?

      1. Can/should I remove C2 (10uF) and C3 (0.1uF) capacitors? I added them first but after checking the schematics I now think they are not used at all for the battery/booster setup?

      2. What battery life can I expect for a BMP280 on 2xAAA batteries and booster?

      3. New batteries report at 3.13V. When the nodes fail, reported battery voltage is around 2.6V. However, when measured I get it to around 1.6V (at no load). This could be a software problem but I include it as a clue. My setup in NodeManager is:

      battery.setBatteryPin(0);
      battery.setMinVoltage(1.8);
      battery.setMaxVoltage(3.1);
      

      0_1568660005477_EasyPCB-3.3V-BMP280.jpg

      posted in OpenHardware.io
      fredswed
      fredswed
    • Why are my nodes either all Online or all Offline?

      As far as I can remember, my OpenHAB used to show the online status of each individual MySensor node when I first set it up about a year ago. Several upgrades (and a lot of tinkering) has passed and now I find that all nodes are set to Online status as soon as the gateway is connected to OpenHAB.

      Shouldn't the nodes go online/offline one by one depending on their individual status in the MySensors network?
      What am I missing here?

      I use OpenHAB is v 2.4.0 (release)
      The Gateway is a ESP8266 on ethernet on MySensors v 2.3.1 (all nodes are 2.3.1 as well).

      I've tried changing the network sanity check and heartbeat settings for the gateway with no success. This is what I have now:

      //mysensors.things
      
      Bridge mysensors:bridge-eth:MYS_gw1 "MySensors Ethernet Gateway" [ 
          ipAddress="192.168.1.6", 
          tcpPort=5003,
          sendDelay=200,
          // periodically ensure that gateway is up and running
          networkSanCheckEnabled=true,                
          // check the gateway every x minutes
          networkSanCheckInterval=1, 
          // send heartbeat request to nodes
          networkSanCheckSendHeartbeat=true,
          // disconnect nodes after x failed heartbeat requests
          networkSanCheckSendHeartbeatFailAttempts=2 
      ]
      {
      // Node 10 --- EasyPCB Testrigg --- DHT-22 med batteri*/
      Thing temperature MYS_Node10_Temp 	"MYS 10-1 Temp" @ "Lab" [ nodeId=10, childId=1 ]
      Thing humidity    MYS_Node10_Humid 	"MYS 10-2 Fukt" @ "Lab" [ nodeId=10, childId=2 ]
      Thing multimeter  MYS_Node10_Maint 	"MYS 10-201 Underhåll" @ "Lab" [ nodeId=10, childId=201 ]
      }
      // More sensors defined
      

      Below is the log from when I have switched off the gateway and waited until it's offline in OpenHAB.
      Why is the status set to "Online" for node 21 (t=22:43:38.494) and node 22 (t=22:43:38.495)

      // OpenHAB log - mysensors binding set to DEBUG level
      
      2019-04-24 22:43:37.301 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Connecting to IP bridge [192.168.1.6:5003]
      2019-04-24 22:43:38.400 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
      2019-04-24 22:43:38.420 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;14;Gateway startup complete.
      2019-04-24 22:43:38.424 [INFO ] [rs.internal.gateway.MySensorsGateway] - Node 0 available again!
      2019-04-24 22:43:38.428 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;0;0;18;2.3.1
      2019-04-24 22:43:38.431 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
      2019-04-24 22:43:38.434 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
      2019-04-24 22:43:38.437 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
      2019-04-24 22:43:38.440 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.3.1)
      2019-04-24 22:43:38.454 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:multimeter:MY
      S_gw1:MYS_Node10_Maint
      2019-04-24 22:43:38.460 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:temperature:M
      YS_gw1:MYS_Node12_Temp
      2019-04-24 22:43:38.465 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,21,22,10,11,12]
      2019-04-24 22:43:38.465 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:humidity:MYS_
      gw1:MYS_Node10_Humid
      2019-04-24 22:43:38.462 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:temperature:M
      YS_gw1:MYS_Node10_Temp
      2019-04-24 22:43:38.471 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
      2019-04-24 22:43:38.473 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-2 not registered yet, registering...
      2019-04-24 22:43:38.471 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-1 not registered yet, registering...
      2019-04-24 22:43:38.473 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-201 not registered yet, registering...
      2019-04-24 22:43:38.475 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:baro:MYS_gw1:
      MYS_Node12_Press
      2019-04-24 22:43:38.482 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-2 not registered yet, registering...
      2019-04-24 22:43:38.491 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-1 not registered yet, registering...
      2019-04-24 22:43:38.492 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:multimeter:MY
      S_gw1:MYS_Node12_Maint
      2019-04-24 22:43:38.494 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:waterMeter:MY
      S_gw1:MYS_Node21_Water1
      2019-04-24 22:43:38.484 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:baro:MYS_gw1:
      MYS_Node12_Baro
      2019-04-24 22:43:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-201 not registered yet, registering...
      2019-04-24 22:43:38.501 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 21-1 not registered yet, registering...
      2019-04-24 22:43:38.495 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:power:MYS_gw1
      :MYS_Node22_Energy1
      2019-04-24 22:43:38.506 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-3 not registered yet, registering...
      2019-04-24 22:43:38.517 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 22-1 not registered yet, registering...
      2019-04-24 22:44:07.274 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;32;500
      2019-04-24 22:44:38.444 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
      2019-04-24 22:44:38.548 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
      2019-04-24 22:44:41.444 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Network sanity check: PASSED
      2019-04-24 22:44:41.446 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Sending I_HEARTBEAT_REQUESTs
      2019-04-24 22:44:41.449 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;255;3;0;18;
      2019-04-24 22:44:41.517 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;22;68713
      2019-04-24 22:44:41.651 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 21;255;3;0;18;
      2019-04-24 22:44:41.855 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 22;255;3;0;18;
      2019-04-24 22:44:42.059 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 10;255;3;0;18;
      2019-04-24 22:44:42.263 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 11;255;3;0;18;
      2019-04-24 22:44:42.467 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 12;255;3;0;18;
      2019-04-24 22:45:31.012 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;255;3;0;33;110000
      2019-04-24 22:45:31.046 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;1;1;0;0;24.98
      2019-04-24 22:45:31.052 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
      2019-04-24 22:45:31.055 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 12
      2019-04-24 22:45:31.058 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 24.98
      2019-04-24 22:45:31.077 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/1 to 2019-04-24T22:45:31.000+0200
      2019-04-24 22:45:31.081 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;2;1;0;4;1017.18
      2019-04-24 22:45:31.093 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
      2019-04-24 22:45:31.099 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 12
      2019-04-24 22:45:31.105 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: pressure(V_PRESSURE) value to: 1017.18
      2019-04-24 22:45:31.114 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/2 to 2019-04-24T22:45:31.000+0200
      2019-04-24 22:45:31.118 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;3;1;0;5;stable
      2019-04-24 22:45:31.124 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
      2019-04-24 22:45:31.126 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 12
      2019-04-24 22:45:31.130 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: baro(V_FORECAST) value to: stable
      2019-04-24 22:45:31.138 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/3 to 2019-04-24T22:45:31.000+0200
      2019-04-24 22:45:31.151 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;255;3;0;32;500
      2019-04-24 22:45:44.451 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
      2019-04-24 22:45:44.482 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
      2019-04-24 22:45:47.451 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Network sanity check: PASSED
      2019-04-24 22:45:47.453 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Sending I_HEARTBEAT_REQUESTs
      2019-04-24 22:45:47.457 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;255;3;0;18;
      2019-04-24 22:45:47.487 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;22;134686
      2019-04-24 22:45:47.660 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 21;255;3;0;18;
      2019-04-24 22:45:47.865 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 22;255;3;0;18;
      2019-04-24 22:45:48.069 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 10;255;3;0;18;
      2019-04-24 22:45:48.272 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 11;255;3;0;18;
      2019-04-24 22:45:48.476 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 12;255;3;0;18;
      2019-04-24 22:45:54.001 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;33;110074
      2019-04-24 22:45:57.956 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;2;1;0;1;29.90
      2019-04-24 22:45:57.964 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 10 found in gateway
      2019-04-24 22:45:57.968 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 10
      2019-04-24 22:45:57.972 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: hum(V_HUM) value to: 29.90
      2019-04-24 22:45:57.985 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 10/2 to 2019-04-24T22:45:57.000+0200
      2019-04-24 22:45:57.989 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;32;500
      
      
      posted in OpenHAB
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      @gomba777 I have only tried the NodeManager version but am considering the old-style code until it works. I would expect any water meter sensor to at least report accumulated totals, similarly to the physical device. I am sure that can be implemented in NodeManager - it is perfectly possible to use extend the framwork oneself even if it is not in there by default. It is more a question that someone as to put the time into it.
      If the other code works for you, I guess the best choice is to hang on to it for a while longer.

      posted in NodeManager
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      @user2684 Thanks! Looking forward to a solution, one pulse at a time 🙂

      posted in NodeManager
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      I've digged a bit in the NodeManager code on my own and is far from certain, but isn't it a problem that reset() is called when the value has been reported by the child (line 199)

      If I get it correctly:
      When waterSensor calls setValue, it in turn calls setValueNumber which adds the pulse to _total. That's fine.
      But when sendValue is called at a later time, both _value and _total are reset to 0 as _value_processingis SUM.

      So the pulse count will restart from zero.
      Wouldn't we want to keep at least _total at its current value, to keep the accumulated number of pulses over time?

      posted in NodeManager
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      @user2684 Thanks! Using waterMeter.setReportIntervalSeconds(30); works and values are now reported every 30 seconds as expected.

      One problem still persists - the counter seem to be reset and there is always a zero value reported after the true value. E.g. after creating a few pulses, I get the log:

      27027 NM:LOOP:WATER(1):SET t=35 v=0.0190
      35086 NM:MSG:SEND(1) t=35 p=0.01
      35090 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0190
      35098 NM:MSG:SEND(1) t=35 p=0.00
      35104 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      65099 NM:MSG:SEND(1) t=35 p=0.00
      65103 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      65112 NM:MSG:SEND(1) t=35 p=0.00
      65118 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      
      posted in NodeManager
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      @user2684 Thanks!
      Finally had the time to try again. Unfortunately no success. Even worse - I can't find the problem 🙂 I'd really appreciate any advice on the code or how to troubleshoot.

      I changed the pulse pin to 3 and recompiled just before the run.

      After startup, pulses were simulated by quickly connecting pin 3 to ground starting at 141883
      I expected values to be sent every 30 seconds but none were sent.
      I did a C_REQ request at 1452361
      Automatic reports were sent from the node around 1 hour (3600000) and 2 hours (7200000), so the reporting interval seems to be at the default 1 hour, not 30 seconds as stated in the code. It's either strange or I have missed something basic...

      Code for the node below. Verbose debug log follows further down.

      /**************************
      *This DC-driven EasyPCB board reads pulses from a water meter and reports water consumption
      */
      
      /**********************************
      * MySensors node configuration
      */
      
      // General settings
      #define SKETCH_NAME "EasyPCB Water Meter #11"
      #define SKETCH_VERSION __DATE__ " - " __TIME__
      // Default baudrate 115200
      #define MY_BAUD_RATE 115200
      #define MY_DEBUG
      
      #define MY_NODE_ID 11
      
      // NRF24 radio settings
      #define MY_RADIO_RF24
      
      /***********************************
       * NodeManager configuration
       */
      
      #define NODEMANAGER_DEBUG ON       // Default ON
      #define NODEMANAGER_INTERRUPTS ON
      #define NODEMANAGER_SLEEP OFF       // Default ON
      #define NODEMANAGER_RECEIVE ON
      #define NODEMANAGER_DEBUG_VERBOSE ON
      #define NODEMANAGER_POWER_MANAGER OFF
      #define NODEMANAGER_CONDITIONAL_REPORT OFF
      #define NODEMANAGER_EEPROM OFF
      #define NODEMANAGER_TIME OFF
      #define NODEMANAGER_RTC OFF
      #define NODEMANAGER_SD OFF
      #define NODEMANAGER_HOOKING OFF
      #define NODEMANAGER_OTA_CONFIGURATION OFF
      #define NODEMANAGER_SERIAL_INPUT OFF
      
      // import NodeManager library (a nodeManager object will be then made available)
      #include <MySensors_NodeManager.h>
      
      /***********************************
       * Add your sensors
       */
      
      #include <sensors/SensorWaterMeter.h>
      SensorWaterMeter waterMeter(3);
      
      /***********************************
       * Main Sketch
       */
      
      // before
      void before() {
      	
        /***********************************
         * Configure your sensors
         */
      
        nodeManager.setReportIntervalSeconds(30)
      
        // call NodeManager before routine
        nodeManager.before();
      }
      
      // presentation
      void presentation() {
        // call NodeManager presentation routine
        nodeManager.presentation();
      }
      
      // setup
      void setup() {
        // call NodeManager setup routine
        nodeManager.setup();
      }
      
      // loop
      void loop() {
        // call NodeManager loop routine
        nodeManager.loop();
      }
      
      #if NODEMANAGER_RECEIVE == ON
      // receive
      void receive(const MyMessage &message) {
        // call NodeManager receive routine
        nodeManager.receive(message);
      }
      #endif
      
      #if NODEMANAGER_TIME == ON
      // receiveTime
      void receiveTime(unsigned long ts) {
        // call NodeManager receiveTime routine
        nodeManager.receiveTime(ts);
      }
      #endif
      

      Serial debug from node:

      0 NM:INIT:VER=1.8
      0 NM:INIT:INO=EasyPCB Water Meter #11 vJan 12 2019 - 20:36:35
      0 NM:INIT:LIB VER=2.3.1 CP=RNNNA---
      
       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.1
      
      16 MCO:BGN:INIT NODE,CP=RNNNA---,REL=255,VER=2.3.1
      26 MCO:BGN:BFR
      28 NM:INIT:RBT p=255
      30 NM:BFR:INIT
      32 TSM:INIT
      34 TSF:WUR:MS=0
      40 TSM:INIT:TSP OK
      43 TSM:INIT:STATID=11
      45 TSF:SID:OK,ID=11
      47 TSM:FPAR
      83 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      346 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      352 TSF:MSG:FPAR OK,ID=0,D=1
      2093 TSM:FPAR:OK
      2093 TSM:ID
      2095 TSM:ID:OK
      2097 TSM:UPL
      2101 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2203 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2209 TSF:MSG:PONG RECV,HP=1
      2213 TSM:UPL:OK
      2215 TSM:READY:ID=11,PAR=0,DIS=1
      2220 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2349 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2357 TSF:MSG:SEND,11-11-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.1
      2365 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2607 TSF:MSG:READ,0-0-11,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2613 NM:BFR:OK
      2617 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=23,sg=0,ft=0,st=OK:EasyPCB Water Meter #11
      2629 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=22,sg=0,ft=0,st=OK:Jan 12 2019 - 20:36:35
      2639 NM:PRES:WATER(1) p=21 t=35
      2643 TSF:MSG:SEND,11-11-0-0,s=1,c=0,t=21,pt=0,l=5,sg=0,ft=0,st=OK:WATER
      2652 MCO:REG:REQ
      2684 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2990 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2996 MCO:PIM:NODE REG=1
      2998 MCO:BGN:STP
      3000 NM:STP:ID=11 M=1
      3002 NM:LOOP:INT p=3 v=1
      3004 NM:BFR:INT p=3 m=2
      3080 NM:STP:HW V=3441 F=8 M=1360
      3082 MCO:BGN:INIT OK,TSP=1
      3086 NM:LOOP:WATER(1):SET t=35 v=0.0010
      3090 NM:MSG:SEND(1) t=35 p=0.00
      3096 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0010
      
      
      141883 NM:LOOP:INT p=3 v=0
      141883 NM:LOOP:INT p=3 v=0
      141883 NM:LOOP:INT p=3 v=0
      141883 NM:LOOP:INT p=3 v=0
      141885 NM:LOOP:INT p=3 v=0
      141885 NM:LOOP:INT p=3 v=0
      141885 NM:LOOP:WATER(1):SET t=35 v=0.0010
      141893 NM:LOOP:INT p=3 v=1
      141893 NM:LOOP:INT p=3 v=0
      141893 NM:LOOP:INT p=3 v=0
      141893 NM:LOOP:INT p=3 v=1
      141895 NM:LOOP:WATER(1):SET t=35 v=0.0020
      
      
      244365 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
      244371 TSF:MSG:BC
      245037 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0
      1452361 TSF:MSG:READ,0-0-11,s=1,c=2,t=35,pt=0,l=0,sg=0:
      1452367 NM:MSG:RECV(1) c=2 t=35 p=
      1452371 NM:MSG:SEND(1) t=35 p=0.00
      1452376 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0020
      1452386 NM:MSG:SEND(1) t=35 p=0.00
      1452390 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      
      3603003 NM:MSG:SEND(1) t=35 p=0.00
      3603007 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      5023537 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
      5023543 TSF:MSG:BC
      5024374 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0
      6218539 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
      6218545 TSF:MSG:BC
      6219368 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0
      7203016 NM:MSG:SEND(1) t=35 p=0.00
      7203020 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      
      posted in NodeManager
      fredswed
      fredswed
    • RE: Water pulse meter value not reported automatically

      @user2684 Many thanks - somtimes it is hard to see the obvious! Pin 2 is definitely connected to the radio which is more than likely a problem. Note to self: do not connect keyboard to ethernet port 🙂
      Have not had the time to fix it and check yet but will do asap.

      Btw, Is the reportInterval required, or will the sensor report on every pulse if an interval is not specified?

      posted in NodeManager
      fredswed
      fredswed
    • RE: 💬 Water Meter Pulse Sensor

      @bjacobse I believe you can replace the meter yourself if you own it yourself and have the necessary skills. I live in such an area and was told I could mount it myself if I was confident enough. But of course, the fault will be yours if your bad job causes damages. In reality it is quite unlikely that you can mount it badly and not notice the problem immediately.

      A more critical issue is that water meters are usually owned by the municipality or water company and they are sealed. It is impossible to replace the meter without breaking the seal and when the company notices they won't be happy at all.

      posted in Announcements
      fredswed
      fredswed
    • Water pulse meter value not reported automatically

      I've successfully used NodeManager to set up thermo-/hygrometers and the next step is to use it for my water and power meters. However, I'm running into problems.

      I have used the template sketch and changed/added very little code:

      #define NODEMANAGER_DEBUG OFF       // Default ON
      #define NODEMANAGER_SLEEP OFF       // Default ON
         /* snip */
      #include <sensors/SensorWaterMeter.h>
      SensorWaterMeter waterMeter(2);
      

      The problem is that V_VOLUME is only sent at startup. But not when pulses are counted and the value has changed.

      When I request the value manually with a C_REQ message the node reports it twice. First the correct count based on pulse counting and then immediately after 0.0000. (See end of debug log below.)
      So it seems the value is reset.

      This does not seem like the expected behaviour.
      Am I missing something in the configuration or what else could be the problem?

      For testing I tried adding a nodeManager.setReportIntervalSeconds(30); but with no success. The node clearly does not report every 30 seconds.

      The node is a 3.3V Pro mini (EasyPCB) and I'm using MySensors 2.3.1 and NodeManager 1.8.0 libraries on Platformio/VS Code. Gateway is ESP8266 with MySensors 2.2.
      I use MYSController as my testing controller and see the same behaviour in OpenHAB.

      The full debug from the node:

      16 MCO:BGN:INIT NODE,CP=RNNNA---,REL=255,VER=2.3.1
      26 MCO:BGN:BFR
      28 TSM:INIT
      30 TSF:WUR:MS=0
      36 TSM:INIT:TSP OK
      38 TSM:INIT:STATID=11
      40 TSF:SID:OK,ID=11
      43 TSM:FPAR
      79 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      718 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      724 TSF:MSG:FPAR OK,ID=0,D=1
      2091 TSM:FPAR:OK
      2091 TSM:ID
      2093 TSM:ID:OK
      2095 TSM:UPL
      2099 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2207 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2213 TSF:MSG:PONG RECV,HP=1
      2217 TSM:UPL:OK
      2220 TSM:READY:ID=11,PAR=0,DIS=1
      2224 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2359 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2367 TSF:MSG:SEND,11-11-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.1
      2377 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2689 TSF:MSG:READ,0-0-11,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2701 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=23,sg=0,ft=0,st=OK:EasyPCB Water Meter #11
      2713 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=22,sg=0,ft=0,st=OK:Jan  3 2019 - 21:07:14
      2725 TSF:MSG:SEND,11-11-0-0,s=1,c=0,t=21,pt=0,l=5,sg=0,ft=0,st=OK:WATER
      2734 MCO:REG:REQ
      2770 !TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=NACK:2
      4780 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2
      4853 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      4859 MCO:PIM:NODE REG=1
      4861 MCO:BGN:STP
      4864 MCO:BGN:INIT OK,TSP=1
      4868 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      
      255883 TSF:MSG:READ,0-0-11,s=1,c=2,t=35,pt=0,l=0,sg=0:
      255891 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0920
      255901 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      271042 TSF:MSG:READ,0-0-11,s=1,c=2,t=35,pt=0,l=0,sg=0:
      271050 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      271060 TSF:MSG:SEND,11-11-0-0,s=1,c=1,t=35,pt=7,l=5,sg=0,ft=0,st=OK:0.0000
      ```
      posted in NodeManager
      fredswed
      fredswed