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. pimatic
  4. pimatic-mysensors controller plugin

pimatic-mysensors controller plugin

Scheduled Pinned Locked Moved pimatic
controllernode idnrf24l01+mysensorsrasp
92 Posts 23 Posters 56.0k Views 11 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.
  • G gogomartin

    @Dheeraj

    This is my first try at getting MySensors to work.

    I've connected a SerialGateway to the Pi, and configured a DHT22 sensor. But no values are recorded.

    Logs from the pi:

    <- I_LOG_MESSAGE 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    <- I_ID_REQUEST 255;255;3;0;3;
    <- I_LOG_MESSAGE 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    <- I_ID_REQUEST 255;255;3;0;3;

    Serial output from the sensor:

    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    T: 22.70
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    H: 31.10
    req node id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
    H: 31.00

    What can I be doing wrong? Seems like the sensor is requesting a node ID but not getting any?

    Thank you for any kind of response!

    Regards, Martin

    D Offline
    D Offline
    Dheeraj
    Plugin Developer
    wrote on last edited by
    #17

    @gogomartin

    Currently mysensors plugin only support static node id. Try configuring static node id in sensor code. Hint.. Gw. Begin (null, node id)

    Let me know if it's works

    Sebastien Vayrette-GavardS 1 Reply Last reply
    0
    • R Offline
      R Offline
      ricardot
      wrote on last edited by
      #18

      Dheeraj,

      Good work!

      Is possible to send sensor battery level info?

      D 2 Replies Last reply
      0
      • R ricardot

        Dheeraj,

        Good work!

        Is possible to send sensor battery level info?

        D Offline
        D Offline
        Dheeraj
        Plugin Developer
        wrote on last edited by
        #19

        @ricardot

        battery sensor visualization is WIP..

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Ralf H
          wrote on last edited by
          #20

          hey,
          I really like your plugin now that I finally managed to get everything working. :)
          But I would also like to use a BH1750 Light sensor with your plugin. I made a sensorbox with PIR to switch on lights for a minute when movement is detected, but I only want to switch on light when it's dark enough. Is it planned to add support for this?

          D 1 Reply Last reply
          1
          • D Offline
            D Offline
            Dheeraj
            Plugin Developer
            wrote on last edited by
            #21
            This post is deleted!
            1 Reply Last reply
            0
            • R ricardot

              Dheeraj,

              Good work!

              Is possible to send sensor battery level info?

              D Offline
              D Offline
              Dheeraj
              Plugin Developer
              wrote on last edited by
              #22

              @ricardot added support for battery level stats 0.8.9

              1 Reply Last reply
              0
              • R Ralf H

                hey,
                I really like your plugin now that I finally managed to get everything working. :)
                But I would also like to use a BH1750 Light sensor with your plugin. I made a sensorbox with PIR to switch on lights for a minute when movement is detected, but I only want to switch on light when it's dark enough. Is it planned to add support for this?

                D Offline
                D Offline
                Dheeraj
                Plugin Developer
                wrote on last edited by
                #23

                @Ralf-H sure will add support for light sensor

                1 Reply Last reply
                0
                • Vladut GrecuV Offline
                  Vladut GrecuV Offline
                  Vladut Grecu
                  wrote on last edited by Vladut Grecu
                  #24

                  I would like to help you make a color picker for rgb leds and a slider for random pwm outputs :D
                  -edit-

                  deviceClasses = [
                          MySensorsDHT
                          MySensorsBMP
                          MySensorsPIR
                          MySensorsSwitch
                          MySensorsPulseMeter
                          MySensorsButton
                          MySensorBattery
                          MySensorsDevDimmer
                        ]
                  

                  and

                   class MySensorsDevDimmer extends env.devices.DimmerActuator
                  
                      constructor: (@config,lastState, @board) ->
                        @id = config.id
                        @name = config.name
                        @_state = lastState?.state?.value
                        env.logger.info "MySensorsDevDimmer" , @id , @name, @_state
                  
                        @board.on('rfValue', (result) =>
                          if result.sender is @config.nodeid and result.type is
                          V_LIGHT and result.sensor is @config.sensorid
                            state = (if parseInt(result.value) is 1 then on else off)
                            env.logger.info "<- MySensorDevDimmer " , result
                            @_setState(state)
                          )
                        super()
                  
                      changeStateTo: (state) ->
                        assert state is on or state is off
                        if state is true then _state = 1  else _state = 0
                        datas = {}
                        datas =
                        {
                          "destination": @config.nodeid,
                          "sensor": @config.sensorid,
                          "type"  : V_LIGHT,
                          "value" : _state,
                          "ack"   : 1
                        }
                        @board._rfWrite(datas).then ( () =>
                          @_setState(state)
                        )
                  
                  

                  But i get :
                  Could not initialize the plugin "mysensors": MySensorsDevDimmer is not defined

                  I know that this won`t actually work because of the :

                   state = (if parseInt(result.value) is 1 then on else off) 
                  

                  and the :

                    if state is true then _state = 1  else _state = 0
                  

                  What I don't get is why does it throw me that error. (Don't go hard on me, I just learned the basics of coffee script only for this)

                  D 1 Reply Last reply
                  0
                  • Vladut GrecuV Vladut Grecu

                    I would like to help you make a color picker for rgb leds and a slider for random pwm outputs :D
                    -edit-

                    deviceClasses = [
                            MySensorsDHT
                            MySensorsBMP
                            MySensorsPIR
                            MySensorsSwitch
                            MySensorsPulseMeter
                            MySensorsButton
                            MySensorBattery
                            MySensorsDevDimmer
                          ]
                    

                    and

                     class MySensorsDevDimmer extends env.devices.DimmerActuator
                    
                        constructor: (@config,lastState, @board) ->
                          @id = config.id
                          @name = config.name
                          @_state = lastState?.state?.value
                          env.logger.info "MySensorsDevDimmer" , @id , @name, @_state
                    
                          @board.on('rfValue', (result) =>
                            if result.sender is @config.nodeid and result.type is
                            V_LIGHT and result.sensor is @config.sensorid
                              state = (if parseInt(result.value) is 1 then on else off)
                              env.logger.info "<- MySensorDevDimmer " , result
                              @_setState(state)
                            )
                          super()
                    
                        changeStateTo: (state) ->
                          assert state is on or state is off
                          if state is true then _state = 1  else _state = 0
                          datas = {}
                          datas =
                          {
                            "destination": @config.nodeid,
                            "sensor": @config.sensorid,
                            "type"  : V_LIGHT,
                            "value" : _state,
                            "ack"   : 1
                          }
                          @board._rfWrite(datas).then ( () =>
                            @_setState(state)
                          )
                    
                    

                    But i get :
                    Could not initialize the plugin "mysensors": MySensorsDevDimmer is not defined

                    I know that this won`t actually work because of the :

                     state = (if parseInt(result.value) is 1 then on else off) 
                    

                    and the :

                      if state is true then _state = 1  else _state = 0
                    

                    What I don't get is why does it throw me that error. (Don't go hard on me, I just learned the basics of coffee script only for this)

                    D Offline
                    D Offline
                    Dheeraj
                    Plugin Developer
                    wrote on last edited by
                    #25

                    @Vladut-Grecu said:

                    if state is true then _state = 1 else

                    check the pimatic-daemon.log file and what kind of error exception your are getting . not sure if you have enable the "logLevel": "debug", in config.json for pimatic.

                    Also, you need to add entry in device-config-schema.coffee schema file.
                    if nothing works share the log file with me..

                    I'm also new to coffee or nodejs and struggled a lot understanding the coffee script , basically, still in learning phase..

                    1 Reply Last reply
                    0
                    • D Dheeraj

                      @gogomartin

                      Currently mysensors plugin only support static node id. Try configuring static node id in sensor code. Hint.. Gw. Begin (null, node id)

                      Let me know if it's works

                      Sebastien Vayrette-GavardS Offline
                      Sebastien Vayrette-GavardS Offline
                      Sebastien Vayrette-Gavard
                      wrote on last edited by
                      #26

                      @Dheeraj, I have been looking all day for how to configure static node id , meanwhile I heard of mysensors last night so pardon me if I didn't find the doc that explain it. Can you point me in the right direction?

                      D 1 Reply Last reply
                      0
                      • Sebastien Vayrette-GavardS Offline
                        Sebastien Vayrette-GavardS Offline
                        Sebastien Vayrette-Gavard
                        wrote on last edited by
                        #27

                        I didn't search enough, http://forum.mysensors.org/topic/753/static-node-id-and-other-unanswered-questions

                        1 Reply Last reply
                        0
                        • Sebastien Vayrette-GavardS Sebastien Vayrette-Gavard

                          @Dheeraj, I have been looking all day for how to configure static node id , meanwhile I heard of mysensors last night so pardon me if I didn't find the doc that explain it. Can you point me in the right direction?

                          D Offline
                          D Offline
                          Dheeraj
                          Plugin Developer
                          wrote on last edited by
                          #28

                          @Sebastien-Vayrette-Gavard said:

                          I didn't find the doc that explain it. Can you point me in the right di
                          follow the below instruction

                          for pimatic installation:
                          http://www.pimatic.org/guide/getting-started/installation/

                          plugin instruction:
                          https://github.com/DheerajKhajuria/pimatic-mysensors

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            jurasek
                            wrote on last edited by
                            #29

                            Hello, I am new with controler. I already have some temperature sensors and other controls, but until now I did not use any controller,
                            I am not familiar with linux, and I need help with instalation of controler on raspbery 2.
                            I am done with OS instalation, I am using image NOOBS.
                            I try to install Pimatic acording this procedure, http://pimatic.org/guide/getting-started/installation/
                            And now I am not sure what next.
                            Please can anybody help me?
                            Thanks

                            funky81F 1 Reply Last reply
                            0
                            • J jurasek

                              Hello, I am new with controler. I already have some temperature sensors and other controls, but until now I did not use any controller,
                              I am not familiar with linux, and I need help with instalation of controler on raspbery 2.
                              I am done with OS instalation, I am using image NOOBS.
                              I try to install Pimatic acording this procedure, http://pimatic.org/guide/getting-started/installation/
                              And now I am not sure what next.
                              Please can anybody help me?
                              Thanks

                              funky81F Offline
                              funky81F Offline
                              funky81
                              wrote on last edited by
                              #30

                              @jurasek I found out that pimatic installation in the website quite general.
                              for more details, you can use following link for the forum.
                              it gives me clear idea and more details step by step

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                jurasek
                                wrote on last edited by
                                #31

                                Thanks, I have a pimatic runing now. I would like connect NRF24 directly to the RPI is this possible? How can I setup mysensors plugin for this?

                                Thanks

                                D 1 Reply Last reply
                                0
                                • J jurasek

                                  Thanks, I have a pimatic runing now. I would like connect NRF24 directly to the RPI is this possible? How can I setup mysensors plugin for this?

                                  Thanks

                                  D Offline
                                  D Offline
                                  Dheeraj
                                  Plugin Developer
                                  wrote on last edited by
                                  #32

                                  @jurasek connecting NRF24L01 to RPi directly is possible you will find good amount of references if you search this form.

                                  1 Reply Last reply
                                  1
                                  • F Offline
                                    F Offline
                                    Fredrik Carlsson
                                    wrote on last edited by
                                    #33

                                    Hello @Dheeraj
                                    Any info about how to setup a pulsecount sensor?

                                    D funky81F 2 Replies Last reply
                                    0
                                    • Sebastien Vayrette-GavardS Offline
                                      Sebastien Vayrette-GavardS Offline
                                      Sebastien Vayrette-Gavard
                                      wrote on last edited by Sebastien Vayrette-Gavard
                                      #34

                                      @Dheeraj is the light sensor supported? I am getting

                                      20:32:05.069 [pimatic] warn: no plugin found for device "Light1" of class "MySensorLight"!

                                      when starting pimatic with

                                      {
                                            "id": "Light1",
                                            "name": "Lighti1",
                                            "class": "MySensorLight",
                                            "nodeid": 11,
                                            "sensorid": 0
                                          }
                                      

                                      yet I am able to see the sensor in pimatic's logs

                                      <- I_LOG_MESSAGE 0;0;3;0;9;read: 11-11-0 s=0,c=1,t=23,pt=2,l=2:39

                                      D 1 Reply Last reply
                                      0
                                      • Sebastien Vayrette-GavardS Sebastien Vayrette-Gavard

                                        @Dheeraj is the light sensor supported? I am getting

                                        20:32:05.069 [pimatic] warn: no plugin found for device "Light1" of class "MySensorLight"!

                                        when starting pimatic with

                                        {
                                              "id": "Light1",
                                              "name": "Lighti1",
                                              "class": "MySensorLight",
                                              "nodeid": 11,
                                              "sensorid": 0
                                            }
                                        

                                        yet I am able to see the sensor in pimatic's logs

                                        <- I_LOG_MESSAGE 0;0;3;0;9;read: 11-11-0 s=0,c=1,t=23,pt=2,l=2:39

                                        D Offline
                                        D Offline
                                        Dheeraj
                                        Plugin Developer
                                        wrote on last edited by
                                        #35

                                        @Sebastien-Vayrette-Gavard said:

                                        yet I am able

                                        kindly change the "class" name as "MySensorsLight" . please note it has a 's' in between.

                                        1 Reply Last reply
                                        0
                                        • F Fredrik Carlsson

                                          Hello @Dheeraj
                                          Any info about how to setup a pulsecount sensor?

                                          D Offline
                                          D Offline
                                          Dheeraj
                                          Plugin Developer
                                          wrote on last edited by
                                          #36

                                          @Fredrik-Carlsson

                                          frankly, i couldn't check pulsecount using actual power meter. although i can simulate it :) . It's custom made according to my need. I can modify it as per http://www.mysensors.org/build/pulse_power build easily.

                                          currently it only supports "V_WATT" message.

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


                                          16

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          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