Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rwblinn

Pages: 1 2 [3] 4 5 6
31
General Discussion / Re: Node-RED Guidance TinkerForge Bricklets
« on: July 25, 2016, 19:15:22 »
Thanks

Have added AmbientLight and UVLight (see attachement). Working fine.

The TF device identifies can be found www.tinkerforge.com/en/doc/Software/Device_Identifier.html.

Next: New LED Bricklet with ability to set the color = will use the LED strip as example.

20160725: Correction to AmbientLight (see attachment)

32
General Discussion / Re: Node-RED Guidance TinkerForge Bricklets
« on: July 25, 2016, 17:02:28 »
UPDATE
Installed:
$sudo npm install -g tinkerforge
Added to NODE_PATH:
$export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
Installed:
$npm install body-parser in the .node-red folder under node_modules
Created folder:
/home/pi/.node-red/node_modules/node-red-contrib-tinkerforge
Copied the lib folder and other files to node-red-contrib-tinkerforge
Started node-red
TinkerForge nodes available

COOL

Added the ambientlight (v1) sensor by amending lib/bricklets.js, tinkerforge.js & tinkerforge.html.

Again Thanks a Lot = Job Well Done

33
General Discussion / Re: Node-RED Guidance TinkerForge Bricklets
« on: July 25, 2016, 15:57:33 »
Great and Thanks a lot.

Could you pls advice how to install in Node-RED?
Tried npm install node-red-contrib-tinkerforge, but npm can not find the package.

34
Great hint - Many Thanks.

35
General Discussion / Re: MQTT Proxy Support RGB LED Bricklet
« on: July 19, 2016, 22:07:51 »
Appreciated - Thanks

36
General Discussion / MQTT Proxy Support RGB LED Bricklet
« on: July 18, 2016, 19:42:51 »
Hi,

noticed that the new RGB LED Bricklet is not icluded in the MQTT Proxy.

Any information by when the RGB LED Bricklet will be supported.

Appreciated.

37
Solved by using the MQTT proxy as broker on localhost:1883.
Defined a simple test flow with:
  • Input Node "MQTT In" subscribing to topic "tinkerforge/bricklet/ambient_light/mdh/illuminance"
  • Function Node JSON to convert MQTT string to javascript object
  • Function Node Function to log the payload properties illuminance and _timestamp
  • Debug Node to log the MQTT payload (which is a JSON string)

Looks promising to explore further integration of TinkerForge in Node-RED.

38
General Discussion / Node-RED Guidance TinkerForge Bricklets
« on: July 16, 2016, 14:17:07 »
Hi,

is there guidance available on how to use the TinkerForge Javascript Bindings in Node-RED.

Have tried to define a simple call to an ambilight bricklet in a Node-RED function, but received error 31=timeout.
Code: [Select]
//var Tinkerforge = require('/usr/lib/node_modules/tinkerforge');
var Tinkerforge = context.global.tinkerforge;
var HOST = '192.168.0.88';
var PORT = 4223;
var UID = 'mdh';
var ipcon = new Tinkerforge.IPConnection();
var al = new Tinkerforge.BrickletAmbientLight(UID, ipcon);
ipcon.connect(HOST, PORT,
    function (error) {
        node.warn('Connect Error: ' + error);
    }
);
ipcon.on(Tinkerforge.IPConnection.CALLBACK_CONNECTED,
    function (connectReason) {
        al.getIlluminance(
            function (illuminance) {
                msg.payload = "{\"Illuminance\":" + illuminance/10.0 + "}";
                node.warn('Illuminance: ' + illuminance/10.0 + ' Lux');
            },
            function (error) {
                msg.payload = "{\"lluminance\":" + error + "}";
                node.warn('Get Error: ' + error);
            }
        );
    }
);
ipcon.disconnect();
return msg;
Note: defined in node-red settings, after installing tinkerforge via npm:
Code: [Select]
    functionGlobalContext: {
    tinkerforge:require('/usr/lib/node_modules/tinkerforge')

39
Hi,

tried to run on a Raspberry Pi with Master Brick, Wifi Ext 2.0, Ambientlight the ExampleSimple.js.
When running from the commandline $node ExampleSimple.js, received error:
   module.js:340
    throw err;
          ^
   Error: Cannot find module 'tinkerforge'

The line in ExampleSimple.js not changed:
var Tinkerforge = require('tinkerforge');

Installed the javaScript bindings using npm. Steps taken as user Pi with install message.
cd /home/pi
sudo npm -g install tinkerforge
tinkerforge@2.0.9 /usr/lib/node_modules/tinkerforge

When adding the full path to require('/usr/lib/node_modules/tinkerforge') it is working.

How to setup without the need to add the full path in require.

Any help appreciated.

40
Thanks for clarification.

Reason for asking:
Find an easy way to control bricklets using Node-RED via wifi ext 2.0.
In the meantime, considering best would be via MQTT.

41
General Discussion / WiFi Extension 2.0 http requests possible?
« on: July 08, 2016, 10:56:18 »
Hi,

is it possible or planned to send direct http requests via the new wifi extension 2.0 to the master brick and read its response?
Like:
http://ipaddresswifiext2/get.htm?bricklet=laser_range_finder&uid=vbM&request=distance

42
General Discussion / Re: Master Brick Portable Power Supply
« on: July 06, 2016, 12:22:02 »
Thanks a lot for the information - have ordered the board, battery & solar ... lets see how these work with TinkerForge Bricks.

43
General Discussion / Re: [BUG?] UV Light returns a high value
« on: July 04, 2016, 11:09:35 »
Reflashed the UV Bricklet > working fine now.

Appreciate your help - Thanks a lot.

44
General Discussion / Master Brick Portable Power Supply
« on: July 03, 2016, 10:14:22 »
Hi,

are there any recommendations of powering a Master Brick with 4 connected Bricklets and a WiFi 2.0 extension via portable power supply, like a Power Bank?

Would like to install outdoor where no line power supply is available.

45
General Discussion / [BUG?] UV Light returns a high value
« on: July 03, 2016, 10:06:51 »
Hi,

an UV Light bricklet is used with a Master Brick 2.1 (fw 2.4.0) and the new WiFi 2.0 extension (fw 2.0.0).

The value returned from Java method getUVLight() is rather high, like 80000 which results in a too high UV index when deviding by 250.
When deviding again by 250 (80000 / 250 / 250), then UV index seems ok.

Think this is a bug. Pls advice.

Pages: 1 2 [3] 4 5 6