Archive for May, 2015

Phew!

Posted in Arduino, Wifi on May 17, 2015 by asteriondaedalus

Niggly problems when setting up the Blackwidow to talk to home wifi router but, go figure, I wasn’t paying attention. When setting ssid[] and security_passphrase[] arrays one need use you local ssid and passphrase for your router as opposed to the ssid set in the code example AND remember to set “security_type = 3” for WPA2 – obviously had a newbie moment ūüėČ The other curl ball thrown is that the board seems to take a couple minutes to connect to the router (into which does not appear to turn up on any site I have perused). ¬†I thought it had not worked but McAfee piped up (after a few minutes) and warned “192.168.0.112” had connected to network (which was the static IP address I gave the Blackwidow). ¬†Once Blackwidow is connected to router it appears more reactive. Next step to integrate in the Arduino mqtt library. ¬†4 relay shield on order from China ($6) and I have already cracked open the current watering controller to look at swapping out the signals to the new board. ¬†They are only 12volt signals with a common to all watering solenoids – too easy drill sergeant!

POST SCRIPT

Go figure, some work to port MQTT library as it uses Ethernet library (or Wifi library) not compatible in first instance with WiShield library for BlackWidow.  However, I do note deep in the Client class used in the MQTT client we have buffer marshalling for sending on sockets.  Problem is the BlackWidow examples are using UDP.

One interesting discovery however was the way BlackWidow example built the UDP example it was not intuitive but it clicked they are using virtual methods in the library for user to define.  More than that it introduced be to PT_THREADS for Arduino.  A neat way to do limited threads on Arduino.

I may dabble a little with a MQTT port I can simply stick with HTTP or UDP examples (we are only talking about toggling 4 relays after all).  OpenHAB can work with HTTP or UDP (as well as MQTT) so no show stoppers.

PT_THREADS are, however, interesting.

In hind sight

Posted in Arduino, Nostalgia, Wifi on May 15, 2015 by asteriondaedalus

Looking at it realistically, OpenSprinkler hardware is likely a no-go for me.   Why?

When I looked at it rationally, I have the skills and the technology and I have also lamented the “maker” mentality before (buying things and plugging them together rather than designing and constructing).

Besides the $80 for the OpenSprinkler hardware is about what I paid for the Blackwidow board, a few years ago now.  I used the Blackwidow on a now decommissioned project Рso it is sitting there wanting to be used.

BlackWidow

Use me !

 

Why waste it?

Besides a four relay shield is in the order of $6 instead of $80.  I have found a mqtt library for Arduino so will need to integrate that with the wifi (rather than ethernet) library etc.

I might even be able to mod the OpenSprinkler software to control relays via mqtt, instead of driving GPIO pins directly.

Yes, one could go NodeMCU and a $4 four relay board and get a controller under $20, and I will for extensions to the irrigation system.  I just need to get the Blackwidow out of the parts draw doing something useful.

 

ESP2

Posted in Uncategorized on May 13, 2015 by asteriondaedalus

Even better, OpenHAB with MQTT addin, OpenSprinkler¬†addin¬†… there is no end to this madness.

Not to mention a python library for pumping Aus weather to MQTT.

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.

Testing, Testing, …

Posted in Hiatus on May 9, 2015 by asteriondaedalus

… one, two, three… quack.

Featured image

Waking up to a home invasion on our first morning in the new house.

Turns out SA has an open season on Grey Teal … yum, yum Peking Duck!

Day two and, of course, dawdling while setting up office.  So, we will soon be back online dabling with projects.