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. Test your home made controller with MockMySensors (w/ tutorial)

Test your home made controller with MockMySensors (w/ tutorial)

Scheduled Pinned Locked Moved Controllers
39 Posts 12 Posters 25.4k Views 14 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.
  • A Offline
    A Offline
    akbooer
    wrote on last edited by
    #17

    Thanks so much.

    1 Reply Last reply
    0
    • ch3b7C Offline
      ch3b7C Offline
      ch3b7
      wrote on last edited by ch3b7
      #18

      all sensors present good but when finish i get a loop sended:

      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
      send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0

      im use (lib 1.5) MockMySensors.ino

      barduinoB 1 Reply Last reply
      0
      • ch3b7C ch3b7

        all sensors present good but when finish i get a loop sended:

        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
        send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0

        im use (lib 1.5) MockMySensors.ino

        barduinoB Offline
        barduinoB Offline
        barduino
        wrote on last edited by
        #19

        @ch3b7

        Very interesting.
        I was not able to repruduce what you are describing above.

        According to your message we have:

        • Node 50 sending to node 0

        • Child sensor id 0

        • Message type 1 : SET

        • MessageSub Type 16: V_TRIPPED

        • Payload type 7: P_CUSTOM

        • Payload length 5

        Which is very strange.
        In MockMySensors there is no childid=0, the first sensor is #define ID_S_DOOR 1 and the node ID is set to 254 (but perhpas you have changed this)
        Also V_TRIPPED should be sending a bolean value...

        Could you upload your scetch?

        here is my log: SetUP

        send: 254-254-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5
        send: 254-254-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
        read: 0-0-254 s=255,c=3,t=6,pt=0,l=1,sg=0:M
        sensor started, id=254, parent=0, distance=1
        GW Started
        Send Sketch Info: send: 254-254-0-0 s=255,c=3,t=11,pt=0,l=14,sg=0,st=ok:MockMySensors 
        send: 254-254-0-0 s=255,c=3,t=12,pt=0,l=4,sg=0,st=ok:v0.3
        MockMySensors v0.3
        Get Config: Metric
        Presenting Nodes
        ________________
          S_DOOR
        send: 254-254-0-0 s=1,c=0,t=0,pt=0,l=0,sg=0,st=ok:
          S_MOTION
        send: 254-254-0-0 s=2,c=0,t=1,pt=0,l=0,sg=0,st=ok:
          S_SMOKE
        send: 254-254-0-0 s=3,c=0,t=2,pt=0,l=0,sg=0,st=ok:
          S_LIGHT
        send: 254-254-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=ok:
          S_DIMMER
        send: 254-254-0-0 s=5,c=0,t=4,pt=0,l=0,sg=0,st=ok:
          S_COVER
        send: 254-254-0-0 s=6,c=0,t=5,pt=0,l=0,sg=0,st=ok:
          S_TMEP
        send: 254-254-0-0 s=7,c=0,t=6,pt=0,l=0,sg=0,st=ok:
          S_HUM
        send: 254-254-0-0 s=8,c=0,t=7,pt=0,l=0,sg=0,st=ok:
          S_BARO
        send: 254-254-0-0 s=9,c=0,t=8,pt=0,l=0,sg=0,st=ok:
          S_WIND
        send: 254-254-0-0 s=10,c=0,t=9,pt=0,l=0,sg=0,st=ok:
          S_RAIN
        send: 254-254-0-0 s=11,c=0,t=10,pt=0,l=0,sg=0,st=ok:
          S_UV
        send: 254-254-0-0 s=12,c=0,t=11,pt=0,l=0,sg=0,st=ok:
          S_WEIGHT
        send: 254-254-0-0 s=13,c=0,t=12,pt=0,l=0,sg=0,st=ok:
          S_POWER
        send: 254-254-0-0 s=14,c=0,t=13,pt=0,l=0,sg=0,st=ok:
          S_DISTANCE
        send: 254-254-0-0 s=16,c=0,t=15,pt=0,l=0,sg=0,st=ok:
          S_LIGHT_LEVEL
        send: 254-254-0-0 s=17,c=0,t=16,pt=0,l=0,sg=0,st=ok:
          S_LOCK
        send: 254-254-0-0 s=18,c=0,t=19,pt=0,l=0,sg=0,st=ok:
          S_IR
        send: 254-254-0-0 s=19,c=0,t=20,pt=0,l=0,sg=0,st=ok:
          S_WATER
        send: 254-254-0-0 s=20,c=0,t=21,pt=0,l=0,sg=0,st=ok:
          S_AIR_QUALITY
        send: 254-254-0-0 s=21,c=0,t=22,pt=0,l=0,sg=0,st=ok:
          S_SCENE_CONTROLLER
        send: 254-254-0-0 s=23,c=0,t=25,pt=0,l=0,sg=0,st=ok:
          S_CUSTOM
        send: 254-254-0-0 s=24,c=0,t=23,pt=0,l=0,sg=0,st=ok:
        ________________
        

        And the loop section

        ########################
        RandomNumber:76
        Send Battery Level
        send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:76
        Request Time
        send: 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,st=ok:
        read: 0-0-254 s=255,c=3,t=1,pt=0,l=10,sg=0:1439720967
        Time value received: 1439720967
        Motion is: Quiet
        send: 254-254-0-0 s=2,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
        Smoke is: Quiet
        send: 254-254-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
        Light is: On
        send: 254-254-0-0 s=4,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
        Dimmer is set to: 255
        send: 254-254-0-0 s=5,c=1,t=3,pt=2,l=2,sg=0,st=ok:255
        Cover is : Idle
        send: 254-254-0-0 s=6,c=1,t=31,pt=2,l=2,sg=0,st=ok:31
        Temperature is: 34
        send: 254-254-0-0 s=7,c=1,t=0,pt=4,l=4,sg=0,st=ok:34
        Humitidty is: 76
        send: 254-254-0-0 s=8,c=1,t=1,pt=4,l=4,sg=0,st=ok:76
        Atmosferic Pressure is: 103363
        send: 254-254-0-0 s=9,c=1,t=4,pt=4,l=4,sg=0,st=ok:103363
        Weather forecast: unstable
        send: 254-254-0-0 s=9,c=1,t=5,pt=0,l=8,sg=0,st=ok:unstable
        Wind Speed is: 76
        send: 254-254-0-0 s=10,c=1,t=8,pt=4,l=4,sg=0,st=ok:76
        Wind Gust is: 86
        send: 254-254-0-0 s=10,c=1,t=9,pt=4,l=4,sg=0,st=ok:86
        Wind Direction is: 272
        send: 254-254-0-0 s=10,c=1,t=10,pt=4,l=4,sg=0,st=ok:272
        Rain ammount  is: 76
        send: 254-254-0-0 s=11,c=1,t=6,pt=4,l=4,sg=0,st=ok:76
        Rain rate  is: 1
        send: 254-254-0-0 s=11,c=1,t=7,pt=7,l=5,sg=0,st=ok:1.0
        Ultra Violet level is: 11
        send: 254-254-0-0 s=12,c=1,t=11,pt=4,l=4,sg=0,st=ok:11
        Weight is: 113
        send: 254-254-0-0 s=13,c=1,t=12,pt=4,l=4,sg=0,st=ok:113
        Impedance is: 113
        send: 254-254-0-0 s=14,c=1,t=14,pt=4,l=4,sg=0,st=ok:113
        Watt is: 113
        send: 254-254-0-0 s=14,c=1,t=17,pt=4,l=4,sg=0,st=ok:113
        KWH is: 113
        send: 254-254-0-0 s=14,c=1,t=18,pt=4,l=4,sg=0,st=ok:113
        Voltage is: 113
        send: 254-254-0-0 s=14,c=1,t=38,pt=4,l=4,sg=0,st=ok:113
        Current is: 113
        send: 254-254-0-0 s=14,c=1,t=39,pt=4,l=4,sg=0,st=ok:113
        Distance is: 113
        send: 254-254-0-0 s=16,c=1,t=13,pt=4,l=4,sg=0,st=ok:113
        Light is: 113
        send: 254-254-0-0 s=17,c=1,t=23,pt=4,l=4,sg=0,st=ok:113
        Lock is: On
        send: 254-254-0-0 s=18,c=1,t=36,pt=2,l=2,sg=0,st=ok:1
        Infrared is: 255
        send: 254-254-0-0 s=19,c=1,t=32,pt=2,l=2,sg=0,st=ok:255
        Water flow is: 113
        send: 254-254-0-0 s=20,c=1,t=34,pt=4,l=4,sg=0,st=ok:113
        Water volume is: 113
        send: 254-254-0-0 s=20,c=1,t=35,pt=4,l=4,sg=0,st=ok:113
        Air Quality is: 76
        send: 254-254-0-0 s=21,c=1,t=24,pt=4,l=4,sg=0,st=ok:76
        Scene is: On
        send: 254-254-0-0 s=23,c=1,t=19,pt=2,l=2,sg=0,st=ok:1
        Custom value is: 76
        send: 254-254-0-0 s=24,c=1,t=25,pt=4,l=4,sg=0,st=ok:76
        send: 254-254-0-0 s=24,c=1,t=26,pt=4,l=4,sg=0,st=ok:76
        send: 254-254-0-0 s=24,c=1,t=27,pt=4,l=4,sg=0,st=ok:76
        send: 254-254-0-0 s=24,c=1,t=28,pt=4,l=4,sg=0,st=ok:76
        send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:76
        #########################
        
        ch3b7C 1 Reply Last reply
        0
        • barduinoB barduino

          @ch3b7

          Very interesting.
          I was not able to repruduce what you are describing above.

          According to your message we have:

          • Node 50 sending to node 0

          • Child sensor id 0

          • Message type 1 : SET

          • MessageSub Type 16: V_TRIPPED

          • Payload type 7: P_CUSTOM

          • Payload length 5

          Which is very strange.
          In MockMySensors there is no childid=0, the first sensor is #define ID_S_DOOR 1 and the node ID is set to 254 (but perhpas you have changed this)
          Also V_TRIPPED should be sending a bolean value...

          Could you upload your scetch?

          here is my log: SetUP

          send: 254-254-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5
          send: 254-254-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
          read: 0-0-254 s=255,c=3,t=6,pt=0,l=1,sg=0:M
          sensor started, id=254, parent=0, distance=1
          GW Started
          Send Sketch Info: send: 254-254-0-0 s=255,c=3,t=11,pt=0,l=14,sg=0,st=ok:MockMySensors 
          send: 254-254-0-0 s=255,c=3,t=12,pt=0,l=4,sg=0,st=ok:v0.3
          MockMySensors v0.3
          Get Config: Metric
          Presenting Nodes
          ________________
            S_DOOR
          send: 254-254-0-0 s=1,c=0,t=0,pt=0,l=0,sg=0,st=ok:
            S_MOTION
          send: 254-254-0-0 s=2,c=0,t=1,pt=0,l=0,sg=0,st=ok:
            S_SMOKE
          send: 254-254-0-0 s=3,c=0,t=2,pt=0,l=0,sg=0,st=ok:
            S_LIGHT
          send: 254-254-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=ok:
            S_DIMMER
          send: 254-254-0-0 s=5,c=0,t=4,pt=0,l=0,sg=0,st=ok:
            S_COVER
          send: 254-254-0-0 s=6,c=0,t=5,pt=0,l=0,sg=0,st=ok:
            S_TMEP
          send: 254-254-0-0 s=7,c=0,t=6,pt=0,l=0,sg=0,st=ok:
            S_HUM
          send: 254-254-0-0 s=8,c=0,t=7,pt=0,l=0,sg=0,st=ok:
            S_BARO
          send: 254-254-0-0 s=9,c=0,t=8,pt=0,l=0,sg=0,st=ok:
            S_WIND
          send: 254-254-0-0 s=10,c=0,t=9,pt=0,l=0,sg=0,st=ok:
            S_RAIN
          send: 254-254-0-0 s=11,c=0,t=10,pt=0,l=0,sg=0,st=ok:
            S_UV
          send: 254-254-0-0 s=12,c=0,t=11,pt=0,l=0,sg=0,st=ok:
            S_WEIGHT
          send: 254-254-0-0 s=13,c=0,t=12,pt=0,l=0,sg=0,st=ok:
            S_POWER
          send: 254-254-0-0 s=14,c=0,t=13,pt=0,l=0,sg=0,st=ok:
            S_DISTANCE
          send: 254-254-0-0 s=16,c=0,t=15,pt=0,l=0,sg=0,st=ok:
            S_LIGHT_LEVEL
          send: 254-254-0-0 s=17,c=0,t=16,pt=0,l=0,sg=0,st=ok:
            S_LOCK
          send: 254-254-0-0 s=18,c=0,t=19,pt=0,l=0,sg=0,st=ok:
            S_IR
          send: 254-254-0-0 s=19,c=0,t=20,pt=0,l=0,sg=0,st=ok:
            S_WATER
          send: 254-254-0-0 s=20,c=0,t=21,pt=0,l=0,sg=0,st=ok:
            S_AIR_QUALITY
          send: 254-254-0-0 s=21,c=0,t=22,pt=0,l=0,sg=0,st=ok:
            S_SCENE_CONTROLLER
          send: 254-254-0-0 s=23,c=0,t=25,pt=0,l=0,sg=0,st=ok:
            S_CUSTOM
          send: 254-254-0-0 s=24,c=0,t=23,pt=0,l=0,sg=0,st=ok:
          ________________
          

          And the loop section

          ########################
          RandomNumber:76
          Send Battery Level
          send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:76
          Request Time
          send: 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,st=ok:
          read: 0-0-254 s=255,c=3,t=1,pt=0,l=10,sg=0:1439720967
          Time value received: 1439720967
          Motion is: Quiet
          send: 254-254-0-0 s=2,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
          Smoke is: Quiet
          send: 254-254-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
          Light is: On
          send: 254-254-0-0 s=4,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
          Dimmer is set to: 255
          send: 254-254-0-0 s=5,c=1,t=3,pt=2,l=2,sg=0,st=ok:255
          Cover is : Idle
          send: 254-254-0-0 s=6,c=1,t=31,pt=2,l=2,sg=0,st=ok:31
          Temperature is: 34
          send: 254-254-0-0 s=7,c=1,t=0,pt=4,l=4,sg=0,st=ok:34
          Humitidty is: 76
          send: 254-254-0-0 s=8,c=1,t=1,pt=4,l=4,sg=0,st=ok:76
          Atmosferic Pressure is: 103363
          send: 254-254-0-0 s=9,c=1,t=4,pt=4,l=4,sg=0,st=ok:103363
          Weather forecast: unstable
          send: 254-254-0-0 s=9,c=1,t=5,pt=0,l=8,sg=0,st=ok:unstable
          Wind Speed is: 76
          send: 254-254-0-0 s=10,c=1,t=8,pt=4,l=4,sg=0,st=ok:76
          Wind Gust is: 86
          send: 254-254-0-0 s=10,c=1,t=9,pt=4,l=4,sg=0,st=ok:86
          Wind Direction is: 272
          send: 254-254-0-0 s=10,c=1,t=10,pt=4,l=4,sg=0,st=ok:272
          Rain ammount  is: 76
          send: 254-254-0-0 s=11,c=1,t=6,pt=4,l=4,sg=0,st=ok:76
          Rain rate  is: 1
          send: 254-254-0-0 s=11,c=1,t=7,pt=7,l=5,sg=0,st=ok:1.0
          Ultra Violet level is: 11
          send: 254-254-0-0 s=12,c=1,t=11,pt=4,l=4,sg=0,st=ok:11
          Weight is: 113
          send: 254-254-0-0 s=13,c=1,t=12,pt=4,l=4,sg=0,st=ok:113
          Impedance is: 113
          send: 254-254-0-0 s=14,c=1,t=14,pt=4,l=4,sg=0,st=ok:113
          Watt is: 113
          send: 254-254-0-0 s=14,c=1,t=17,pt=4,l=4,sg=0,st=ok:113
          KWH is: 113
          send: 254-254-0-0 s=14,c=1,t=18,pt=4,l=4,sg=0,st=ok:113
          Voltage is: 113
          send: 254-254-0-0 s=14,c=1,t=38,pt=4,l=4,sg=0,st=ok:113
          Current is: 113
          send: 254-254-0-0 s=14,c=1,t=39,pt=4,l=4,sg=0,st=ok:113
          Distance is: 113
          send: 254-254-0-0 s=16,c=1,t=13,pt=4,l=4,sg=0,st=ok:113
          Light is: 113
          send: 254-254-0-0 s=17,c=1,t=23,pt=4,l=4,sg=0,st=ok:113
          Lock is: On
          send: 254-254-0-0 s=18,c=1,t=36,pt=2,l=2,sg=0,st=ok:1
          Infrared is: 255
          send: 254-254-0-0 s=19,c=1,t=32,pt=2,l=2,sg=0,st=ok:255
          Water flow is: 113
          send: 254-254-0-0 s=20,c=1,t=34,pt=4,l=4,sg=0,st=ok:113
          Water volume is: 113
          send: 254-254-0-0 s=20,c=1,t=35,pt=4,l=4,sg=0,st=ok:113
          Air Quality is: 76
          send: 254-254-0-0 s=21,c=1,t=24,pt=4,l=4,sg=0,st=ok:76
          Scene is: On
          send: 254-254-0-0 s=23,c=1,t=19,pt=2,l=2,sg=0,st=ok:1
          Custom value is: 76
          send: 254-254-0-0 s=24,c=1,t=25,pt=4,l=4,sg=0,st=ok:76
          send: 254-254-0-0 s=24,c=1,t=26,pt=4,l=4,sg=0,st=ok:76
          send: 254-254-0-0 s=24,c=1,t=27,pt=4,l=4,sg=0,st=ok:76
          send: 254-254-0-0 s=24,c=1,t=28,pt=4,l=4,sg=0,st=ok:76
          send: 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:76
          #########################
          
          ch3b7C Offline
          ch3b7C Offline
          ch3b7
          wrote on last edited by
          #20

          @barduino

          sorry your sketch work good! the problem im have is with the @AWI example!

          @AWI

          all sensors present good but when finish i get a loop sended:

          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
          send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0

          AWIA 1 Reply Last reply
          0
          • ch3b7C ch3b7

            @barduino

            sorry your sketch work good! the problem im have is with the @AWI example!

            @AWI

            all sensors present good but when finish i get a loop sended:

            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0
            send: 50-50-0-0 s=0,c=1,t=16,pt=7,l=5,sg=0,st=ok:0.0

            AWIA Offline
            AWIA Offline
            AWI
            Hero Member
            wrote on last edited by
            #21

            @ch3b7 Sorry to have confused you but my sketch was meant for inspiration and as an alternative method to "stress test" the controller and network.
            The version I published is firing an enormous amount of messages at the controller for each sensor. The test data is in myTestData in the format {sensor, V_type, Dataformat, start_value, end_value, stepsize} You can fill the array with anything you want (also "not allowed" combinations).
            I suggest you remove the "ack" which is sent with each message at firtst {gw.send(Msg.set(i, false ))};

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rene_2k2
              wrote on last edited by
              #22

              @AWI, @ch3b7
              The loop may be caused by a bug in the source code :

               for (int i = 0; i < NoTests ; i++) { 
                  [...]
                      for (byte j = myTestData[i][3]; i < myTestData[i][4] ; j += myTestData[i][5])
                      {
                        gw.send(Msg.set(i, true ));
              

              Isn't there a mix between 'i' and 'j' ? Shouldn't it be

               for (int i = 0; i < NoTests ; i++) { 
                  [...]
                      for (byte j = myTestData[i][3]; j < myTestData[i][4] ; j += myTestData[i][5])
                      {
                        gw.send(Msg.set(j, true ));
              

              Sorry, cannot test it right now...

              AWIA 1 Reply Last reply
              0
              • R rene_2k2

                @AWI, @ch3b7
                The loop may be caused by a bug in the source code :

                 for (int i = 0; i < NoTests ; i++) { 
                    [...]
                        for (byte j = myTestData[i][3]; i < myTestData[i][4] ; j += myTestData[i][5])
                        {
                          gw.send(Msg.set(i, true ));
                

                Isn't there a mix between 'i' and 'j' ? Shouldn't it be

                 for (int i = 0; i < NoTests ; i++) { 
                    [...]
                        for (byte j = myTestData[i][3]; j < myTestData[i][4] ; j += myTestData[i][5])
                        {
                          gw.send(Msg.set(j, true ));
                

                Sorry, cannot test it right now...

                AWIA Offline
                AWIA Offline
                AWI
                Hero Member
                wrote on last edited by
                #23

                @rene_2k2 you're right, thanks

                1 Reply Last reply
                0
                • ch3b7C Offline
                  ch3b7C Offline
                  ch3b7
                  wrote on last edited by ch3b7
                  #24

                  @awi can you upload the fixed SKETCH ?? pls! thank you!!

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    akbooer
                    wrote on last edited by
                    #25

                    I'm most grateful for your work on this sketch - I've used it to exercise my gateway as I developed and debugged my Vera emulation environment called 'openLuup'. I now have a controller for MySensors running on Vera, BeagleBone Black, and an Arduino Yun, all running the ALTUI interface, so it looks like the attached.

                    Many thanks for the code and the initial explanations.

                    MySensors on openLuup.jpg

                    barduinoB rvendrameR 2 Replies Last reply
                    0
                    • A akbooer

                      I'm most grateful for your work on this sketch - I've used it to exercise my gateway as I developed and debugged my Vera emulation environment called 'openLuup'. I now have a controller for MySensors running on Vera, BeagleBone Black, and an Arduino Yun, all running the ALTUI interface, so it looks like the attached.

                      Many thanks for the code and the initial explanations.

                      MySensors on openLuup.jpg

                      barduinoB Offline
                      barduinoB Offline
                      barduino
                      wrote on last edited by
                      #26

                      @akbooer let me tell you...
                      It looks fanastic!

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        akbooer
                        wrote on last edited by
                        #27

                        Well, thank you. But I have to say that the L&F is all down to the amazing ALTUI plugin produced by @amg0 on the Vera BB. I just do the behind-the-scenes bits which make it work on platforms other than Vera.

                        1 Reply Last reply
                        0
                        • AWIA Offline
                          AWIA Offline
                          AWI
                          Hero Member
                          wrote on last edited by AWI
                          #28

                          A "new" version of a stress test or "Fake sensor". As mentioned in a previous post it will never be complete. But I gave it an update to make it easier to work with.

                          This version (MySensors 1.5) will take an array of test values ; present them to the gateway/controller and spit out a range of values for each sensor in the testArray.

                          Version below is fixed node 50, 9 sensors and sends data every 0.1 sec.

                          /*
                           PROJECT: MySensors
                           PROGRAMMER: AWI
                           DATE: 10 august 2015, update 4 september 2015
                           FILE: AWI_Universal_Test_50.ino
                           LICENSE: Public domain
                             -in conjunction with MySensors
                           
                           STATUS: never finished, MySensors 1.5
                           KNOWN ISSUES: no text message yet
                           
                           SUMMARY:
                          	multisensor for controller stress test
                          	1. Presents sensors to controller
                          	2. Sends (per sensor) values in defined range
                          	repeat
                          	
                           Setup: sends values for al sensor specified in setup array 
                            
                           Update: 20150904: Changed structure and type definitions (makes is easier to read)
                           */
                          #include <MySensor.h>  
                          #include <SPI.h>
                          
                          const int NODE_ID = 50;  		  		// fixed MySensors node ID
                          const bool testAck = false ;			// set to true if you want all tests to be acknowledged 
                          
                          // reference: typedef enum {P_STRING, P_BYTE, P_INT16, P_UINT16, P_LONG32, P_ULONG32, P_CUSTOM, P_FLOAT32 } mysensor_payload ; // MySensor types
                          
                          typedef	union {							// MySensor Payload types (only p_String used in this sketch)
                          	char p_String[10] ; 				// reduce characters to limit RAM size
                          	int16_t p_Int16 ;
                          	uint16_t p_Uint16 ;
                          	int32_t p_Int32 ;
                          	uint32_t p_Uint32 ;
                          	byte p_Byte ;
                          	float p_Float32 ;
                          	} payLoadType ;
                          
                          // data type for tests
                          typedef struct {
                          	int s_type ;						// S_ type of the sensor number (only for init)
                          	char s_name[10] ;					// sensor name (max 9 char) 						
                          	int v_type ;						// data V_ type to be sent
                          	mysensor_payload dataType ;			// data type identifier (uses MySensors MyTypes definition)
                          	payLoadType testStartValue ;		// start value for test
                          	payLoadType testEndValue ;			// end value for test
                          	float testIncrement;				// test increment (different behaviour for each datatype)
                          	} testDataType ;
                          
                          
                          // TESTDATA: testdata & initialization, change to adapt to your needs
                          const int noSensors = 9 ; 				// number of active sensors in node
                          const int noTests = noSensors ;			// noTests == noSensors for now
                          
                          // testData index determines child_no
                          testDataType testData[noSensors] = { 									// size determined by noSensors constant
                          	{S_MOISTURE, "Moist1" , V_LEVEL, P_BYTE, "40", "50", 1 },			// start & end values in text for convenience, are converted later
                          	{S_MOISTURE, "Moist2" , V_LEVEL, P_BYTE, "60", "70", 1 },
                          	{S_MOISTURE, "Moist3" , V_LEVEL, P_BYTE, "80", "90", 1 },
                          	{S_MULTIMETER, "Multi1", V_VOLTAGE, P_FLOAT32, "30.2", "50.0", 2},  // MULTIMETER
                          	{S_MULTIMETER, "Multi2", V_CURRENT, P_FLOAT32, "1.3", "5.6", 1},  
                          	{S_MULTIMETER, "Multi3", V_IMPEDANCE, P_FLOAT32, "300", "900", 50},  
                          	{S_TEMP, "Temp1", V_TEMP, P_FLOAT32, "1.1", "20.3", 2},				// Temperature
                          	{S_TEMP, "Temp2", V_TEMP, P_FLOAT32, "10.3", "50.6", 3}, 
                          	{S_TEMP, "Temp3", V_TEMP, P_FLOAT32, "300", "900", 50}
                          	};
                          // END TESTDATA
                          	
                          	
                          // initialize MySensors
                          MyTransportNRF24 transport(9, 10); // Ceech board, 3.3v (7,8)  (pin default 9,10)
                          MySensor gw(transport); 	      			
                          // Initialize messages (only generic message here)
                          MyMessage Msg;                    // instantiate message to fill "on the fly
                          
                          unsigned long SLEEP_PERIOD = 100 ;   // Period between individual tests in ms  
                          unsigned long loopDelay = 1000 ;      // Sleep period in ms)  
                          
                          void setup() {
                            Serial.println("\n  Stress test for Mysensors network (20150904).\n");
                            gw.begin(incomingMessage, NODE_ID); 								// start MySensors, fixed node ID
                            // Send the sketch version information to the gateway and Controller
                            gw.sendSketchInfo("AWI Universal test 50", "1.1");
                           
                            for (int i = 0; i < noSensors ; i++) {  							// Register al sensors (they will be created as child devices)
                              gw.present(i , testData[i].s_type, testData[i].s_name ); 		// present all sensors in list (sensor_no, sensor_type, sensor_name)
                              gw.wait(loopDelay);
                            }
                          }
                          
                          void loop()
                          {
                            gw.process();           											// check if message from controller
                            for (int i = 0; i < noTests ; i++) { 
                              Msg.setSensor(i);				    							// set the sensor number, byte 0
                              Msg.setType(testData[i].v_type);      							// set the sensor type, byte 1
                              switch (testData[i].dataType) {         						// data type determines test format
                                case P_BYTE:
                                  for (byte j = atoi(testData[i].testStartValue.p_String) ; j < atoi(testData[i].testEndValue.p_String) ; j += testData[i].testIncrement)
                                  {
                                    gw.send(Msg.set(j), testAck);
                                    gw.wait(SLEEP_PERIOD);
                                  }
                                break;
                                case P_INT16:
                                  for (int j = atoi(testData[i].testStartValue.p_String) ; j < atoi(testData[i].testEndValue.p_String) ; j += testData[i].testIncrement)
                                  {
                                    gw.send(Msg.set(j), testAck);
                                    gw.wait(SLEEP_PERIOD);
                                  }
                                  break;
                                case P_UINT16:
                                  for (unsigned int j = atoi(testData[i].testStartValue.p_String) ; j < atoi(testData[i].testEndValue.p_String) ; j += testData[i].testIncrement)
                                  {
                                    gw.send(Msg.set(j), testAck);
                                    gw.wait(SLEEP_PERIOD);
                                  }
                                break;
                                case P_ULONG32:
                                  for (unsigned long j = atol(testData[i].testStartValue.p_String) ; j < atol(testData[i].testEndValue.p_String) ; j += testData[i].testIncrement)
                                  {
                                    gw.send(Msg.set(j), testAck);
                                    gw.wait(SLEEP_PERIOD);
                                  }
                                break;
                                case P_FLOAT32:
                                  for (float j = atof(testData[i].testStartValue.p_String) ; j < atof(testData[i].testEndValue.p_String) ; j += testData[i].testIncrement)  
                                  {
                                    gw.send(Msg.set(j,3), testAck );
                                    gw.wait(SLEEP_PERIOD);
                                  }
                                break;
                                default: 
                                  // do nothing
                              gw.wait(loopDelay);
                              }
                            }
                          }
                          
                          void incomingMessage(const MyMessage &message) {
                           Serial.print("Incoming Message");
                               Serial.print("Incoming change for sensor:");
                               Serial.print(message.sensor);
                               Serial.print(" (type : ");
                               Serial.print(message.type);
                               Serial.print(")");
                               Serial.print(", status: ");
                               Serial.println(message.getInt());
                           //}
                          }
                          
                          
                          /*	IGNORE: For reference only
                          	S_DOOR, // Door sensor, V_TRIPPED, V_ARMED
                          	S_MOTION,  // Motion sensor, V_TRIPPED, V_ARMED 
                          	S_SMOKE,  // Smoke sensor, V_TRIPPED, V_ARMED
                          	S_BINARY, // Binary light or relay, V_STATUS (or V_LIGHT), V_WATT (same as S_LIGHT)
                          	S_DIMMER, // Dimmable light or fan device, V_STATUS (on/off), V_DIMMER (dimmer level 0-100), V_WATT
                          	S_COVER, // Blinds or window cover, V_UP, V_DOWN, V_STOP, V_DIMMER (open/close to a percentage)
                          	S_TEMP, // Temperature sensor, V_TEMP
                          	S_HUM, // Humidity sensor, V_HUM
                          	S_BARO, // Barometer sensor, V_PRESSURE, V_FORECAST
                          	S_WIND, // Wind sensor, V_WIND, V_GUST
                          	S_RAIN, // Rain sensor, V_RAIN, V_RAINRATE
                          	S_UV, // Uv sensor, V_UV
                          	S_WEIGHT, // Personal scale sensor, V_WEIGHT, V_IMPEDANCE
                          	S_POWER, // Power meter, V_WATT, V_KWH
                          	S_HEATER, // Header device, V_HVAC_SETPOINT_HEAT, V_HVAC_FLOW_STATE
                          	S_DISTANCE, // Distance sensor, V_DISTANCE
                          	S_LIGHT_LEVEL, // Light level sensor, V_LIGHT_LEVEL (uncalibrated in percentage),  V_LEVEL (light level in lux)
                          	S_ARDUINO_NODE, // Used (internally) for presenting a non-repeating Arduino node
                          	S_ARDUINO_REPEATER_NODE, // Used (internally) for presenting a repeating Arduino node 
                          	S_LOCK, // Lock device, V_LOCK_STATUS
                          	S_IR, // Ir device, V_IR_SEND, V_IR_RECEIVE
                          	S_WATER, // Water meter, V_FLOW, V_VOLUME
                          	S_AIR_QUALITY, // Air quality sensor, V_LEVEL
                          	S_CUSTOM, // Custom sensor 
                          	S_DUST, // Dust sensor, V_LEVEL
                          	S_SCENE_CONTROLLER, // Scene controller device, V_SCENE_ON, V_SCENE_OFF. 
                          	S_RGB_LIGHT, // RGB light. Send color component data using V_RGB. Also supports V_WATT 
                          	S_RGBW_LIGHT, // RGB light with an additional White component. Send data using V_RGBW. Also supports V_WATT
                          	S_COLOR_SENSOR,  // Color sensor, send color information using V_RGB
                          	S_HVAC, // Thermostat/HVAC device. V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COLD, V_HVAC_FLOW_STATE, V_HVAC_FLOW_MODE
                          	S_MULTIMETER, // Multimeter device, V_VOLTAGE, V_CURRENT, V_IMPEDANCE 
                          	S_SPRINKLER,  // Sprinkler, V_STATUS (turn on/off), V_TRIPPED (if fire detecting device)
                          	S_WATER_LEAK, // Water leak sensor, V_TRIPPED, V_ARMED
                          	S_SOUND, // Sound sensor, V_TRIPPED, V_ARMED, V_LEVEL (sound level in dB)
                          	S_VIBRATION, // Vibration sensor, V_TRIPPED, V_ARMED, V_LEVEL (vibration in Hz)
                          	S_MOISTURE, // Moisture sensor, V_TRIPPED, V_ARMED, V_LEVEL (water content or moisture in percentage?) 
                          };
                          
                          // sensor data types
                          // typedef enum {P_STRING, P_BYTE, P_INT16, P_UINT16, P_LONG32, P_ULONG32, P_CUSTOM, P_FLOAT32 } MyTypes ;
                          
                          sTypes[V_TEMP] =  P_FLOAT32; // S_TEMP
                          sTypes[V_HUM] =P_FLOAT32; // S_HUM
                          sTypes[V_STATUS] = P_UINT16; //  S_LIGHT, S_DIMMER, S_SPRINKLER, S_HVAC, S_HEATER. Used for setting binary (on/off) status. 1=on, 0=off  
                          sTypes[V_LIGHT] = P_UINT16; // Same as V_STATUS
                          sTypes[V_PERCENTAGE] = P_UINT16; // S_DIMMER. Used for sending a percentage value (0-100). 
                          sTypes[V_DIMMER] = P_UINT16; // S_DIMMER. Same as V_PERCENTAGE.  
                          sTypes[V_PRESSURE] = P_FLOAT32; // S_BARO
                          sTypes[V_FORECAST] = P_FLOAT32; // S_BARO
                          sTypes[V_RAIN] = P_FLOAT32; // S_RAIN
                          sTypes[V_RAINRATE] = P_FLOAT32;  // S_RAIN
                          sTypes[V_WIND] = P_FLOAT32; // S_WIND
                          sTypes[V_GUST] = P_FLOAT32; // S_WIND
                          sTypes[V_DIRECTION] = P_FLOAT32; // S_WIND 
                          sTypes[V_UV] = P_FLOAT32; // S_UV
                          sTypes[V_WEIGHT] = P_FLOAT32; // S_WEIGHT
                          sTypes[V_DISTANCE] = P_FLOAT32; // S_DISTANCE
                          sTypes[V_IMPEDANCE] = P_FLOAT32; // S_MULTIMETER, S_WEIGHT
                          sTypes[V_ARMED]= P_FLOAT32; // S_DOOR, S_MOTION, S_SMOKE, S_SPRINKLER
                          sTypes[V_TRIPPED]= P_FLOAT32; // S_DOOR, S_MOTION, S_SMOKE, S_SPRINKLER (for sprinklers with fire detection)
                          sTypes[V_WATT]= P_FLOAT32; // S_POWER, S_LIGHT, S_DIMMER
                          sTypes[V_KWH]= P_FLOAT32; // S_POWER
                          sTypes[V_SCENE_ON]= P_FLOAT32; // S_SCENE_CONTROLLER
                          sTypes[V_SCENE_OFF]= P_FLOAT32; // S_SCENE_CONTROLLER
                          sTypes[V_HEATER]= P_FLOAT32; // Deprecated. Use V_HVAC_FLOW_STATE instead.
                          sTypes[V_HVAC_FLOW_STATE] = P_UINT16; // HVAC flow state ("Off", "HeatOn", "CoolOn", or "AutoChangeOver"). S_HEATER, S_HVAC 
                          sTypes[V_HVAC_SPEED]= P_FLOAT32; // HVAC/Heater fan speed ("Min", "Normal", "Max", "Auto") 
                          sTypes[V_LIGHT_LEVEL]= P_UINT16; // Used for sending light level in uncalibrated percentage. See also V_LEVEL (light level in lux). S_LIGHT_LEVEL
                          sTypes[V_VAR1] = P_FLOAT32;
                          sTypes[V_VAR2] = P_FLOAT32;
                          sTypes[V_VAR3] = P_FLOAT32;
                          sTypes[V_VAR4] = P_FLOAT32;
                          sTypes[V_VAR5] = P_FLOAT32;
                          sTypes[V_UP] = P_FLOAT32; // S_COVER
                          sTypes[V_DOWN] = P_FLOAT32; // S_COVER
                          sTypes[V_STOP] = P_FLOAT32; // S_COVER
                          sTypes[V_IR_SEND] = P_FLOAT32; // S_IR
                          sTypes[V_IR_RECEIVE] = P_FLOAT32; // S_IR
                          sTypes[V_FLOW] = P_FLOAT32; // S_WATER
                          sTypes[V_VOLUME] = P_FLOAT32; // S_WATER
                          sTypes[V_LOCK_STATUS] = P_FLOAT32; // S_LOCK
                          sTypes[V_LEVEL] = P_UINT16; // S_DUST, S_AIR_QUALITY, S_SOUND (dB), S_VIBRATION (hz), S_LIGHT_LEVEL (lux)
                          sTypes[V_VOLTAGE] = P_FLOAT32; // S_MULTIMETER 
                          sTypes[V_CURRENT] = P_FLOAT32; // S_MULTIMETER
                          sTypes[V_RGB] = P_ULONG32; 	// S_RGB_LIGHT, S_COLOR_SENSOR. 
                          					// Used for sending color information for multi color LED lighting or color sensors. 
                          					// Sent as ASCII hex: RRGGBB (RR=red, GG=green, BB=blue component)
                          sTypes[V_RGBW] = P_ULONG32; // S_RGBW_LIGHT
                          					// Used for sending color information to multi color LED lighting. 
                          					// Sent as ASCII hex: RRGGBBWW (WW=while component)
                          sTypes[V_ID] = P_FLOAT32; // S_TEMP
                          					// Used for sending in sensors hardware ids (i.e. OneWire DS1820b). 
                          sTypes[V_UNIT_PREFIX] = P_STRING; // Allows sensors to send in a string representing the 
                          								 // unit prefix to be displayed in GUI, not parsed by controller! E.g. cm, m, km, inch.
                          								 // Can be used for S_DISTANCE or gas concentration (S_DUST, S_AIR_QUALITY)
                          sTypes[V_HVAC_SETPOINT_COOL] = P_UINT16; // HVAC cool setpoint (Integer between 0-100). S_HVAC
                          sTypes[V_HVAC_SETPOINT_HEAT] = P_UINT16; // HVAC/Heater setpoint (Integer between 0-100). S_HEATER, S_HVAC
                          sTypes[V_HVAC_FLOW_MODE] = P_UINT16; // Flow mode for HVAC ("Auto", "ContinuousOn", "PeriodicOn"). S_HVAC
                          */
                          
                          1 Reply Last reply
                          0
                          • A akbooer

                            I'm most grateful for your work on this sketch - I've used it to exercise my gateway as I developed and debugged my Vera emulation environment called 'openLuup'. I now have a controller for MySensors running on Vera, BeagleBone Black, and an Arduino Yun, all running the ALTUI interface, so it looks like the attached.

                            Many thanks for the code and the initial explanations.

                            MySensors on openLuup.jpg

                            rvendrameR Offline
                            rvendrameR Offline
                            rvendrame
                            Hero Member
                            wrote on last edited by
                            #29

                            @akbooer , just curious to know, what version of AltUI do you have? Did you adjust anything into the mySensors plugin json?

                            I'm asking that because, my plugin display a bit different:

                            Picture1.png

                            Home Assistant / Vera Plus UI7
                            ESP8266 GW + mySensors 2.3.2
                            Alexa / Google Home

                            A 1 Reply Last reply
                            0
                            • rvendrameR rvendrame

                              @akbooer , just curious to know, what version of AltUI do you have? Did you adjust anything into the mySensors plugin json?

                              I'm asking that because, my plugin display a bit different:

                              Picture1.png

                              A Offline
                              A Offline
                              akbooer
                              wrote on last edited by
                              #30

                              @rvendrame

                              Yes, I made a mod to the Arduino plugin. The changes are on GitHub:

                              https://github.com/akbooer/Vera/blob/features-for-altui/L_Arduino.lua

                              I'm hoping to get this merged with the master branch in due course, but I've not finished.

                              rvendrameR 1 Reply Last reply
                              1
                              • A akbooer

                                @rvendrame

                                Yes, I made a mod to the Arduino plugin. The changes are on GitHub:

                                https://github.com/akbooer/Vera/blob/features-for-altui/L_Arduino.lua

                                I'm hoping to get this merged with the master branch in due course, but I've not finished.

                                rvendrameR Offline
                                rvendrameR Offline
                                rvendrame
                                Hero Member
                                wrote on last edited by
                                #31

                                @akbooer , thanks a lot!

                                Home Assistant / Vera Plus UI7
                                ESP8266 GW + mySensors 2.3.2
                                Alexa / Google Home

                                1 Reply Last reply
                                0
                                • barduinoB Offline
                                  barduinoB Offline
                                  barduino
                                  wrote on last edited by barduino
                                  #32

                                  Hi Folks,

                                  @GizMoCuz just commited a new version of MockMySensors and I'm about to commit another (MockMySensors.ino) (need to merge with his changes).

                                  This will complete the 1.4 lib sensors and Giz has already started adding more.

                                  In the mean time here is a picture of MockMySensors running on the MYSController

                                  20150906_MYSController.png

                                  And here is how it look on the HAALL controller

                                  20150906_Dashboard.png

                                  If you have used this skecth in other controller would you mind posting screen shots of it here?

                                  Cheers

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    dakipro
                                    wrote on last edited by
                                    #33

                                    Hello, is it possible to MockMySensors without physical radio on the gateway?
                                    I ordered/received wrong radios and I am now waiting (most likely a month) for the new ones, but I would like to setup the controller without actual sensors. How can I mock them, or somehow simulate sensors without the radio?
                                    Thanks

                                    C: OpenHAB2 with node-red on linux laptop
                                    GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                                    GW: Arduino Mega, RFLink 433Mhz

                                    barduinoB 1 Reply Last reply
                                    0
                                    • tbowmoT Offline
                                      tbowmoT Offline
                                      tbowmo
                                      Admin
                                      wrote on last edited by
                                      #34

                                      @dakipro

                                      Depending on what you want to run your controller on, and your own experience level with hacking stuff, you can use node-red to simulate sensors, and inject fake sensors into the controller of your choice. (Not all controllers support this though)

                                      head over to http://forum.mysensors.org/topic/1965/nodered-injected-between-domoticz-and-mysensors for more info on setup..

                                      1 Reply Last reply
                                      0
                                      • D dakipro

                                        Hello, is it possible to MockMySensors without physical radio on the gateway?
                                        I ordered/received wrong radios and I am now waiting (most likely a month) for the new ones, but I would like to setup the controller without actual sensors. How can I mock them, or somehow simulate sensors without the radio?
                                        Thanks

                                        barduinoB Offline
                                        barduinoB Offline
                                        barduino
                                        wrote on last edited by
                                        #35

                                        @dakipro

                                        I use nodeJS to read from the serial gatweay and send the information to my my controller HAALL, similar to what @tbowmo is suggesting.

                                        Now depending on how your controller accepts information you might pull this off with some hacking. (In HAALL case it accepts via REST service). I've attached my nodeJS example for convenience.

                                        Cheers

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          dakipro
                                          wrote on last edited by
                                          #36

                                          Thank you. I installed MajorDoMo controller on a old laptop, just because it is written in php - which I do professionally so that I could optimize or debug it. And it looks decent too :)
                                          I just started with the MySensors and Arduino so I guess it will take me some time to get familiar with how everything works.

                                          My initial idea was to just use mockMySensors without radio and other sensors, but when I try initiate MySensors lib on the arduino I get "radio init fail" which is expected as I do not have the radio attached (it will arrive soon).
                                          I messed a bit inside MySensors library, trying to comment out the part that initializes the radio but then I get some other messages. I guess it is never needed in practice to turn off radio portion of MySensors.

                                          Maybe my question is more related to Network Stress test thread http://forum.mysensors.org/topic/2000/mysensors-network-stress-test on which I also get the same "radio init fail" message, as again radio is missing.

                                          If I find the time I will try to make some software emulation for sensors, based on your NodeJS example. That could be useful for prepping the Controller before even making new sensors, also for simulating scenarios and test how would controller react in certain situations (how different scenes work etc).

                                          C: OpenHAB2 with node-red on linux laptop
                                          GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                                          GW: Arduino Mega, RFLink 433Mhz

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


                                          18

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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