logo elektroda
logo elektroda
X
logo elektroda

How do I change the IP in Domoticz on Windows 7 for access from other devices?

mateusz196 9945 38
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 17649009
    mateusz196
    Level 9  
    Tx to Tx rx to rx 3.3v and GND.
    I found something like this How do I change the IP in Domoticz on Windows 7 for access from other devices? .

    Maybe I can give resistors like here?

    Added after 16 [minutes]:

    How do I change the IP in Domoticz on Windows 7 for access from other devices? How do I change the IP in Domoticz on Windows 7 for access from other devices? How do I change the IP in Domoticz on Windows 7 for access from other devices? .

    Added after 1 [hour] 56 [minutes]: .

    I don't know what's going on still the same thing....

    Added after 1 [hour] 46 [minutes]:

    Successful. Had to make 2 valves between the pins. I will also describe this in the tutorial because I buried it on a Russian forum.

    Added after 48 [minutes]: .

    Do you know of a good diagram for wiring a momentary button to switch on this relay what I have above in the pictures? What pins to plug it into?
    So that in Domoticz, after switching on with the button, it displays that it is switched on and vice versa.
  • ADVERTISEMENT
  • #32 17650737
    mateusz196
    Level 9  
    What transistor would be suitable to control a 5v powered relay.
    The signal comes out of the esp8266 and is 3v. Control by means of a high state.
    When a 3v signal is given, will the 5v powered relay switch on.
    Regards
  • ADVERTISEMENT
  • Helpful post
    #33 17650759
    Slawek K.
    Level 35  
    E.g., BC337 and to this a diode antiparallel to the relay coil, of course a resistor at the base of the transistor.

    Greetings
  • ADVERTISEMENT
  • #34 17650832
    mateusz196
    Level 9  
    Any schematic :) ?

    Added after 28 [minutes]: .

    I plugged in and zFlashed the ESP. I put in the relay and it does not switch it on. I checked with a meter and when I pressed the switch in Domoticz, 3v of voltage appears on the GND and Gpio 0 pins. But the relay does not respond.
    Have you ever had this problem?
  • #35 17651340
    Slawek K.
    Level 35  
    Esp has 3.3V logic, everything is ok. I hope you didn't connect the relay directly to the pin.
    Here you have e.g. a wiring diagram for the relay http://nettemp.pl/forum/viewtopic.php?p=2670#p2670 , admittedly the diagram shows a raspberry, but you connect to the esp identically.

    Best regards
  • #36 17651415
    mateusz196
    Level 9  
    Not under pin. I have as above in the picture you can see a relay with a place for ESP but it doesn't work I programmed 2 pins of Gpio and still the same. I'm going to buy a Wemos and some relays because I'm already getting nervous.
    Does the Wemos control the relays with a low or high state?
  • ADVERTISEMENT
  • #37 17651486
    Slawek K.
    Level 35  
    It depends on the logic of the relay, you can go either way. In the example as above, the relay is switched on with the high state, which does not mean that the output circuit will be closed because relays usually have the possibility of NO and NC operation, it all depends on the connection. With an NPN transistor (as above) and connecting the circuit to the NO contacts, it will be switched on with the HIGH state.

    Greetings
  • #38 17651493
    mateusz196
    Level 9  
    Is it possible to do something with my relay? I only feel sorry for the money, because it was bought on one of the Polish auction sites and did not cost 3.6 PLN but 36 PLN....
    It was supposed to be a learning tool, but it turned out like this.
    I use the esp meter to check and it shows 3v when switched on. I supply the relay with 5v to the contacts.,I put the esp in the gold pin connector where it belongs,,but the relay does not respond. Can I somehow unsolder it to bypass these circuits what are with the relay on the board? As for the transistor I can't buy it anywhere right now.... Any ideas why it won't move?
    If I touch to the relay from underneath the 5v turns on and the diode also.

    Added after 7 [hours] 14 [minutes]: .

    I ordered something like this
    | D1 mini-Mini NodeMcu 4 m bytes Lua WIFI Internet of Things board development based ESP8266 WeMos
    https://s.click.aliexpress.com/e/bI9ePcbA

    This will drive my relays Via domoticz? .
    Relays I have ordered and for low and high state.
  • #39 17821133
    arek611
    Level 11  
    mateusz196 wrote:
    What transistor would be suitable to control a 5v powered relay.
    The signal comes out of the esp8266 and is 3v. Control by means of a high state.
    When a 3v signal is given, will the 5v powered relay switch on.
    Greetings
    .

    E.g. you can use the popular MOSFET N -2N7002, NDS7002A in SMD SOT-23 housing or 2N7000 in THT TO-92 housing.
    Max loss power 0.2W to 0.4W, and Nexperia even 0.83W in SOT-23,
    Max drain-source voltage Uds-60V,
    Max drain current 2N7002: Id-0.115A, marking 702 or 7002,
    Max drain current 2N7000: Id-0.2A, marking 2N7000,
    Max drain current NDS7002A: Id-0.28A, marking 712,
    Input capacitance important in terms of switching, short pulse control and series resistor and control output resistance Ciss-50pF or 60pF depending on manufacturer.
    Relay to + 5V and to Drain (D). In parallel to the relay a fast switching diode e.g. 1N4148, Cathode to + 5V, Anode of diode to Drain of transistor. Gate (G) of transistor via 10k series resistor to input from control circuit, and Gate (G) also connected to GND via 100 kOhm resistor. Transistor source (S) to circuit ground.
    If the circuit does not want to switch the relay on, reduce the series resistor from 10 kOhm to 1 kOhm. Resistor 100 kOhm between ground and transistor gate unchanged.
    Alternatively, do not move the 10 kOhm series resistor but increase the resistor between ground and gate to 1 MOhma (this will increase the time for the transistor to switch off after the control voltage has disappeared to a maximum of 14us).
    The series resistor protects the control output from damage in the event of a transistor failure and should be as large as possible. The value of a series resistor of 10 kOhm at short-circuit (breakdown of gate circuit to GND or drain of a transistor) results in current flow at the level of 5V/10 kOhm= 0.5mA, i.e. such a current does not pose a risk of its overload or control system damage. For a 1 kOhm series resistor, this current would be 5 mA, which is also a safe value. The loss power of both resistors would be at least 0.1W. These would be resistors in housing: SMD 0805 or THT 0.125W.
    Time after which at the gate of the transistor the maximum voltage from the output of the control system would appear =0.7*10k*60pF=0.42us=420ns.
    Time after which 5V would appear on the output of the transistor, the relay would be switched off when for ambient temp.=25st.C,
    Uoff min=Ug<2,5V.
    Uon=Ug, (Ug-Uoff min)/Ug= (3V-2.5V)/3V=0.5/3V=0.1667,
    Toff max = 0.7*100k*60pF=4.2us,
    Toff min=Toff max*(Ug-Uoff min)/Ug= 4.2us * 0.1667=0.7us.
    for Uoff min=Ug<2V, Toff min=Toff max*(Ug-Uoff min)/Ug= 4.2us* (3V-2V)/3V=4.2us*1V/3V=4.2us*0.3333=1.4us.
    As can be seen, for a higher gate turn-on voltage (Ug=2.5V) at which the drain current (relay coil) stops flowing, the turn-off time is shorter than for a lower gate turn-on voltage (Ug=2V). The exact turn-on voltage of the transistor can be read from the diagram for a temp. of 25 st C, and Id=2/3 max Ip, Ip max =36mA i.e. for Id of about 20mA and Uds=5V.
    A transistor turn-off time of about 1.4 micro seconds is good even for a fast control voltage drop, turning off the transistor. The faster it is, the also the circuit will draw less energy from the power supply and less energy will be released in the drain circuit of the transistor.
    The value of the gate control voltage of the transistor for u ster=3V and res. Rszer=10k, and Rrozł=100k. Ug= 3V*100k/(10k+100k)=2.72V. Generally the power supply standard for digital MOSFETs or TTLVs is 3.3V, not 3V max 3.63V i.e. for u ster=3.3V Ugmax=3V.
    If the circuit will operate at positive temperatures of approx. 20-25°C, a voltage of even 2.7V is sufficient to switch the relay, the coil of which should have a resistance for 5V supply of approx. 140-150 Ohm, which means that the maximum current of the relay would be approx. 36mA.
    SMD SOT-23 transistor leads:
    From the left p., reading the circuit designation on the case, Gate (G) is on the left p., in the middle is Drain (D), on the right is Source (S).
    An SMD transistor in a SOT-23 housing (TO-236AB) may have 702, 712, 7002, 12% written on the housing, this is called Marking.
    Leads of a transistor in THT TO-92 housing
    From the left p., reading the circuit designation on the housing, Source (S) is on the left p., in the middle is Gate (G), on the right is Drain (D).
    A 2N7000 transistor in THT TO-92 housing may have 2N7000 written on the housing this is called Marking.
    Link to a pdf of the 2N7000 and 2N7002 from ON Semi:
    https://www.onsemi.com/pub/Collateral/NDS7002A-D.PDF
    link to a pdf of the 2N7002 by Nexperia:
    https://assets.nexperia.com/documents/data-sheet/2N7002.pdf
    It is also possible to use N-P-N bipolar transistors, e.g. from the BC546 to BC550 series; they differ in max. voltage Uce from 30V to 80V, current Ic-100mA or BC337 to BC337-40 differ in current gain, Ic-0.8A.
    The 2N7000(2) circuit is better due to lower turn-on losses (lower voltage Uds, it is much faster and does not need a large control current to support the turn-on of the transistor/relay and is equal to the leakage current through a 100 k shunt resistor with Ug=3V (for Uz=3.3V) i.e. Ister=3V/100k= 0.03mA.
    In the case of a bipolar tr., Ister=3V-0.7V (for Ube ON)/1k (Rszer)=2.3V/1k=2.3mA. It would be possible to give a larger Rszer, but this would result in a larger Uce, i.e. there would be a smaller voltage on the switched-on relay, which could result in its uncontrolled switching. Decreasing Rszer, in turn, would cause a larger load on the processor control terminal and a deterioration of the separation between the control system and the relay, which could result in its damage when the transistor switching the relay is damaged.
    Link to pdf of BC546-BC550:
    https://www.sparkfun.com/datasheets/Components/BC546.pdf
    link to pdf of BC 337
    https://www.onsemi.com/pub/Collateral/BC337-D.PDF

Topic summary

The discussion addresses changing the default Domoticz IP address on Windows 7 from localhost (127.0.0.1:8080) to a local network IP for access from other devices. It clarifies that 127.0.0.1 is the loopback address and to access Domoticz from other devices, one must use the computer's local IP assigned by the router. For external access outside the home network, port forwarding on the router and a fixed external IP from the ISP are necessary. Mobile internet connections often lack the capability for direct external access due to client-mode restrictions. VPNs or intermediary cloud services can be alternatives but have limitations. The conversation also covers hardware setup recommendations: using Raspberry Pi 3 B+ with Domoticz and ESP8266-based devices like Wemos D1 mini running ESPEasy firmware for sensor and relay control. The Wemos boards can control multiple relays and support physical buttons for local control, communicating over WiFi with Domoticz. Relay control requires appropriate interfacing, typically using transistors (e.g., BC337) and protection diodes to switch 5V relays from 3.3V ESP outputs. Flashing ESP8266 modules may require correct wiring (RX-TX cross connections) and sometimes resistors for voltage level adjustment. The discussion highlights that Domoticz on Windows is suitable for learning and virtual sensor setup, but for production, a Raspberry Pi or Debian-based mini PC with stable storage is recommended. The use of Sonoff devices is mentioned but with caution regarding power supply isolation. Overall, the thread provides practical guidance on network configuration, hardware interfacing, and software setup for home automation with Domoticz and ESP8266 devices.
Summary generated by the language model.
ADVERTISEMENT