Showing posts with label raspberrypi. Show all posts
Showing posts with label raspberrypi. Show all posts

Saturday, 13 February 2021

Need a version control of IoT sensors, embedded docker containers

For a while now I have been building sensor software that runs on both Raspberry PI and embedded IoT platforms but I have a problem with deployment of versions.

For the embedded sensors I just just check every run for a new version and install but the problem is that it is an expensive operation as it take a few seconds for each run...

On the pi its a fully manual task that is either copying code or updating a container.

I want better :)


After looking at some of the code for Tasmota I think I found the start of how this will work.

Tasmota uses MQTT to send a subject to the device to inform it to update. This subject has the version number in it and if the current version is less the topic then it will update

I can make the PI also look at this topic for updates too.


Once I have the MQTT topic format sorted ( it will be similar to Tasmota ) then I will work on the PI to make it update a local binary file package, then make a docker controller to do the same in docker. Finally I will make a web site that allows for individual control of packages ( web, api and DB schema )

Sunday, 5 March 2017

Time for a little more Bacnet

Wow, time flies....
Just noticed that I am rocking it up to a year since my last post
And so what has happened since then, lots and not much

At work I have expanded my team and at home I have integrated a larger Bacnet device network

Now my Raspberry Pi has 5 DS1820 temperature sensors wired up all over the house and a EmonCMS power monitor connected up

All of these device are feeding back into our company's systems, as part of a 'test building'.
It has been very interesting to watch what the BuildingIQ software can do with just this information. I can now see what is going on at home, when power is being used and if its for AC/heating or just day to day living

So if your're interested then visit the BuildingIQ web site or keep watching here as I continue the journey of a DIY Bacnet server

Sunday, 6 March 2016

Bacnet stack and the Rasberry Pi

So its been a fast year and I have changed a lot in 12 months.
Having left the relative security of full time employment I decided to go DevOps contracting.

I did some fun gig's around Auto-scaling applications and databases in AWS along with extremely large test and dev environments for government orgs and Insurance industries.

I found the time I spent doing contracting to be very rewarding as I skilled up on how these types of organizations function.

Then I moved back to full time employment. Not because contracting was hard but more because something exciting and challenging came along.

That was when I got introduced to bacnet.

Now as you know I have done a bit with x10 over the years but it is now become difficult to continue doing this on small scale embedded devices.

Along came bacnet on Rasberry Pi. Just having watched a video  demonstration on setting up on Pi I thought I would give it a try.

So first step was to download the code, and it's hard to find a link
Then after reading the instructions I found that I needed to use version 0.7.1 of the stack. And that's old.....

So now I have migrated into using the latest version on github with the above patched in so enjoy the repo :)
https://github.com/jlcox1970/BACnet-Protocol-Stack

Saturday, 10 May 2014

Update to flight computers

I now have the second flight computer, a beagle bone black.

The problem is that for some reason they install Angstrom on it as a default OS. Really!

As I am a Redhat person due to my professional work I have decided to migrate both the BBB and RPi over to using either a Fedora or CentOS distro.

Saturday, 11 January 2014

Sending bi-directional data from serial port across UDP

One small issue on the glider.
How do I send data between the APM and the ground station economically.
I originally was using a TCP connection (ser2net) but was having issues with packet loss and connection drop outs. This  was a problem as each time I would have to reconnect and initialise the link. Not a good thing whilst flying.

So after a bit of research I have moved over to socat. One command and the link is up :)
 
scocat UDP-LISTEN:5761 /dev/ttyACM0,raw

So what does this do, it sets up a UDP server on port 5761 that is connected to the serial port ttyACM0.
This allows the ground control software to talk to the APM directly and if packets are drop,missing or wrong order they are ignored.
If this was TCP then each of these errors would cause a resend for the point at which the error occurred

Tuesday, 1 October 2013

The start of the avionics and vison computer systems

So it started out as balancing the plane. Testing showed that it required around 1.2Kg of weight in the front of the wings to get it nearly correct. Initially I had a single 12v Gel cell that was about right but latter found that due to its age it was failing under load. The solution was to get a pair of 12v 2A/h seal lead acid batteries. these cam in just under the required wight. 
That is ok as I need to setup a pair of switch mode PSU's. one for the servo control system and one for the on board computers driving the SSD and cameras. Initial static test are ok.
Soon the body will be done and the basic avionics will be in place for test flights.


Saturday, 21 September 2013

Power for the Glider

Just found the best little switch mode power supply from www.jaycar.com.au the KC5508 (oddly doesnt show on the web site)

It is a 1.2v to 20v 1.5A supply. Works a dream.

Saturday, 1 September 2012

Revival of a Raspberry PI

One of my work mates had a ROI that had no working USB or network. He sold.it to me for a small sum.
So when I got home I started to investigate and forms plenty of info on the net about bad joints on the 25Mhz crystal that drives the net/USB chip.

A quick touching with a soldering iron fixed the issue.

I so found that the old "A" series jumper is on the board so that you can just place a pair of solder.shorts and get back to having a single USB port to work with