So far so good

Posted in MQTT, node-red, Orange Pi, Python RULES! on August 2, 2017 by asteriondaedalus

OPiZ is still up.  So I have avoided the hiccup of ethernet dropping out somehow.  I am always queasy when the problem just “disappears” but small mercies right?

The only thing that I noted was that, when the system has dropped its ethernet, I have not had a console connected.  So I have shut down the TeraTerm session, that was watching the memory usage, and left the device running now with the node-red and python test harnesses running.

We may be good now.   I hope I have properly documented the steps I went through.

PEP Project kick off

Posted in MQTT, PEP Project, WEMOS D1 R2 on August 1, 2017 by asteriondaedalus

So, I downloaded and installed and then run Arduino IDE 1.8.3.

I included the ESP8266 core.

I grabbed the blink example for the ESP8266 and bombed the WEMOS D1 R2.

We are blinking.

I then disconnected power and installed the ITD 2.8 inch touch screen shield (V1 I suspect).

I added power and led blinked PLUS I have back lighting on the LCD.

So far so good.

Next is grab and install libraries for the LCD to see what needs to be done on the WEMOS to port them.

Looks like some work to set up for the ESP8266.  Should be fun.

Errr … no.

I should have looked at this sooner as the ESP8266 does not have enough GPIO.  When you look more closely the UNO compatibility is met by sending the same signal to a couple of the arduino pins but for the most part you cannot run the TFT board on the WEMOS after all.

So,  I dusted off an old MEGA1280 to play with the TFT library.  No biggy, a little messy but might then look at simply adding a ESP-01 module to provide the MQTT client over the serial buss from the MEGA.  Once I get the hang of this I might as well order a couple to three mega2560+3.2 inch TFT from Aliexpress.

I can then set them around the house and front/back yards to control various things – for when I don’t have my phone on me.

Mind you, I also had to back date to Arduino 1.0.5 to program the MEGA1280.  I keep it around as it has been used to play with avrFORTH and OCCAM (except Plumbing doesn’t appear to work on Windoze 10 grrrrr)

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.

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.