Logic Machine Forum
Weather visualization - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Weather visualization (/showthread.php?tid=1273)



Weather visualization - jobb@nordstrandsel.se - 04.03.2018

I have a weather station, Clima Sensor US, wich gives a lot of data via modbus.
Now i want to visualize them. How can i show wind direction, more than with degrees? i want this in, for example in a compass.


Any ideas?


RE: Weather visualization - admin - 05.03.2018

1. Use an arrow icon with square proportions. Add object with this icon to visualization, set Additional classes to angle

2. Add to Custom JavaScript (Scripting > Tools > Edit custom JavaScript). Change 32/1/1 to your wind direction/angle object.
Code:
$(function(){
  grp.listen('32/1/1', function(obj) {
    $('.angle').css('transform', 'rotate(' + obj.value + 'deg');
  });
});

If you want a full compass then you need to add compass background with image element.