I bought cheap bathroom fan to tackle common in Britain mold problem in a bathroom and it comes with analog humidistat, which you can adjust using screwdriver. My goal is to make sure my fan switches off on 50% humidity or lower.

I had a two Pinoccio boards and DHT22 laying around and decided to make use of them. Plugged DHT22 to into D4 hole (Ground and +3.3 V as required) into Field Scout and uploaded:


Check serial port is working:

Hello from Pinoccio!
(Shell based on Bitlash v2.0 (c) 2014 Bill Roy)
Custom Sketch (rev unknown)
14652 bytes free
Field Scout ready

{"type":"custom","name":"dht22","custom":["{\u0022dht22.temperature\u0022:23, \u0022dht22.humidity\u0022:52}"],"at":6377}
{"dht22.temperature":23, "dht22.humidity":52}

Pinocio HQ is struggling to work, so we need a local server to capture response:


> npm install -g pinoccio
> npm install --save pinoccio-server
>node server.js

Connect to Lead Scout via serial console and redirect to new gateway:

hq.setaddress("YOUR_IP_HERE"); wifi.dhcp; wifi.reassociate;
function startup {hq.setaddress("YOUR_IP_HERE"); wifi.reassociate;}

Now command field scout to report to HQ:


Now since hq.pinocc.io doesn't work properly for a while and node local server doesn't allow to type commands I am using https://raw.githubusercontent.com/luvit/luvit/master/examples/tcp-uv-proxy.lua instead of node.js serves.

Next post would be trying Scout proxy in different languages: D, Lua, Luv(Lua), Erlang, Python.


comments powered by Disqus