Navigation

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

    Zed

    @Zed

    0
    Reputation
    16
    Posts
    633
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Zed Follow

    Best posts made by Zed

    This user hasn't posted anything yet.

    Latest posts made by Zed

    • ESP8266 - 07: What are the correct connections for deepsleep? (SOLVED)

      This is mostly an ESP8266 related question. However, since my goal is to adapt this sensor for uses with the MySensors library I thought I could try finding some support here also.

      Long story short, I am building an ESP8266 based mailbox sensor, loosely following the post found here. The concept idea is to have the MCU in deep sleep forever until it is reset by the reed switch. Then the MCU wakes up, connects to the Internet and sends a message.

      0_1487099147550_circuit_updated.png

      Above you can see my circuit schematic. Based on my previous ESP8266-01 experience I have:

      • VCC and CH_PD pulled up with 4k6 or 10k resistors
      • GPIO0 and GPIO2 pulled up with 4k6 or 10k resistors
      • tact buttons in order to be able to flash the mcu with the same board
      • GPIO16 connected to RST in order to wakeup from deep sleep.

      I realized that it is impossible to wake from ESP.deepSleep(0) using the magnetic reed switch, except if I disconnect GPIO16 from RST. I suppose that the GPIO LOW is not low enough to reset the mcu, because RST is pulled up to VCC. Correct?

      Of course after disconnecting GPIO16 from RST, it is not possible any more to wake up from a predefined period deep sleep (in case that this is needed), e.g. ESP.deepSleep(1000).

      So I am wondering... Is it necessary for ESP8266-07 (or 12) to connect GPIO16 to RST (like we do for esp-01) in order to be able to use the deep sleep function for a predefined time period? Could someone propose how the ESP07 should be connected correctly? There is a lot of contradicting info on the Internet.

      *SOLUTION: The trick is to add a (schottky) diode between the RST and GPIO16 (see updated circuit). With this configuration it is possible to wake up the mcu from esp.deepsleep(0) by either pressing the tact button or by opening the magnetic switch. It is also possible to wake up from predefined sleep time esp.deepsleep(time). The 470 Ohm (or 1K) resistor also works, but it depends on the neighboring component values. The diode is more well defined.

      posted in Hardware
      Zed
      Zed
    • RE: id request fails

      As you can see here I had a similar problem. In my case the problem was that the RF module of the gateway did not work properly. I changed it (without adding any caps etc) and after that the nodes got their IDs immediately.

      You may add a capacitor to the gateway too. However, in my opinion the capacitor treatment for everything is a little bit overrated.

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      Everything works now. I made another Ethernet gateway using an Arduino Uno, a compatible Ethernet Shield and a RF24L01+ module without the antenna. Now the sensors get their reply from the gateway and they report to Domoticz seamlessly.

      It seems that the problem was with the antenna version RF24L01+ module I was using. Probably it got destroyed when I replaced its pins.

      Some guidelines for troubleshooting that may help others:

      • check that the power supply is good enough. If you are using one of these cheap breadboard power supplies with the ams1117 regulators, check that you provide enough voltage for the regulators to work properly. Do not expect from a capacitor to save you from a faulty power supply, especial when you use batteries. Have in mind that some of these supplies are shipped with faulty regulators and provide as high voltage as their input.
      • verify that the Ethernet module works properly. Just upload a simple sketch and get an IP. eg. test this.
      • verify that the nrf24 modules work properly. You can try this. Actually a test circuit to check the RF modules before using them may save you a lot of time.
      • Get the latest mySensor sketches from github.
      • Use MYScontroller to monitor the messages the getway and the sensors exchange.
      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      @hek Probably this is not the case. I downgraded everything to 1.4.1. Now on the sensor serial monitor I get:

      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 31.30
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      H: 38.50
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 31.20
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      H: 39.70
      

      If understand it correctly the sensor still is not able to get an ID from the GW. Probably I will make a serial gateway in the following days for testing.

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      @hek No, I didn't change anything. Should I?

      I am experimenting now with MYSController. I send a version request to the gateway and I get a proper reply.

      8/3/2015 20:18:04	TX	0;0;3;0;2;
      8/3/2015 20:18:04	RX	0;0;3;0;2;1.5
      

      (If I ask for the sketch name or version I do not get a reply)

      I am suspecting that the radio module of the gateway may not work properly. Is there a way to check this without de-soldering the module and replacing it by another one?

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      I still have some trouble... Although this seems like a Domoticz question, I'll post it here because I think that the problem is related to my Ethernet GW and not to Domoticz.

      So, I upgraded my GW to mySensors 1.5 and I made a Temperature/Humidity sensor as it is described here using a DHT22. On the serial monitor I get:

      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      sensor started, id=255, parent=255, distance=255
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      T: 31.00
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      H: 44.40
      
      

      I don't really understand the message (could someone explain a little bit), however I suppose that the sensor works. Then, on the serial monitor of the ethernet gateway I get:

      0;0;3;0;9;gateway started, id=0, parent=0, distance=0
      

      On Domoticz I have added the Ethernet GW to the hardware list. However when I open the web interface i see the following:

      Screen Shot 2015-08-03 at 5.40.27 PM.png

      and in the log I get:

      2015-08-03 17:03:45.650 Domoticz V2.2657 (c)2012-2015 GizMoCuz
      2015-08-03 17:03:45.758 Sunrise: 06:31:00 SunSet:20:31:00
      2015-08-03 17:03:45.763 Active notification subsystems: (0/8)
      2015-08-03 17:03:46.164 Webserver started on port: 8008
      2015-08-03 17:03:46.171 Webserver started on port: 443
      2015-08-03 17:03:46.172 Hardware Monitor: Started
      2015-08-03 17:03:48.509 Incoming connection from: 127.0.0.1
      2015-08-03 17:03:49.837 Incoming connection from: 192.168.1.14
      2015-08-03 17:03:50.191 MySensors: connected to: 192.168.1.152:5003
      

      Questions:

      • Does the GW message mean that the GW is not working properly?
      • I've set the IP of the GW to be 192.168.1.152 and Port 5003. Does this mean that the same port has to be free on the server side?
      • What is the inclusion button. Do I have to add it to the GW?

      So, any suggestions for troubleshooting? :bowtie:

      PS: Configuration summary
      Arduino IDE: 1.6.5
      OS: Mac OS X Yosemite 10.10.4 (for the sketches) and Windows 10 for Domoticz
      MySensor Library: 1.5

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      @rvendrame No, I have not measured the DC adapter with full load on it. I will do it in the following days and I will report my findings.

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      Not as tidy as other gateways, yet its something. I got bored and didn't open holes for LEDs. I'll do it after I am sure that it works. For the moment I am able to ping it successfully. I am thinking now that an Arduino nano is more appropriate for a GW. The USB port can be used to monitor and reflash the gateway.

      IMG_3371 (1).jpg IMG_3372.jpg

      PS. I am pretty sure now that the power supply was the problem. The AC to DC unit that I was using (12V) could provide just 0.5 Amps an probably this is not enough for all the components to work properly. Has anyone measured what is the max current required from such a GW?

      posted in Troubleshooting
      Zed
      Zed
    • RE: MQTT Gateway - Stuck on "Started!"

      @siod No, I did not change anything. The only thing that I can think of is that the supply voltage (~3.3V) could be marginally enough and due the consumption of the cheap regulators that the unofficial boards have.

      posted in Troubleshooting
      Zed
      Zed