Thank you everyone who attended my session at both DevConf Cape Town and Johannesburg I met so many awesome people during DevConf inside and outside of my session! Thank you for making DevConf 2024 the incredibile conference it was!
I’ve included the slides for those interested in building your own DIY Microscope, or something similar to help you with your own accessibility challenges. If you have an imaging device with some intelligence, there’s so many things you can do!
The project is using a Raspberry Pi 3B (4 and 5 works too). It is build using C# and .NET 8. The user interface is created using AvaloniaUI. There’s nothing better that Avalonia if you need to create small, incredibly fast user interfaces on Linux using .NET. I really recommend trying it out!
The backend is using Azure CosmosDB for storage. The MongoDB VCore Implementation. This is chosen for it’s vector search capabilities. Perfect for a conversational solution using OpenAI.
The whole premise of the talk was to inspire developers to think about using all these tech components in your toolbox. Both AI and IoT bits and use it for good. There’s so many solutions that could be created especially for accessibility, to make people’s life a little easier. This is also exactly why I created this Microscope, to solve my own accessibility problems when building IoT solutions. Think about what you could do!
Thank you everyone who attended my session at both DevConf Cape Town and Pretoria I met so many amazing people excited about creating a more sustainable future.
This is a quick blog post which includes the presented slide deck. I hope attendees found the talk useful. It’s a very broad topic and fitting months of content into 40 min is a little challengening. So the presentation is a broad overview of the completed farming project project and there’s links to more deeper content within the slides. This includes content and github repositiories with some source code examples. The plan is to also release ALL the content eventually as a full OSS project when I’m happy with it, including the Mobile App and integrations with the cloud components. I’m currently rounding everything off to do this. So expect a few more posts about this and source code.
There is also Agri hacks planned where we can hack and learn about this topic together over a few sessions where you can learn hands on how to build something like this project. This will be a free to attend event held at @CPTMSDUG in Cape Town. Keep an eye out here: https://www.meetup.com/cape-town-ms-dev-user-group/events/
I received so many questions on how to get started. I suggest getting the off the shelf kit I mentioned in the talk that I started with. It contains everything you need to grow your first plants. This is also an indoor grower, so you can start with growing from seeds indoor and not worry about weather and protecting the electronics against sun and water. It will also make your home office a lot prettier. π
What’s in the kit
Arduino
4 x Solenoids (for 4 plants)
4 x Relays
4 Moisture Sensors
1 Pump
Silicon Piping
The kit is great to learn with as it’s not a “black box” watering system. It’s an arduino where Elecrow provides the source code to flash onto the arduino. It works out of the box, but it also allows you to learn from it and also make changes.
Please don’t start by hacking it like I did. I decided it should to be connected to Azure IoT. That’s definitely not needed especially when starting out. But the instructions are there if you want to do that too. π
For the beginner this is great and as you could see in the talk, once plants start multiplying, you are forced to scale from there. π
It’s now been many months of eating some really good and fresh produce. I’m going to declare the IoT exeperient and learning a success. Next step is to package it into a Sustainable Hack Series that anyone can build.
It’s time to start moving the indoor IoT Farm to being an outdoor IoT farm. The idea I have is to do some experimentation and research into creating automated constrained space farms. I’m going to turn this into a hands on hack series for the CPTMSDUG user group and also share the learnings. Hopefully it goes well. π
Today was the big shopping day to get everything I need.
Shopping at the nursery with the much needed coffee.
Some nice wooden planters from the Pole Yard.
Preparing the soil
The offerzen Basil that was grown at a hack event was planted
Getting there
The first evening of the indoor crop being outdoors
I hope you enjoyed the Microsoft Developer Cloud Summit today! Thank you very much for attending my session: Automating your home or office with IoT Central and Power Apps” It was a lot of information in 30 min, so here’s the content, resources and source code.
This whole session was done using Home Automation devices combined with OBS. Camera Scene changes were controlled with a standard home remote control. So automation doesn’t have to be traditional garage doors or lighting, you can control you PC life too! π Controlling your OBS Scenes with a Home Automation device
I came across this Smart Watering Kit by Elecrow. It was really great, but one thing missing is internet conectivity. We all know that we can’t grow plants without the “I” in IoT! So let’s see what we can do about that!
Electrow Ardunio Smart Plant Watering KitInside the box
The kit comes with everything you need to water four different plants automatically.
The box contains
Arduino Leonardo
Power Supply
Pump
4 Capacitive Moisture Sensors
4 Way valves
Pipes
The kit is very comprensive and includes and LCD display which can show at a glance the conditions of your plants.
The boardSerial Port
The board unfortunately does not have built in wifi connectivity. But what it does have is a serial port. That’s perfect, so what we could do is use that to send telemetry out to another device that is internet / wifi enabled.
A good device for that is a good old (and cheap) 8266 board. I had a NodeMCU in my box of tricks, so I decided to use that.
Parts List
Arduino Smart Watering Board (Arduino Leonardo)
NodeMCU board
2.2 K ohm resistor
1 K ohm Resistor
470 ohm Resistor
Breadboard
Wires
Power Supply
Connecting an Arduino Leonardo to a Node MCU via Serial Port
First step is to make it work on a breadboard.
Parts List
Arduino Smart Watering Board (Arduino Leonardo)
NodeMCU board
2.2 K ohm resistor
1 K ohm Resistor
470 ohm Resistor
Veroboard
Wires
Power Supply
Connecting an Arduino Leonardo to a Node MCU via Serial Port
Once working, the next step is to build that onto a more permanent solution. I decided to use just veroboard as it was quick and easy.
Two boards up and running
IoT Central
Device Templates
Device Capabilities
Create device capabilities for the moisture sensors as telemetry (Moisture1, Moisture2, Moisture3, Moisture4). [Device Definition json file is in the github repository along with the source code]
Create properties for the 4 relay states for each of the 4 valves. [Device Definition json file is in the github repository along with the source code]
Create a property for the pump state. [Device Definition json file is in the github repository along with the source code]
Publish the template and create an instance of the template as a device.
Instance of a device template
Note the “connection” information for the new device instance.
Device “Connection” information
Take note of the following:
Scope ID
Device ID
Primary Key
iotcserialrelay.ino
Update the iotcserialrelay.ino file with the:
WIFI_SSID – The wifi hotspot ssid
WIFI_PASSWORD – The wifi hotspot password
SCOPE_ID – The Device Instance’s Scope Id
DEVICE_ID – The Device Instance’s Device Id
DEVICE_KEY 0 The Device Instance’s Key
Deploy iotcserialrelay.ino to NodeMCU.
Deploy watering_kit.ino to the Arduio Smart Watering Board.
Telemetry in IoT Central
Once deployed and connection is made, telemetry starts appearing within IoT Central’s dashboard.
Finished Product with happy plants powered by Microsoft Azure ππ
You can easily set up a standard 433 Mhz remote control that you use every day in your home to control scenes in OBS (Open Broadcast Software) if you don’t own a fancy Stream Deck.
All you need is a remote, a 433 Mhz Wifi Bridge and some Node-RED magic.
Node-RED Switch using button codes to control flow
The 433 Mhz Bridge when it detects a signal, it publishes a message with it’s contents via MQTT. These will have codes attached to them and in the case of a remote, that code / data that is sent via the message payload translates to the button pressed. You can “train” your solution with the remotes you have. These can be standard house-hold remotes.
Scene flows per button press
The switch statements routes the flow based on the button data to a specific function.
Scene switch command to OBS Socket Server
The function sends a message with the “scene-name” with the parameter of the scene created in OBS.
Scenes in OBS
For additional commands refer to the protocol document:
Device Definition json file is in the github repository along with the source code. This can be imported into Azure IoT Central and the views generated.