Playground setup

Hello,
I have been following the playground setup guide for windows at: https://www.bigclown.com/doc/tutorials/playground-setup/
I have installed the playground using an installer, without any antivirus program enabled, but when I try to use the pm2 list command it only gives me: “Use ´pm2 show id:name´ to get more details about an app” and the bcf devices command closes the command box immediately. In fact any command starting with bcf closes the window, but it works just fine in the BigClown Toolchain app. I have tried restarting the pc and reinstalling the playground. I am on windows 7 64bit professional. Any help would be greatly appreciated.

I have now resolved part of the problem by uninstalling BC playground and reinstalling it while having firewall turned off, now bcf works, but the pm2 list problem persists. Than at step 8 (uploading usb dongle firmware) I had to run bcf update before uploading the firmware. Now I am stuck at step 10 (starting the gateway), where the playground says: “pm2 error script not found: name of the script”.

Hello Radim,

before I try to help you with Windows Playground. I’d like to suggest that you could try our new Multi-platform Playground based on Electron which is still in beta, but now it has all the functionality as the old Playground. It is binary application without installation. Please download the latest windows version here:

We still don’t have any documentaion for this tool. But basics are:

You flash USB Dongle in the firmware tab (you refresh je COM port list by going to another tab, then back to the FIRMWARE tab), then in the bottom right you select in the “Devices” the com port with USB Dongle. Then you can use Node-RED tab and the debug tab in the node-red. Or you just subscribe to # topic in the MQTT tab.
In the bottom status bar you will see which services are running. If the service is OFFLINE but it is working in their respective tab, it means that is running in your system as the service and not from the Playground application.

Now the answer to the old Windows Playground.

  1. Please make sure you have installed the Playground as a normal (non-admin) user. The installer ask for rights elevation automatically during installation.

  2. The issue with closing the console could be because of TrueType/Raster font in the console. We had issues also by typing the “cd” command. Try to select the other one in font dialogue, please see step 7 in How to Customize the Font in Windows Command Prompt: 15 Steps

  3. Can you try to run bcg manually without pm2? That message that script is not found could be because bcg is not correctly installed.

bcg --device COMx

where COMx is COM port of USB Dongle.

Can you please also check, that the global variable %BigClownGateway% is set? You can see it in you environmental varibles, or by typing

echo %BigClownGateway%

I’ve asked my colleague who will also answer in this thread soon or later. Please answer if you could run and use the new Playground and whether you like it, or whether you would like to fix the old Windows playground so we will investigate further your issues.
Martin

Hello Radim,

issue seams like playground installation or execution of pm2 was done under elevated admin rights. Installation of playground has to be done by ordinary user with UAC elevation. Execution of any command (e.g. pm2) should be done by ordinary user also.

You can check from cmd.exe with command:
DIR /Q "%USERPROFILE%\.pm2"

If it display admin owner, you can fix it by removing %USERPROFILE%\.pm2 and install playground again.

issue is related (on some MS Win installations and some circumstamces) with cmd.exe console fonts (Raster Fonts). Yoy can fix it by using any TrueType (vector) font for console e.g. Consolas.

Let us know if it helps please.

Hello Michal and Martin,

thanks to both of you for your comperhensive answers and suggestions. I will have access to the computer and BigClown hardware in a week from now at monday, becouse I am currently at holiday and it’s at my work. I will let you know how it goes.

Hello Radim,

I just published v2 https://github.com/bigclownlabs/bch-playground-windows/releases/
It should address both issues, do not forget to uninstall Playground v1 and delete %USERPROFILE%\.pm2 (needed only if .pm2 was created with admin rights) before Playground v2 installation.

Hello Radim, have you solved the issue? Or do you need any further help?
Thanks
Martin.

Hello Martin,

I have just reinstalled the playground on a non-admin account and changed the console text type and everything was working fine after that, but I will probably not use it, since the new playground that you have sent me is so much simpler, more intuitive to use and more visually pleasing. I have uploaded the firmware into the usb gateway, push button kit and wireless power controller kit without a problem.

I have figured out how to use the node red to receive messages from the button and now I would like to use them to switch the relay on the power relay board. I have connected the module via radio and tried to inject false or true value to mqtt node with topic node/kit-power-controller:0/relay/-/state/set, but it doesn’t affect the relay state. I think I might have the wrong firmware. Should I use the generic-node-power-module firmware or the kit-wireless-power-controller (that is the one I have)?

By the way thanks for all the help. I really appreciate it.
Radim

Hello Radim,
ok, thats great to hear that you have it running. We are happy that you like new Playground and that it’s working for you even when its in early beta.

Both firmwares should be fine for relay control. Generic firmware allows you to connect all the modules (LCD, Tags, … ) and also you can send button presses back to the gateway which helps to troubleshoot MQTT topics.

The kit-wireless-power-controller sends back temperature, do you see the measured temperature from the Core Module internal sensor? Does it have the same node/kit-power-controller:0/ prefix as the MQTT you try to send to the power controller?

Do you have connected the 5V DC adapter to the Power Module? The relay is powered from this adapter, not from 5V USB.

Can you try to control the on-board LED by MQTT topic and true/false: ?
node/{id}/led/-/state/set
https://www.bigclown.com/doc/interfaces/mqtt-topics/

Martin

Hello Martin,
yes, the messages I am sending have the same prefix. In fact I noticed that if I added a node with
node/kit-power-controller:0/relay/-/state/GET, than I would get the according relay state back in the debug console if I changed the relay state, but the relay wouldn’t switch. It didn’t occur to me until now that it has to be powered by the DC jack, I just tought that the USB didn’t have enough power.
Thanks for the MQTT topics list, I was searching for those. I will try it out tomorrow, I am very confident that it will work.

Radim

Is always a good idea to subscribe to topic # and see all the messages.
You can use the MQTT tab in Playground or subscribe in node-red to # and connect output to the debug node and switch to debug tab. You can see that flow here
https://www.bigclown.com/doc/projects/wireless-soil-sensor/#radio-pairing

The USB could be able to power the relay, but the board uses also the 5V for digital LED strip which can have consumption of many amps. That’s why you have to always use the DC adapter.