Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. FredRoot
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    FredRoot

    @FredRoot

    0
    Reputation
    15
    Posts
    638
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    FredRoot Follow

    Best posts made by FredRoot

    This user hasn't posted anything yet.

    Latest posts made by FredRoot

    • Rule to send message to Node

      Hi,

      I have this simple rule to test data tx to a node:

      rule "Test"
      when
              Item Test_Btn changed
      then
              sendCommand(Test_Btn, "30;200;1;0;3;ON")
      end
      

      and Test_Btn is defined as the following item:

      Switch 		Test_Btn  "Test Btn"
      

      When I press the button, I get the following error:

      18:18:34.161 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Test_Btn' received command OFF
      18:18:34.182 [INFO ] [marthome.event.ItemStateChangedEvent] - Test_Btn changed from ON to OFF
      18:18:34.199 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Test': The argument 'command' must not be null or empty.
      

      What does "The argument 'command' must not be null or empty" mean?

      posted in OpenHAB
      FredRoot
      FredRoot
    • RE: 💬 NodeManager

      Hi,

      I'm having trouble with the motion sample code. I have changed the setSleepHours(1) command to setSleepMinutes(1). I understand that the sensor will send a hart beat every 1 min. This is working fine for the hart beat, but evertime the hart beat is send the sensor sends a Trigger messages as well even though the sensor is not triggered. I thought that maybe there is a power dip and that it might cause the PIR (RS501) to send a interrupt, but I have removed the setSleepMinutes command and replaced it with a setBatteryReportHours(1) command. This command is send correctly and the sensor only sends the trigger command when the PIR is triggered. Did anyone have a similar issue?

      Attached is the sensor debug output when the setSleepMinutes command is used:

      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
      40 MCO:BGN:BFR
      REG I=1 P=3 P=1 T=16
      NodeManager v1.6
      LIB V=2.1.1 R=N T=N A=A S=- B=-
      INT P=3 M=1
      INT P=2 M=255
      96 TSM:INIT
      176 TSF:WUR:MS=0
      198 TSM:INIT:TSP OK
      219 TSM:INIT:STATID=3
      243 TSF:SID:OK,ID=3
      264 TSM:FPAR
      313 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      385 TSF:MSG:READ,0-0-3,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      440 TSF:MSG:FPAR OK,ID=0,D=1
      2387 TSM:FPAR:OK
      2404 TSM:ID
      2418 TSM:ID:OK
      2433 TSM:UPL
      2449 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2521 TSF:MSG:READ,0-0-3,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2578 TSF:MSG:PONG RECV,HP=1
      2607 TSM:UPL:OK
      2625 TSM:READY:ID=3,PAR=0,DIS=1
      2660 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2734 TSF:MSG:READ,0-0-3,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2797 TSF:MSG:SEND,3-3-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
      2875 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2945 TSF:MSG:READ,0-0-3,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      RADIO OK
      3004 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=11,pt=0,l=11,sg=0,ft=0,st=OK:NodeManager
      3096 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
      PRES I=200, T=23
      3170 TSF:MSG:SEND,3-3-0-0,s=200,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=OK:
      PRES I=201, T=30
      3260 TSF:MSG:SEND,3-3-0-0,s=201,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=OK:
      BATT V=3.30 P=100
      SEND D=0 I=201 C=0 T=38 S= I=0 F=3.30
      3418 !MCO:SND:NODE NOT REG
      3506 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:100
      PRES I=1 T=1
      3579 TSF:MSG:SEND,3-3-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
      READY
      
      3659 MCO:REG:REQ
      3688 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      3760 TSF:MSG:READ,0-0-3,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      3817 MCO:PIM:NODE REG=1
      3842 MCO:BGN:STP
      MY I=3 M=1
      3860 MCO:BGN:INIT OK,TSP=1
      SLEEP 60s
      
      3901 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      3971 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:127
      4544 MCO:SLP:TPD
      4560 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=1
      SEND D=0 I=1 C=0 T=16 S= I=1 F=0.00
      4597 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      SLEEP 60s
      
      4732 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      4800 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:956
      5376 MCO:SLP:TPD
      5392 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=0
      SEND D=0 I=1 C=1 T=16 S= I=0 F=0.00
      5429 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      SLEEP 60s
      
      5564 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      5632 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:1787
      6207 MCO:SLP:TPD
      6223 MCO:SLP:WUP=-1
      AWAKE
      SLEEP 60s
      
      6246 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      6322 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:2478
      6897 MCO:SLP:TPD
      6914 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=1
      SEND D=0 I=1 C=1 T=16 S= I=1 F=0.00
      6950 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      SLEEP 60s
      
      7086 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      7153 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:3309
      7729 MCO:SLP:TPD
      7745 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=0
      SEND D=0 I=1 C=1 T=16 S= I=0 F=0.00
      7782 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      SLEEP 60s
      
      7917 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      7985 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:4141
      8560 MCO:SLP:TPD
      8577 MCO:SLP:WUP=-1
      AWAKE
      SLEEP 60s
      
      8599 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      8675 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:4831
      9252 MCO:SLP:TPD
      9269 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=1
      SEND D=0 I=1 C=1 T=16 S= I=1 F=0.00
      9306 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      SLEEP 60s
      
      9441 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      9508 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:5664
      10084 MCO:SLP:TPD
      10102 MCO:SLP:WUP=1
      INT P=3, M=1
      AWAKE
      SWITCH I=1 P=3 V=0
      SEND D=0 I=1 C=1 T=16 S= I=0 F=0.00
      10139 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      SLEEP 60s
      
      10274 MCO:SLP:MS=60000,SMS=1,I1=1,M1=1,I2=255,M2=255
      10344 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:6500
      10921 MCO:SLP:TPD
      
      
      posted in OpenHardware.io
      FredRoot
      FredRoot
    • RE: 💬 NodeManager

      Hi,
      I have started to play with nodemanager and I have registered a SENSOR_DS18B20. Nodemanager handles all the heavy lifting and the sensor is reporting the temperature 100%. I can change the sleep and report intervals with “setReportIntervalSeconds and setSleepSeconds”.

      Question 1:
      According to the MySensors documentation (https://www.mysensors.org/download/serial_api_20#variable-types) a S_TEMP sensor can report the V_TEMP value and a V_ID value. Nodemanager populates the V_TEMP variable, but how can I populate and send the V_ID value?
      Question2:
      If I want to add an additional sensor I must register it with “registerSensor” and I would set the report interval for this sensor by getting a pointer to this sensor with “getSensor”, but how do I add custom code for this sensor in Loop()? How do I ensure that the custom code is only executed for this sensor and not for the other sensor?

      posted in OpenHardware.io
      FredRoot
      FredRoot
    • openHAB MQTT question

      Hi,

      I have RF24 nodes which communicates to openHab via a Ehternet Gayeway. I have setup MQTT inorder to send configuration data to my controllers. I have used this openhab website to setup the MQTT. According to the website:
      In addition to configuring MQTT publish/subscribe options for specific openHAB items, you can also define a generic configuration in the services/mqtt-eventbus.cfg file which will act on ALL status updates or commands on the openHAB event bus.

      I have a "systeminfo" thing defined and everytime the the CPU load changes, OpenHab send all my sensor data via the MQTT topic.
      So my question is:

      1. Is it possible to reduce the number of data send via the MQTT eventbus? According to the webside it does not seem to be possible.
      2. If no mqtt client is subscribed to the topic, will the MQTT broker (Mosquitto) still sent all the data?
      posted in OpenHAB
      FredRoot
      FredRoot
    • RE: Setting parameters in nodes

      @stefaanv I have installed MQTT-Spy and I can publish on the "openHAB/in/test_text/command" topic and OpenHub does forward the message to my node 😀 ,but I receive the reply data in the "openHAB/out/test_text/state" topic. Besides the expected data is there also a lot of other data from my other sensors as well. I have changed my mqtt-eventbus.cfg to :

      broker=mosquitto
      statePublishTopic=openHAB/out/test_text/state
      stateSubscribeTopic=openHAB/in/test_text/state
      commandSubscribeTopic=openHAB/in/${item}/command
      

      I have hoped that it will limit the amount of data. This did helped a bit, but see all the additional data below. I receive this data even if the sensor is switched off. The debouncePeriod->0 ,timeBeforeSleep->0 and pulseCounter->0 is only received when I transmit the command via MQTT-SPY but the set is repeated every second.

      openHAB/out/test_text/state debouncePeriod->0
      openHAB/out/test_text/state 0.0
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 341
      openHAB/out/test_text/state 341
      openHAB/out/test_text/state timeBeforeSleep->0
      openHAB/out/test_text/state 2017-07-20T19:20:22
      openHAB/out/test_text/state 2017-07-20T19:20:22
      openHAB/out/test_text/state pulseCounter->0
      openHAB/out/test_text/state 2017-07-20T19:20:22
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 99
      openHAB/out/test_text/state 99
      openHAB/out/test_text/state 581
      openHAB/out/test_text/state 581
      openHAB/out/test_text/state 32.3
      openHAB/out/test_text/state 32.3
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 63.0
      openHAB/out/test_text/state 63.0
      openHAB/out/test_text/state 461
      openHAB/out/test_text/state 461
      openHAB/out/test_text/state 91.7
      openHAB/out/test_text/state 91.7
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 100.0
      openHAB/out/test_text/state 100.0
      openHAB/out/test_text/state 5078
      openHAB/out/test_text/state 5078
      openHAB/out/test_text/state 37.0
      openHAB/out/test_text/state 37.0
      openHAB/out/test_text/state 8.3
      openHAB/out/test_text/state 8.3
      openHAB/out/test_text/state 0.0
      openHAB/out/test_text/state 0.0
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 341
      openHAB/out/test_text/state 341
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 99
      openHAB/out/test_text/state 99
      openHAB/out/test_text/state 581
      openHAB/out/test_text/state 581
      openHAB/out/test_text/state 19.7
      openHAB/out/test_text/state 19.7
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 63.0
      openHAB/out/test_text/state 63.0
      openHAB/out/test_text/state 461
      openHAB/out/test_text/state 461
      openHAB/out/test_text/state 91.7
      openHAB/out/test_text/state 91.7
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state Undefined
      openHAB/out/test_text/state 100.0
      openHAB/out/test_text/state 100.0
      openHAB/out/test_text/state 5078
      openHAB/out/test_text/state 5078
      openHAB/out/test_text/state 37.0
      openHAB/out/test_text/state 37.0
      openHAB/out/test_text/state 8.3
      
      

      Any idea how I can stop this data from being transmitted via mqtt?

      posted in Feature Requests
      FredRoot
      FredRoot
    • RE: Setting parameters in nodes

      @stefaanv Thank you for this detailed feedback.
      I will try your suggestions this afternoon.

      posted in Feature Requests
      FredRoot
      FredRoot
    • RE: Setting parameters in nodes

      @stefaanv I like your method of sending config data to a sensor. I have tried your example but I don't receive any data on my sensor. Will you please clarify the following:

      1. You gave and example of the mqtt.cfg configuration file:
      mosquitto.url=tcp://localhost:1883
      mosquitto.clientId=openhab
      mosquitto.retain=true
      mosquitto.async=false
      

      What does the "mosquitto.clientId=openhab" mean? Is the "openhab" a name that I should have used somewhere in my OpenHab setup?

      1. Your mqtt-eventbus.cfg example:
      broker=mosquitto
      statePublishTopic=openHAB/out/${item}/state
      stateSubscribeTopic=openHAB/in/${item}/state
      commandSubscribeTopic=openHAB/in/${item}/command
      
      • Is the "broker =mosquitto" a name that I should have defined somewhere?
      • Later on in your example you mention "The feedback is provided on topic=openHAB/out/test_text/command ..." but the "openHAB/out/test_text/command" is not indicated in the mqtt-eventbus.cfg file. Is that correct?
      1. I have installed the latest OpenHab and I use the PaperUI to configure my Things. The PaperUI has detected my sensor as "mysensors:text:gateway:text_1_202:text" and I don't know where I can edit the name of the Thing. I have added the item in .items config file as
      String test_text "text" <text> {channel="mysensors:text:gateway:text_1_202:text"}
      
      1. I have installed mosquitto and I can subscribe and publish with the following commands:
        In one terminal I subscribe with
      mosquitto_sub -h 127.0.0.1 -i openhab -t openHAB/in/text_1_202/command
      

      and in another terminal I publish using:

      mosquitto_pub -h 127.0.0.1 -i openhab -t openHAB/in/test_1_202/command -m info=
      

      On the "subscribe" terminal I do get the "info=" message, but I don't receive anything on the node.
      I'm not sure if my publish channel is correct because my node name is different than yours.

      How can I check that OpenHab do receive the MQTT command?
      Can you spot any other setup issue that I might have?

      posted in Feature Requests
      FredRoot
      FredRoot
    • RE: Openhab and Gateway Types

      Thank you

      posted in OpenHAB
      FredRoot
      FredRoot
    • Openhab and Gateway Types

      Hi,

      I have a sensor node communicating via RF24 to a Raspberry Pi (RPi) gateway. This RPi gateway is connected via Ethernet to Openhub ( the controller software) also running on the same RPi. This is all working fine. I want to add a SonOff relay to this setup and I want to communicate with the SunOff via MQTT messages.

      If I install the MQTT broker software (Mosquitto) on the RPi, will Openhab be able to communicate with the SunOff device, or do I have to add another MQTT gateway application on the RPi?

      posted in OpenHAB
      FredRoot
      FredRoot
    • RE: Mysensor Ethernet gateway message definition

      @mfalkvidd Thank you. This will help a lot

      posted in Development
      FredRoot
      FredRoot