Yocto-Visualization enables you to very easily visualize data from Yoctopuce sensors, whether they are connected by USB or through a network hub, with the exception of the YoctoHub-GSM. Indeed, the GSM SIM cards available to ordinary people do not have a public IP address and are behind a NAT filter, which prevents the Yocto-Visualization to connect itself directly on it. However, there is a way to work around this issue.
To visualize the values of a sensor connected to a YoctoHub-GSM with the Yocto-Visualisation application, you need:
- A YoctoHub-GSM, connected to one or several sensors, with a working SIM card.
- A VirtualHub to configure the YoctoHub-GSM.
- The GatewayHub application.
- A public Node.js server to run GatewayHub.
- A recent version (min 31520) of Yocto-Visualization.
Start by installing GatewayHub on your Node.js server, following the instructions that you find on this page. Let's assume that your Node.js server address is mytestserver.org. With your preferred web browser, get connected to http://www.mytestserver.org:44443.
Create a username / password, for example Franquin / AlbumNumero5! and a sub-dommain associed to a secret key, for example YoctoVisualization / MarsupilamiJaune
Create a login and a new sub-domain
You obtain the list of the available sub-domains for Franquin with an "open" button enabling you to know all their details. Note that if you want to work with several hubs, you need as many distinct sub-domains as hubs.
List of the available sub-domains
Connect your YoctoHub-GSM on a machine running a VirtualHub and open the YoctoHub callback configuration page. Then create a callback of the Yocto-API CallBack type with the following parameters:
- Protocol: ws://
- url: mytestserver.org:44080/YoctoVisualization/callback (note the /callback at the end)
- Security: WebSocket Authentication
- Password: MarsupilamiJaune
Leave the default value for the other parameters.
Test your callback. On the one hand you should obtain a "Connected to WebSocket" message on the hub side, and on the other hand the connection should appear in the "YoctoVisualization" sub-domain details on the GatewayHub.
You see the hub connecting to the sub-domain
Run Yocto-Visualization, open the global configuration window, and in the "USB/Network" tab add a new hub with the following parameters:
- Protocol: ws
- url: www.mytestserver.org
- Port: 44080
- Path: YoctoVisualization
- Username: Franquin
- Password: AlbumNumero5!
Yocto-Visualization connection parameters
After a few seconds, the connection with the GatewayHub server should be established and all the sensors connected to the YoctoHub-GSM should be available and work as if they were connected directly to your computer.
The Temp-Demo sensor, connected to the YoctoHub-GSM, is now available in Yocto-Visualization's UI
What you must know
To conclude, a few facts that you should remember if you don't want any unpleasant surprise:
- Each sub-domain can be used only once: no way to connect two different hubs to the same sub-domain, or even two instances of the Yocto-Visualization to the same sub-domain.
- The YoctoHub-GSM sends its sensor data on the GatewayHub permanently, whether there is someone to read them or not. The higher the sensor frequency is, the higher the GSM bill.
- By default, Yocto-Visualization automatically downloads the full content of the data logger of all the sensors in contact. If you don't need these data, disable them in the global configuration of the Yocto-Visualization (Resources tab).
- This connection technique, enabling you to work around a NAT filter, was presented with a YoctoHub-GSM, but is also works with other types of hub: YoctoHub-Ethernet, YoctoHub-Wireless-g, and even the VirtalHub.