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.
  • 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
                              • F Offline
                                F Offline
                                Fredrik Carlsson
                                wrote on last edited by Fredrik Carlsson
                                #37

                                Good morning @Dheeraj
                                Do you have any example for how you are configuring it? I have made a node with the "original" sketch and configured it with sensor array [0,1,2] in pimatic. I see the device, with parameters w/kw/kWh but no info comes in. Are you using a custom sketch then or how is your setup working?
                                I think one of the nicest things about pimatic is the graphing functionality. I want to log and and check how the heating is distributed throughout my house and at which consumption depending on heatpump / woodstove settings

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

                                  @Dheeraj maybe you can fix the example here for lazy eyes/asses like me. I just copied and paste and didn't notice the missing "s" Thank you so much for the quick support and the great plugin.

                                  1 Reply Last reply
                                  0
                                  • F Fredrik Carlsson

                                    Good morning @Dheeraj
                                    Do you have any example for how you are configuring it? I have made a node with the "original" sketch and configured it with sensor array [0,1,2] in pimatic. I see the device, with parameters w/kw/kWh but no info comes in. Are you using a custom sketch then or how is your setup working?
                                    I think one of the nicest things about pimatic is the graphing functionality. I want to log and and check how the heating is distributed throughout my house and at which consumption depending on heatpump / woodstove settings

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

                                    @Fredrik-Carlsson said:

                                    think one of the nicest things about pimatic is the graphing functionality. I want to log and and check how the heating is distributed throughout my house and at which consumption depending on heatpump / woodstove set

                                    since i don't have home laptop with me. otherwise , i could have shared the custom sketch with you. but what i remember is that it sends V_WATT message with wattage usage and calculate KW and KWh ( still broken ) at controller end ( pimatic ).

                                    meanwhile, i'm fixing the pulsemeter code which will be compatible with actual sketch, wait for 1 or 2 days. Also, we will be able to see battery status (optional) with sensor devices.

                                    one thing you missed here is that pimatic is browser based also have the "automation by rules" functionality which is awesome. also you can try various plugins available with pimatic. http://www.pimatic.org/pages/plugins/

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

                                      @Dheeraj I wait patiently then :)
                                      Yes the more im digging in to pimatic the more i like it and feel that it fits my needs perfectly

                                      1 Reply Last reply
                                      0
                                      • Mad MooM Offline
                                        Mad MooM Offline
                                        Mad Moo
                                        wrote on last edited by Mad Moo
                                        #41

                                        Yesterday was great update (0.8.14). Now battery level is connected with device as regular attribute. Great job, @Dheeraj! Thanks a lot!

                                        battery.png

                                        D 1 Reply Last reply
                                        0
                                        • Mad MooM Mad Moo

                                          Yesterday was great update (0.8.14). Now battery level is connected with device as regular attribute. Great job, @Dheeraj! Thanks a lot!

                                          battery.png

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

                                          newer version (0.8.15 ) of plugin release . support Acronym for devices . improves user experience.

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


                                          17

                                          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