Domoticz and MicroPython

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz and MicroPython

Post 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
Last edited by LucVolders on Saturday 18 November 2023 18:19, edited 1 time in total.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz and MicroPython

Post by kiddigital »

Nice. Thank you
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz and MicroPython

Post 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
rwblinn
Posts: 72
Joined: Wednesday 10 June 2015 21:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 4
Location: Hamburg (Germany)/Middelburg (NL)
Contact:

Re: Domoticz and MicroPython

Post 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/
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz and MicroPython

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest