Archive for the Networking Category

PEP

Posted in Arduino, IOT, MQTT, Networking, Wifi on July 20, 2017 by asteriondaedalus

So, following up after a previous promise I got myself a cheap arduino touch screen that was on sale, to act as a Programmable Entry Panel or PEP.

I will use the Wemos D1 and the Arduino core fore same to try to port the associated library onto Wemos D1. That way I can have a control panel via MQTT.

Yes, there wińļl be a Android version as my wife got herself a Samsung – though so hates it.

Saves me the hassle of working in iOS.

Ah, the thick plottens!

Posted in Linux, Networking on June 24, 2017 by asteriondaedalus

So, even with the static IP set on the parallella the TerraTerm console keeps disconnecting after a time.

Then it dawned on me, the connection was being broken because the PC IP would expire and pick up another from the DHCP in the router.

So, the unwritten story is that you need to set the IP address of your working PC to static as well – so that IP addresses at both ends of the connection persist.

Now that I have set my PC to static IP, TerraTerm does not close down.

Finally, a new mqtt based node-red server

Posted in Linux, MQTT, Networking, node-red, Orange Pi on June 21, 2017 by asteriondaedalus

So, much pain but lotsa learning!

Final story.

 

If you are using:

  • OS: armbian.org debian server: ARMBIAN 5.31 stable Debian GNU/Linux 8 (jessie) 3.4.113-sun8i
  • Erlang/OTP: V9.2/19
  • EMQ: 2.2
  • Orange Pi Zero 512kb (and fragged by expansion board ūüėČ

Ignore the service definition at the emqttd site

DO NOT CREATE /etc/init.d/emqtt Рbecause systemd is installed in ARMBIAN 5.31 and systemd uses UNIT files (as emqttd.service below).  The /etc/init.d/xxx file should be ignored if the UNIT file is there but why clutter and have junk around.

Then do the following (from root):

mkdir /opt/emqttd
mkdir /opt/emqttd/bin
cp -R emq-relx/_rel /opt/emqtt/
mkdir /usr/lib/systemd/system
nano /usr/lib/systemd/system/emqttd.service

---- inside of nano ----

[Unit]
Description=emqtt daemon
After=network.target

[Service]
Type=forking
Environment=HOME=/root
ExecStart=/bin/sh /opt/emqttd/bin/emqttd start
ExecStop=/bin/sh /opt/emqttd/bin/emqttd stop

[Install]
WantedBy=multi-user.target

---- exit and save from nano ----

chmod +x /usr/lib/systemd/system/emqttd.service
systemctl enable emqttd.service
reboot

voila!

Thanks awfully to @turtleDeng.

There is, of course, a new problem.  Both node-red and emqttd services start every time the OPiZ boots.  However, for some reason (tonight for the first time) connection to LAN is not coming up every time.  It comes up with no IP, no gateway, no DNS addresses???

Reboot a second time and it comes up.

This new problem means I will need check after brownout, or cycle power on ISP gateway (where the OPiZ will get its power … assuming there is 5volts on the USB port on the gateway).

 

Gag!

Posted in Networking on July 25, 2016 by asteriondaedalus

So, bombed a C.H.I.P. with shairport-sync.  This is a neat Airplay client app.

Only problem is my old house seems to throttle back the wifi throughput with its double brick walls.

Pumping the music through the wifi router in the lounge (from my PC on my desk in my hobby room) the audio at the desk was choppy and honestly useless.

I tried bombing a second C.H.I.P. but got the same result.

So, as I had a wifi extender on my desk I connected PC and C.H.I.P. to that and voila!

Mostly good, though it did kaput and loose sync after half a dozen songs.  It took a restart of the shairport-sync and a couple of attempts at iTunes to reconnect everything up.

So, I downloaded the NETGEAR Wifi Analytics app to do a quick survey. ¬†Not really much difference in bps but I wasn’t even getting peak performance a metre from the wifi router.

As the Wife insisted on no cables from Foxtel to television in the lounge a wifi extender is in use so I half suspect some interference (perhaps). ¬†Not to mention we cannot have the router in view, as that is “ugly”, so there may be other structural interferences.

In truth though, more or less the same performance as the android app experiments using kodi on my phone.  Same difference, choppy.

I might need a good wifi extender in the ceiling to pump wifi at a high enough rate to TBD speakers in ceiling.

 

OpenSprinklette

Posted in Embedded, ESP8266, IOT, Lua, MQTT, Networking on June 29, 2016 by asteriondaedalus

So, just got delivery of my 5 WeMOS uno clones …

 

arduino killer

… and 5 …

5v 4 Channel Relay Shield Module For Arduino

… we are now ready for OpenSprinklette! ¬†All up AUS$11.00. ¬†Only four channels but add a second unit for sum total of AUS$22.00!

So, a little work as we need to convert the 12volt AC to DC, should work a treat as the WeMOS board is happy to take 9-24V and also provides the 5V the relay board needs (apparently the 3.3V outputs should be okay *whimper*).

Now, since the “leak” (and the $3K water bill for the quarter) I will fit flow sensors to ensure flow is within expected range – so the unit can raise alarms. ¬†Got 4 from Aliexpress for US$12 (or US$3 per sensor) which is better than the AUS$15 per sensor LittleBird is pinging people for similar devices. ¬†Just needs a 3.3V zener and a 220 ohm resistor to adapt the 5V output of the sensor to the 3.3V inputs on the WeMOS. ¬†Will build that onto a protoshield. (Anyone know what the connector type is from the photo below?)

flow

The NodeMCU provides NTP so I can run timers on WeMOS.  MQTT to the ODROID-W server (in the house) to pick up the watering times, weather off internet to decide upon whether or not to water etc.

A second two will be used for remote control of back and front yard lighting.  So remote ON/OFF and IR triggered to boot.

 

Hot damn!

Posted in MQTT, Networking, node-red, ODROID-W on January 3, 2016 by asteriondaedalus

node-red-pi

node-red running on my odroid-w.

I have my old blackwidow working with a relay shield so I can drive sprinkler valves but I could not sort mqtt onto the older dopey wifi shield Рjust lazy.  So I will use node-red to drive tcp chatter to drive the relays and drive that with mqtt via the node-red.  That way I can integrate the board gently, using its current libraries.

Next experiments include, yes, sorting that static IP story.

Then getting mosquitto up and running.

There are a few warnings in the node-red install that I need address (upgrades of dependencies).  Otherwise I am looking at a thingybox the size of a matchbox.

Sensibly though I am looking at a small 220VAC-5VDC module to build the whole thing into a 3 Pin Plug Pack Case.

case

Yes, yes.  All would have been easier with a fresh download of the Jessi distro Рsince it comes with node-red.  But I do like the labour.

Still, the final version will be on a fresh Jessi distro so that I only need the mosquitto install to get this rolling.

Extra Sensory Perception?

Posted in Embedded, Hardware, Networking, Wifi on May 12, 2015 by asteriondaedalus

What ever it is, the ESP 8226 has read my mind.  Including being able to run LUA and so include MQTT and also things like Actors, CSP, FSM.

esp

 

Especially with NodeMCU on board.

NodeMCU

 

Now with ESP 8226+NodeMCU+MQTT, don’t forget Node-Red.

For my MQTT broker I am using, of course, emqttd as it is erlang based.

For connecting from python on PC, Raspberry Pirate, Beaglebone Black, one needs paho-mqtt. ¬†MQTT has topic much like ROS does … hmm … more reason not to need ROS broker.

In any event … get it … event … never mind, on Android one can use MyMQTT to hook into broker to push and subscribe as a test tool.