Send fake data to FHEM without transmitter
-
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 ? -
Ok, thanks.
In the gateway i can disable radio.
But i get an error in the log of FHEMMYSENSORS: ignoring set-msg from unknown radioId 0, childId 0 for V_LEVEL
Can i set the radio ID by myself ?
-
I delete the library and copy the developer library to the the arduino folder.
In serial monitor see this0;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;101FHEM 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. -
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 ?
-
Ok, the gateway, but i want to simulate an sensor...or is there no way to do this ?
-
Ok, thanks for your help.
I will stop here now.