Archive for July, 2017

Winter chill.

Posted in Linux, ODROID-C1, Orange Pi on July 30, 2017 by asteriondaedalus

So far so good.

OPiZ has run for 12 odd hours with temp reporting, node-red and emqttd up status running on OPiZ, emqttd up status running on PC and PC pinging OPiZ.

I note that, because this is winter, and we snuggle under a couple of doonas during the night, heating in the house is off.

That meant the temp of the OPiZ dropped to 59degreeC from the 62degreeC it peaked at yesterday.

I note also that the memory watch I ran on the OPiZ via TeraTerm was fine.  The free memory was oscillating around the same value that it was around 12 hours ago.

So, who knows, is it a temperature related thing that causes the ethernet to drop its connection?

Odd that there are complaints on the net about heat problems with the OPiZ, the OPi series in fact, but they don’t bother to 1) provide heatsink with the devices 2) tune the device to run slower out of box since that will drive the operating temperature down and because there is no heatsink provided.

Mind you, I have also found 6x6mm Peltier coolers so who know how silly this could get.

Or, I guess, play with a jar of mineral (baby) oil.

The server needs to provide Mission Critical level functions for running the house.  So it stands to reason that either I get this sorted or drop the OPiZ and go back to ODROID-C1.

Advertisements

So hot!

Posted in Orange Pi on July 30, 2017 by asteriondaedalus

I stuffed the following into a node-red exec node:

cat /sys/devices/virtual/thermal/thermal_zone0/temp

Every minute I will now get a temp reading of my OPiZ to my node-red console.

At the moment the temperature of the OPiZ is running at about 61degreesC.

From chatter on the net this is hot but not a problem – but I will be taking delivery of heat sinks later in the week so that should see the temp drop somewhat.

Fine while the OPiZ stays running but it will keep a record of the temp and the round about time the thing stops.

I have a python based mqtt client listening on my PC for a topic set by node-red on the OPiZ.

I also have another python script on my PC pinging the OPiZ periodically to try to catch the time it drops off the ethernet.

Now even if the ethernet drops out I will still need parse the logs to see if the chip reset due to heat or was turning off devices due to heat.

I am also running the following, to monitor memory usage, on the Tera Term connection (3-pin serial):

sudo watch -n 1 vmstat -s

In any event, I have ample instruments to monitor the system to try to give hints at the behaviour (at least) of the ethernet drop outs that I have been seeing.

In the meantime I started poking around to try to work out how to get control of the CPU clocking as I might need turn down the clock speed to try to keep the OPiZ cooler – if that turns out  to be the problem.

Keeping an open mind in any event until I get some hints.

Punked it!

Posted in C.H.I.P., Networking on July 30, 2017 by asteriondaedalus

So, the joke I had with Mike Brady, the chap who maintains shairport-sync, was that the problem I was having with dropping of audio was that I was listening to my wife’s punk music.

The acid test for the fix I have used (basic interpolation and longer background buffer) was to pump The Living End to two of the C.H.I.P.

Voila!

2rooms

Of course, Madam was too consumed by her Sunday afternoon sitting of Criminal Minds to appreciate the success … so she told me to turn off the Backroom link.

So, the one for her office is ready, just needs some fiddling to fit the speaker on top of the storage cabinet.

I am now looking at setting up one in the gazebo in the backyard and one under the veranda in the front yard (we have a pool area in the front).

Thrashing by reboot a success

Posted in Linux, Orange Pi on July 29, 2017 by asteriondaedalus

So, I have left the OPiZ running for 24 hours, node-red and emqttd running, and rebooting every 5 minutes.

All is running.

So why the dropout of the system previously?

Now the experiment will be to remove the 5 minute reboot, just leave it running and either ping from my PC via a python app or set up a pass-through topic on emqttd to test for the OPiZ server being up.

The dropping of ethernet may be related to how long the system has been running.

It could end up a design problem, the OPiZ 2 has dropped ethernet.  I might yet have to relent and go to wifi – though this would be 1) against principle and 2) against the design I have set for my set up.

I do note one mention on internet of heat related problems with OPiZ and the ethernet.  So, in the meantime I am going to order me a gaggle of heatsinks.

Do di do di do di DOH~!

Posted in Linux, Orange Pi on July 29, 2017 by asteriondaedalus

So, yep, sure enough, I came back to the OPiZ and could not connect.

As I have the 3-pin serial connected I snuck a look and yep … route naught.

I rebooted, setup emqttd as a service, re-started the cyclic reboot task in node-red.

I will let that run a few days then I will have to try something else to work out when and why the lan connection is dying.

This is on a new Orange Pi Zero board that hasn’t had an expansion board inserted, and it is running the orangepi.org headless debian server.

I still can’t fathom how the difference between ethernet connection persisting and then being dropped procedurally is the installation of erlang/elixir/emqttd.

Worst case, I guess I can install Mosquitto.

Still, I cannot see the mechanism.

 

Around the buoy again …

Posted in Linux, MQTT, Orange Pi on July 27, 2017 by asteriondaedalus

So, after thrashing the nodejs, node-red, npm install for a few days (by rebooting every 5 minutes) we have decided those aspects were not causing the problems with the ethernet and usb devices collapsing.

I just began the next stage by installing erlang/elixir and have begun the chore of re-installing emqttd.

Go figure, it gets most of the way through it’s build and claps out.

Might be that the latest master called by git requires OTP 19.3+ and the apt-get for OPiZ returns OTP19.  So, I have ripped out the emqttd again and re-run git command but used an OTP 19 friendly branch emq20.

Voila!

emqttd builds on OPiZ running OTP 19 if you use the emq20 branch.

Now to bed.

I will look at setting it up as a service tomorrow night then pummelling it with reboots over the weekend.

Ah ha!

Posted in C.H.I.P., Linux on July 26, 2017 by asteriondaedalus

So.

I am now building the third C.H.I.P. with shairport-sync.

I went to look on the gateway admin page to check to see if the other two were still up.

Neither turned up in the wifi list.

Hmmm.

So I went to the iPad and sure enough, I could see and select the other two as Airplay targets.

So, I ssh’d in and I could connect to both  AND I could ping google.com from both.  That validates both that I can get out and the DNS setup is still working.

So, it looks like there is some bug in the gateway web admin since I can’t have internet access if something isn’t right.

Not sure if that relates though to the OPiZ story as that was definitely devices dropped.

Still, so many niggly confounding problems.

So, I will ignore them and build the third C.H.I.P. for Madam’s office.

What the!?

With the static IP set, the third C.H.I.P. can be seen on the gateway wifi list.  The only difference between the third C.H.I.P. and the other two is it is connected by USB to my PC for the setup.  Why on earth would that make a difference as to whether it is “seen” by the gateway list?

Okay, so I had deleted a network scanner off my Android phone when I found it had broken post an update.  I downloaded a new one tonight that similarly could only see the new C.H.I.P. attached to my PC???  I scrapped that one and downloaded yet another one and it could see all three C.H.I.P.???  Fracked if I know what is going on there.

Too dopey to bother with, no concern given I can still talk to board by USB and all other evidence is that, from the C.H.I.P. point of view everything is fine.