MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. MAF1981
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 5
    • Groups 0

    Posts

    Recent Best Controversial
    • MMM-Homematic-Heaters | HomeMatic RC radiator thermostats

      Description:

      Display the current states of your radio controlled HomeMatic (eQ-3) radiator thermostats of type HM-CC-RT-DN via CCU2.
      The following information appears in the screen (based on the configuration): The name of the heater, the current temperature, the target temperature, the current mode (off, boost, party, manual) and the fault reporting (i.e. low battery), if any.

      It requires a HomeMatic central control unit (CCU2).

      Download:

      [card:MAF1981/MMM-Homematic-Heaters]

      Version 1

      • Initial release
      posted in Utilities
      MAF1981M
      MAF1981
    • RE: Character encoding of GET request response

      Ok, got it working by myself. Works like charm with iconv-lite. Found the solution here: http://stackoverflow.com/questions/12040643/nodejs-encoding-using-request

      That’s the working code section now:

      var iconv = require('iconv-lite');
      request({
      		encodeURI("http://192.168.178.11/state.cgi?device_id=" + deviceIds),
      		method: 'GET',
      		encoding: null,
      	}, function(error, response, body) {
      		var bodyWithCorrectEncoding = iconv.decode(body, 'iso-8859-1');
      		...
      

      Even the encoding: null is important! Without it does not show the specified encoding.

      BR,

      posted in Development
      MAF1981M
      MAF1981
    • Character encoding of GET request response

      Hi there,

      I’m struggling with the wrong character encoding after getting some data back from an Ajax request. For example, the all German umlauts are displayed as 0_1489247969533_1.PNG (correct display has to be: Büro: 20.6**°**C)
      This is my GET request in the node_helper of my module

      ...
      request({
      			url: encodeURI("http://192.168.178.11/state.cgi?device_id=" + deviceIds),
      			method: 'GET'
      		}, function(error, response, body) {
      			console.log("response: " + response + " - body: " + body);
      			...
      

      The body an XML content and contains the values with the wrong encoding. If I double check the URL within the browser window, the data are returned and displayed with the correct encoding. So it’s not an issue on the server side. Even if I try to set parameter ‘Content-Type’ to ‘application/xml; charset=ISO-8859-1’ or ‘UTF-16’ beneath method: ‘GET’ above it returns the data with the wrong character set.
      Any thoughts on how I can solve this?

      Thanks!

      posted in Development
      MAF1981M
      MAF1981
    • Full-screen alert (no other modules should be shown)

      Hi,
      I want to have a fullscreen alert for a few seconds, after this defined time the module should appear normally on it’s defined position in config.js. How can I solve that? Can I just overlay it with CSS or should I hide all other modules before and then displaying it again?
      For example, in config.js my module is defined with

      position: 'middle_center',
      

      once a notification will show my module, it should appear in fullscreen mode for (i.e.) 20 seconds, no other modules should be displayed during this time. The fullscreen mode has the background color red and a very large font size. After this 20 seconds, the fullscreen is not necessary anymore and the module should be displayed in its “middle_center” position.
      What could be the best way to solve this?

      Thanks!

      posted in Development
      MAF1981M
      MAF1981
    • Approach to show message in MM once an RF signal was detected

      Hi there,
      I’m looking for an approach to accomplish the following:
      I have some (remote) radio controlled power outlets (on 433 MHz signals). Currently I have 4 of these outlets, so 8 different codes (on /off). I would like to display a message on my MagicMirror once a particular power outlet has been switched on. The message should disappear if the particular power outlet has been switched off again.
      I have a wireless receiver for my Pi up and running and also found a RFSniffer (https://github.com/ninjablocks/433Utils/tree/master/RPi_utils) written in C++ which works fine so far. I can see all codes for each outlet if I switch it on/off by the remote control.
      Now I’m struggling with the implementation in my module for MM. I understand that I have to use the node_helper.js somehow to receive notifications. But I only found a way to get results of Python scripts back to the node_helper. I don’t find a RFSniffer tool written in Python.
      Question 1: Is there any Python RFSniffer available?
      Question 2: How can I get the result from the C++ Sniffer to the node_helper.js to evaluate it in my module? Is there a way without having a Python script inbetween? If not, is there any tutorial or similar code available that I can use as template to solve my requirement?

      Thanks in advance!
      MAF1981

      posted in General Discussion
      MAF1981M
      MAF1981
    • 1 / 1