Warning: count(): Parameter must be an array or an object that implements Countable in /data/web/virtuals/104571/virtual/www/blog/wp-includes/post-template.php on line 284
May 29, 2017 – Q/A

May 29, 2017 – Q/A

Hi guys,

another set of common questions/answers and tips.

  1. How do I know what exactly is my software sending to the API? How can I tell which sensor data is there?
    This is actually quite simple. The api creates a file that contains everything that was sent to it. This file is in your template root folder, next to the index files and config, it is called meteotemplateLive.txt. This file includes everything that was sent by your software to the API. You need to go to the Wiki and choose the API page in the menu on the left.
    There you will see what the various parameters are referred to as (example: soil temperature = TS, leaf wetness = LW etc., followed by a number corresponding to the sensor number). Then check if these are in meteotemplateLive.txt. For each there will also be a timestamp indicating when was the last time this sensor reported. If for example you do not see anything like TS1, TS2 etc. it means your software is not sending soil temperature. If you are sure you have this sensors you need to contact the developer of the software you are using because this is not something I can solve. If the software does not send it to the API there is no way the template can show it.
  2. Is it possible to use a block as a plugin or vice versa?
    The answer is no and there are two main reasons for this. First one is technical. They use different relative paths, also many blocks depend on scripts loaded by the homepage and vice versa, plugins might clash when used as blocks because they are loaded simultaneously on the homepage. Second problem is that blocks and plugins are designed to suit different purposes. Blocks are small and more like a summary of something. Using a block as a plugin will not look very good because it will stretch to the full page size. Likewise, plugins often consist of more than one page, in which case it is obviously impossible to use as a block and even if it is just one page it is meant to be used in the full page width and not fit well in a small box as a block.
  3. I added a new plugin to the menu, but I would like to use a different icon than the default one, is it possible?
    Yes it is. If you use the short syntax (#plugin(….)) then the menu will show the default icon I chose. If you want to change it however, the solution is quite simple. You simply use the plugin as if it was an external link. In other words you provide its name, its URL and then you can also specify your own icon/flag. If you provide the full URL of the plugin landing page the template will see it as external link and it will work just fine.

Leave a Comment