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
H

hooraysimpsons

@hooraysimpsons
About
Posts
22
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Measure Battery Level on Vraw by comparing to the ATMega internal voltage. Possible?
    H hooraysimpsons

    I've been reading about measuring battery level on Vcc for battery powered setups that don't use any step-up converter by comparing it to the internal 1.1V reference. (examples: http://forum.mysensors.org/topic/186/new-library-to-read-arduino-vcc-supply-level-without-resistors-for-battery-powered-sensor-nodes-that-do-not-use-a-voltage-regulator-but-connect-directly-to-the-batteries ; http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/ )

    My question. Is it possible to perform the same measurement to determine the voltage coming in on Vraw. I currently power my boards with 4AA's and use the onboard power regulator (http://forum.mysensors.org/topic/483/2-aa-batteries-with-step-up-converter-to-vcc-pin-vs-3-aa-batteries-to-raw-pin/23).

    Development

  • MQTT Broker gateway
    H hooraysimpsons

    @celonunes Nope. I figured it out. In my openhab config file there was space prior to my MQTT related lines

    " mqtt:mysensor.url=tcp://192.168.1.134:1883"
    " mqtt:mysensor.clientId=OpenhabMQTT"
    Instead of
    "mqtt:mysensor.url=tcp://192.168.1.134:1883"
    "mqtt:mysensor.clientId=OpenhabMQTT"

    Removed the space and now I get my light sensor output value. I still don't get the sketch name coming through but I'll look into that later.

    Controllers

  • MQTT Broker gateway
    H hooraysimpsons

    I have restarted my router with no effect. The gateway still does not show up as an active client (using DDWRT) but I still have a connection from phone to gateway.

    Added the above line. I've used one before like it but went back to what was given at the beggining of this thread to start anew. I also tried with the following edits
    "Light Level"
    "Light Level [%s]"
    "Light Level [%.1f]"

    None of which make a difference. The reason I think OpenHab doesn't even see the gateway is because nothing shows up in sketch name either which should work even if the above line was incorrect.

    I have done the testing with the Android App turned off as well since I know OpenHab had some issues earlier if other clients were accessing the gateway.

    I still see no reference to my gateway's IP in any of the OpenHab output/logs. So I'm not sure it is even trying.

    The only error message in my openhab log is:
    11:23:46.951 [ERROR] [sphere.cpr.AtmosphereFramework:2215 ] -

    I tried clearing the EEPROM in the gateway. I changed it's Mac address and removed the DHCP lease for it from my router. Still no evidence of the gateway on my router status page but also still able to connect to it with my phone.

    Another update:
    I installed Mosquitto and I see the light sensor level using mosquitto_sub -h 192.168.1.134 -t MyMQTT

    Controllers

  • MQTT Broker gateway
    H hooraysimpsons

    Crazy- I was thinking my network connection as a source of the problem. On my router homepage the gateway does not show up as being given an IP. However, the MyMQTT Android App sees the gateway without issue so the routing across my network from phone to gateway is successful. I have attached a screenshot of the MyMQTT andoird app output.

    2015-03-08 14.55.12.png

    I am trying to run OpenHab on a windows PC. I don't have mosquitto running at all. My understanding is that it is not required.

    Controllers

  • MQTT Broker gateway
    H hooraysimpsons

    @Gambituk
    openhab.cfg
    test.items
    1present0absent.map
    test.sitemap

    Controllers

  • MQTT Broker gateway
    H hooraysimpsons

    I can't seem to get openhab to communicate with my MQTT gateway. I can connect to the gateway with the MyMQTT Android app and I receive messages from my light sensor node including the sketch name and light level. I can ping my gateway without issue as well.

    However, OpenHab never seems like it notices the gateway. No data in the sketch name or node result. I've used the sitemap, items, and config files as described above and I've also customized them to match my sensor node more specifically. Both without success. The only change I've made is my sensor node is defined as node ID 20 within it's sketch.

    When using start_Debug.bat what should I see in the command line window to indicate OpenHab even sees or connects to the gateway. I see no indication that it attempts to connect to the IP address of my gateway.

    Thanks

    Controllers

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    Ok. My primary problem was the radios I purchased form Ebay weren't the correct type. I've purchased new ones. Still got some problems to work through but I'll put in a seperate thread.

    For others reading later:

    Other references to these radios:
    http://forum.mysensors.org/topic/878/no-debug-data-from-sensors-or-gateway-bad-radios
    http://forum.mysensors.org/topic/728/radio-setup-give-check-wires/17
    And specifically mentioned on the troubleshooting page as well.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    I added capacitors to my radios to see if that would help. I'm also testing with a serial gateway without much difference. I tried assigning a node id of 1. Didn't seem to change much.

    The debug output goes to the serial monitor correct? I'm wondering why I'm not getting any debug messages.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    I turned on failure_handling within the rf24 config. Now I get the following messageon my serial output:

    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:

    as well as:

    sensor started, id 255
    req node id

    This happens three times before it appears to give up and runs the rest of the parent sketch which starts a serial output of A0.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    I forgot about the .cpp files. Did I tell you I was new to this?

    So by placing serial.println commands in my mysensors.cpp file I have identified where things seem to get stuck:

    Within the findparentnode routine:

    Serial.println("FPN1");
    sendWrite(BROADCAST_ADDRESS, msg, true);
    Serial.println("FPN1");

    I'll keep investigating when I get time. Thanks for your help

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    #define BAUD_RATE 9600 is already placed in mysensors.h.

    I don't see any reference to baud rate or starting the serial output in the begin function in mysensors.h

    That is why I added serial.begin(9600) to the sketch to see if that helped. It didn't but I left it in so that it would be started when I commented out the gw.begin

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    If I replace gw.begin() with the below line of code and continue to comment out the remainder of the gw lines I can get the light output on the serial monitor.

    void begin(void (* msgCallback)(const MyMessage &)=NULL, uint8_t nodeId=AUTO, boolean repeaterMode=false, uint8_t parentNodeId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_LEVEL, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE);

    My understanding is the gw.begin() and that line of code should be equivalent. I've coded in the past with Fortran but not for years so I may be missing something obvious here.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    If the issue was a bad radio would there still be some kind of output on the serial monitor or would the failure to connect to the gateway cause an issue that prevents the remainder of the code from executing and giving an output?

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    with gw.setup I get:
    LightSensor:18: error: 'class MySensor' has no member named 'setup'

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    Ardunio 1.0.6

    This code works:
    #include <SPI.h>
    #include <MySensor.h>

    #define CHILD_ID_LIGHT 0
    #define LIGHT_SENSOR_ANALOG_PIN 0

    unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)

    MySensor gw;
    MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
    int lastLightLevel;

    void setup()
    {
    Serial.begin(9600);
    // gw.begin();

    // Send the sketch version information to the gateway and Controller
    // gw.sendSketchInfo("Light Sensor", "1.0");

    // Register all sensors to gateway (they will be created as child devices)
    // gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
    }

    void loop()
    {
    int lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23;
    Serial.println(lightLevel);
    if (lightLevel != lastLightLevel) {
    // gw.send(msg.set(lightLevel));
    lastLightLevel = lightLevel;
    }
    delay(1000);
    // gw.sleep(SLEEP_TIME);
    }

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    The sensor is like the LM 393 and it is the analog output sketch.

    When using the Arduino IDE serial monitor:
    If I make my own sketch from scratch or use the Arduino example sketch to read analog output, I get a reading from the sensor. If I use the example MySensors sketch and disable all the commands with gw in them, I can get a reading as well. However, when I use the MySensors related commands including gw.begin, I get nothing on the serial monitor.

    I am having similar issue with a soil moisture monitor.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    Further update:
    When connecting the monitoring gateway to the serial monitor I see "Started" and if I send a message from MyMQTT on Android I see the message. So the gateway portion and the ethernet portion are working. Cannot confirm radio is working yet.

    On my light sensor I can build a sketch that doesn't use MySensors and I can read the light level on the serial monitor. When I use MySensors, I get nothing on the serial monitor. Debug is enabled on myconfig. I'm not sure at which point in the process the failure occurs since nothing prints to the serial monitor.

    I haven't added any capacitors to the radios. I saw that this could help with signal but I'm not sure this is the issue since the two device are 2-4 feet from each other.

    Is it safe to assume that if the radio connection was the problem, that I would received some kind of feedback about not being able to connect on the serial monitor?

    Thanks

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    Small update.
    Plugged the MQTT Controller with MQTT Gateway sketch into the serial monitor and I am getting some information on the monitor. It looks like gibberish which I thought would normally be fized by adjusting the baud rate (started with it on 115200) but trying all the settings gives similar results. However I can publish a message with MyMQTT on android and it does seem to react. So I am still thinking it is my sensors with the issue.

    Troubleshooting

  • Nothing on serial monitor on MySensor sketches
    H hooraysimpsons

    Hello,

    I am trying to setup a sensor network connected by MQTT Gateway to Open Hab.

    I started with codebender and was unsuccessful so now I am using the Ardiuno IDE. I have been testing the soil moisture and light level sensors thus far. If I upload the LED Blinking sketch, the LED on my Pro Mini blinks. If I upload the basic Arduino Serial Analog output sketch then on serial monitor I get values that fluctuate depending on light level. If I upload the MySensors light sensor sketch (and change baud rate to 115200) I get nothing on the serial monitor. Similarly if I upload the soil moisture sketch I get no response on the serial monitor. Myconfig.h has #define DEBUG in it.

    I think my MQTT Gateway is working because I can connect to it from MyMQTT on my Android. OpenHab isn't really giving me any indication it can or cannot connect to the broker.

    Any thoughts? Right now I am assuming my sensors are the issue but without any output on the serial monitor, I'm unsure.

    Troubleshooting

  • Gateway NRF24L01+ 2.4GHz Wireless Transceiver vs. NRF24L01+PA+LNA Antenna version
    H hooraysimpsons

    Is there any reason not to use the NRF24L01+PA+LNA Antenna version radio on the gateway to help increase operational range of the devices? This seems like it would be easier to troubleshoot issues than having repeater-sensor nodes (especially since using sleep options in the repeater nodes may cause issues which would make battery powered ones difficult).

    Thanks for the input.

    Hardware
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular