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. Troubleshooting
  3. Send fake data to FHEM without transmitter

Send fake data to FHEM without transmitter

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 2 Posters 4.3k Views 2 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello.
    I want to use the mysensors way to connect my selfmade sensors to FHEM.
    I don´t have aNRF24 or RFM69. I use cheep 433 RX / TX modules and this will work with my arduino sketch.
    The trabsmitter is an Attiny85 with DHT11 and 433 and the reciver is an Arduino Uno with display.
    This will work, but i want to use a system like FHEM (or if i can not use this because im to stupid so i search another system)

    My transmitter only will send a 5 digit number, SenderID, Temp, Hum...
    Now i want to convert my data to mysensors protokoll for use with FHEM.
    Im new on FHEM so i must have any input device for testing.

    So i use a sketch for my Arduino Nano and try it...but for any sketch i need a Transmitter like NRF24.
    The sketch will oct work without...so i can not send anything :-(

    I read this
    https://www.mysensors.org/download/serial_api_20

    So i was testing with my Arduino Nano and serialprint, and serialprintln.
    I try
    Serial.println("12:1:1:0:0:36.5");
    Serial.println("12;1;1;0;0;36.5");
    .... and other to simulate a temp sensor .
    But it will not work.

    Can anyone help me ?
    Other problem is FHEM. I define a sensor

    define Sensor MYSENSORS /dev/ttyUSB0@115200

    This will show me connected if i put my Arduino into my Pi3.
    But i dont know what is to do then...
    What must i do fist, define MYSENSORS or define MYSENSORS_DEVICE ?.:sob:

    Many thanks for any help

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      Probably easier to use the serial gateway as a starting point.

      Present your sensors (in the presentation()-function).. and then just use the send-function. It translates your commands into the serial MySensors protocol.

      Note, you have to download the current development-branch.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hello.
        I want use the serial gateway...but i don´t want to use the NRF24 at this moment.
        I only want to know the data format send via USB.
        So the data format is:

        node-id;child-sensor-id;message-type;ack;sub-type;payload\n

        but i want send this by myself with an arduino sketch.
        I think i can send this data via serialprint ?

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          You don't need to activate any radio for the gateway.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Ok, thanks.
            In the gateway i can disable radio.
            But i get an error in the log of FHEM

            MYSENSORS: ignoring set-msg from unknown radioId 0, childId 0 for V_LEVEL

            Can i set the radio ID by myself ?

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              Like I said earlier, do you have the latest MySensors version from the development branch installed?

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by A Former User
                #7

                I delete the library and copy the developer library to the the arduino folder.
                In serial monitor see this

                0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.0.1-beta
                0;255;3;0;14;Gateway startup complete.
                0;255;0;0;17;2.0.1-beta
                0;255;3;0;11;Dust Sensor
                0;255;3;0;12;1.1
                0;1;0;0;24;
                0;255;3;0;9;MCO:REG:NOT NEEDED
                0;255;3;0;9;MCO:BGN:STP
                0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
                Raw Signal Value (0-1023): 388 - Voltage: 1.89 - Dust Density: 222.07
                0;1;1;0;37;223
                Raw Signal Value (0-1023): 241 - Voltage: 1.18 - Dust Density: 100.05
                0;1;1;0;37;101
                

                FHEM show me

                2016.09.14 19:14:06 3: Setting MYS_GW serial parameters to 115200,8,N,1
                2016.09.14 19:14:06 5: MYSENSORS send: Rx: fr=000 ci=000 c=003(C_INTERNAL    ) st=002(I_VERSION       ) ack=0 ''
                
                2016.09.14 19:14:06 5: SW: 303b303b333b303b323b0a
                2016.09.14 19:14:06 1: /dev/ttyUSB0 reappeared (MYS_GW)
                2016.09.14 19:14:07 5: MYSENSORS/RAW: /0;255;3;0;9;MCO:BGN:INIT GW,CP=R
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;9;MCO:BGN:INIT GW,CP=R/-NGA--,VER=2.0.1-beta
                0;255;3;0;
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=009(I_LOG_MESSAGE   ) ack=0 'MCO:BGN:INIT GW,CP=R-NGA--,VER=2.0.1-beta'
                
                2016.09.14 19:14:07 5: MYSENSORS gateway MYS_GW: MCO:BGN:INIT GW,CP=R-NGA--,VER=2.0.1-beta
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;/14;Gateway startup complete.
                0;2
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=014(I_GATEWAY_READY ) ack=0 'Gateway startup complete.'
                
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;2/55;0;0;17;2.0.1-beta
                0;255;3;0;1
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=000(C_PRESENTATION) st=017(S_ARDUINO_NODE  ) ack=0 '2.0.1-beta'
                
                2016.09.14 19:14:07 3: MYSENSORS: ignoring presentation-msg from unknown radioId 0, childId 255, sensorType 17
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;1/1;Dust Sensor
                0;255;3;0;12;1.1
                0
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=011(I_SKETCH_NAME   ) ack=0 'Dust Sensor'
                
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=012(I_SKETCH_VERSION) ack=0 '1.1'
                
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0/;0;0;0;24;
                0;255;3;0;9;MCO:REG:N
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=000 c=000(C_PRESENTATION) st=024(S_DUST          ) ack=0 ''
                
                2016.09.14 19:14:07 3: MYSENSORS: ignoring presentation-msg from unknown radioId 0, childId 0, sensorType 24
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;9;MCO:REG:N/OT NEEDED
                0;255;3;0;9;MCO:BGN:ST
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=009(I_LOG_MESSAGE   ) ack=0 'MCO:REG:NOT NEEDED'
                
                2016.09.14 19:14:07 5: MYSENSORS gateway MYS_GW: MCO:REG:NOT NEEDED
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;9;MCO:BGN:ST/P
                0;255;3;0;9;MCO:BGN:INIT OK,ID
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=009(I_LOG_MESSAGE   ) ack=0 'MCO:BGN:STP'
                
                2016.09.14 19:14:07 5: MYSENSORS gateway MYS_GW: MCO:BGN:STP
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;255;3;0;9;MCO:BGN:INIT OK,ID/=0,PAR=0,DIS=0,REG=1
                Raw Signal 
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=255 c=003(C_INTERNAL    ) st=009(I_LOG_MESSAGE   ) ack=0 'MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1'
                
                2016.09.14 19:14:07 5: MYSENSORS gateway MYS_GW: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
                2016.09.14 19:14:07 5: MYSENSORS/RAW: Raw Signal /Value (0-1023): 1023 - Voltage: 
                2016.09.14 19:14:07 5: MYSENSORS/RAW: Raw Signal Value (0-1023): 1023 - Voltage: /5.00 - Dust Density: 749.17
                0;0
                2016.09.14 19:14:07 5: MYSENSORS Read: Raw Signal Value (0-1023): 1023 - Voltage: 5.00 - Dust Density: 749.17is no parsable mysensors message
                2016.09.14 19:14:07 5: MYSENSORS/RAW: 0;0/;1;0;37;750
                
                2016.09.14 19:14:07 5: MYSENSORS Read: Rx: fr=000 ci=000 c=001(C_SET         ) st=037(V_LEVEL         ) ack=0 '750'
                
                2016.09.14 19:14:07 3: MYSENSORS: ignoring set-msg from unknown radioId 0, childId 0 for V_LEVEL
                

                :-(

                EDIT: I only put something in the code to let write some data.
                There was no example with temperature or somthing simple, so i use the dust example.

                1 Reply Last reply
                0
                • hekH Offline
                  hekH Offline
                  hek
                  Admin
                  wrote on last edited by
                  #8

                  Hmm. Wonder why about this message "ignoring presentation-msg from unknown radioId".

                  I know too little about FHEM to answer you unfortunately.

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    The serial output is ok ?

                    0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1

                    Can i define a ID by myself ?

                    1 Reply Last reply
                    0
                    • hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #10

                      No, a gateway always get id=0

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #11

                        Ok, the gateway, but i want to simulate an sensor...or is there no way to do this ?

                        1 Reply Last reply
                        0
                        • hekH Offline
                          hekH Offline
                          hek
                          Admin
                          wrote on last edited by
                          #12

                          Not without hacking this line: https://github.com/mysensors/MySensors/blob/development/core/MySensorsCore.h#L70

                          1 Reply Last reply
                          0
                          • ? Offline
                            ? Offline
                            A Former User
                            wrote on last edited by
                            #13

                            Ok, thanks for your help.
                            I will stop here now.

                            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.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