Skip to content
/ m5home Public

simple use of MQTT to show some data of my FHEM on the Core2

Notifications You must be signed in to change notification settings

hjgode/m5home

Repository files navigation

m5home

simple use of MQTT to show some data of my FHEM on the Core2

Here are my experiments with the micropython implementation :-( by m5stack in the Core2. Bad documentation (https://docs.m5stack.com/en/mpy/advanced/mqtt), incomplete Micropython modules, bad REPL.

main

The first (main.py) uses M5MQTT client and I needed to implement a new callback and subscription for every data I want to consume and show in the app. The app also shows the slow image processing, although the image page I designed is able to show 8 values on the small screen with a nice UI.

main_umqtt2

The second (main_umqtt2.py) used simple2.umqtt and now robust2.umqtt libs I found luckily (https://github.com/fizista/micropython-umqtt.robust2). Here I only use simple UI elements like text and switch. Only two subscriptions and one callback function to be uesd :-)

So, the second one is easier to maintain. The data is 're-directed' inside the callback to the right UI.

Both apps use different screens that are loaded by pressing the left and right soft button on the Core2.

Both apps also have a idle timer to dim the display after 15 seconds.

You will find some special things like how to get the local IP, the RSSI of the AP and more.

About

simple use of MQTT to show some data of my FHEM on the Core2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages