Page 1 of 1

Domoticz and MicroPython

Posted: Sunday 05 November 2023 19:39
by LucVolders
Anybody interested in controlling Domoticz buttons etc and sending sensor data to
Domoticz can follow my series on Domoticz with MicroPython.

I am using the chepa Raspberry Pi Pico W microcontroller to send and receive data to and from Domoticz
and it is programmed in MicroPython which is easy to learn for everyone.

You can exchange the Raspberry Pi pico for an ESP8266 or ESP32 as they also run
MicroPython.

This is the first in a series of 4 stories.
http://lucstechblog.blogspot.com/2023/1 ... art-1.html

For clarity. This is direct communication between a microcontroller and Domoticz. No MQTT server needed.

Have fun,
Luc Volders

Re: Domoticz and MicroPython

Posted: Tuesday 07 November 2023 6:58
by kiddigital
Nice. Thank you

Re: Domoticz and MicroPython

Posted: Wednesday 08 November 2023 22:48
by LucVolders
Part 2 is now up on my weblog.
This time build a virtual switch in Domoticz and pressing that switch sets a led that is connected to your microcontroller (Raspberry Pi Pico, ESP8266 or ESP32) on or off.
The led is just for demonstration. Replace it with a relay and you can switch lights, fans, pumps etc. on or off.
Again done in MicroPython

http://lucstechblog.blogspot.com/2023/1 ... art-2.html

Have fun,
Luc

Re: Domoticz and MicroPython

Posted: Saturday 11 November 2023 18:16
by rwblinn
Nice write-up. Thanks.

As FYI started earlier this year exploring the Raspberry Pi Pico W with Domoticz.
viewtopic.php?t=40244

Currently working on a (just-for-fun) Make project, Lighthouse65, using bricks, with actuators and sensors connected to the Pico W webserver and controlled via Domoticz running on a Raspberry Pi 4 (bookworm).

It is based on this project I developed - but changed using the Pico W as webserver instead BLE:
https://www.b4x.com/android/forum/threa ... 65.155064/

Re: Domoticz and MicroPython

Posted: Saturday 18 November 2023 17:33
by LucVolders
Part 3 and 4 are up now.

Part 3 Sending data like temperature etc. to Domoticz
http://lucstechblog.blogspot.com/2023/1 ... art-3.html

Part 4 Sending slider data etc from Domoticz to your microcontroller
http://lucstechblog.blogspot.com/2023/1 ... art-4.html

Please notice that the code is in MicroPython so almost universal for ESP8266, ESP232 and Raspberry Pi Pico W.
The only thing to change are the pin numbers where the led and button are attached to.

For clarity. This is direct communication between a microcontroller and Domoticz. No MQTT server needed.