logo elektroda
logo elektroda
X
logo elektroda

Sonoff Basic with AFE Firmware & DHT11 Sensor: How to Add to Domoticz using MQTT or HTTP?

waluszek 7065 9
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16958288
    waluszek
    Level 19  
    Hello, I fight and fight but probably not from what I need to approach this.

    I have sonoff basic with preloaded AFE software, connected to the GPIO14 pin DHT11 temperature + humidity sensor, the whole set is connected to my wifi, has an ip address and so on.

    However, I do not know how to add it to Domoticz. I created "Dummy" but I don't know what to do next to run it, did anyone configure it?

    AFE can communicate via MQTT or HTTP. but I have no idea how to add it to Domoticz.

    Domoticz stands on a separate server on debin.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 16958508
    waluszek
    Level 19  
    I went through this page before I wrote the post, this is the AFE software author's page. Unfortunately, there is no hint on how to integrate it with domoticz.
  • #4 16958571
    tronics
    Level 38  
    Probably just like ESPEasy, etc. You do dummy sensor / switch or whatever you need, you save IDX and in the configuration of the Sonoff device you provide the domoticz address and idx (and possibly authorization data)
  • ADVERTISEMENT
  • #5 16958663
    waluszek
    Level 19  
    So sonoff is supposed to send data to domoticz and not the other way around?
  • Helpful post
    #6 16991501
    tschaban
    Level 2  
    hi - here the author of AFE ;)

    1. In Domoticz you go to Configurations -> Equipment
    2. Add new Dummy equipment
    3. It will appear in the list at the top
    4. There is a link: Create virtual sensors
    5. Choose the type of sensor: Switch + give it a name - and press OK
    6. Now you should have the switches tab - you go to it
    7. You should see the new switch with the name you gave in point 5 above
    8. Press Edit
    9 There are 2 fields Enable action / Disable action
    10 You must enter http on / off commands to them

    You have them described here
    https://www.smartnydom.pl/afe-firmware-pl/integracja/http/

    example

    enable action: http://192.168.2.100/?device=relay&name=switch&command=on
    disable action: http://192.168.2.100/?device=relay&name=switch&command=off

    For now, AFE has unidirectional sonoff control, i.e. from Domoticz to Sonoff
    Sonoff does not send any information to Domoticz - a topic ahead of me to do.

    If anything, I invite you to the forum dedicated to AFE
    https://www.smartnydom.pl/forum/firmware-do-przelacznika-sonoff/

    Best regards, Adrian
  • #7 16991736
    waluszek
    Level 19  
    Thank you very much for your answer. It works :)
  • Helpful post
    #8 16991823
    tschaban
    Level 2  
    great - I have to add some extra data to domotics - relay status, sensor values, etc.
    it will take a while for me, because evenings do not allow many hours for DIY
  • ADVERTISEMENT

Topic summary

The discussion revolves around integrating a Sonoff Basic device with AFE firmware and a DHT11 sensor into Domoticz using either MQTT or HTTP protocols. The user initially struggles with the setup but receives guidance on creating a Dummy device in Domoticz, configuring it to send HTTP commands to control the Sonoff device. The integration is confirmed to be unidirectional, meaning the Sonoff device can be controlled from Domoticz, but it does not send data back. Additional integration for sensor values and relay status is planned for future updates.
Summary generated by the language model.
ADVERTISEMENT