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

    Posts

    Recent Best Controversial
    • RE: Esp32 Randomly Stops Working

      @Xilef
      Me again…
      I have some problems at the moment with two of my modules counting my water usage and gas usage by reed switches.
      They stop working after 18 hours to 24 hours.
      As i figured out the problem is the MQTT library i use (AsyncMqttClient). I am now porting my sketches back to PubSubClient instead.

      How do you send the data with your boards. Is it still plain TCP or do you use MQTT?

      posted in General Discussion
      wishmaster270W
      wishmaster270
    • RE: Is there a way or a module that will display an svg graphic?

      @vvrangler
      Hi,

      you could use my MMM-EmbedURL module for this purpose.
      Simply set the embedElementType to img like in the following example:

      		{
      			module: "MMM-EmbedURL",
      			position: "top_center",
      			header: "Embed-URL",
      			config: {
      				embedElementType: "img",
      				updateInterval: 10,
      				attributes: [
      					"frameborder=0",
      				],
      				embed: [
      					"http://SOME_SERVER/SOME_SVG.svg",
      				]
      			},
      		},
      

      You can change the updateInterval to your needs.

      posted in Feature Requests
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @coernel
      Great to hear and you are welcome. I try to help where I can.
      I live about 30km south of Munich but thanks for your invitation.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: Esp32 Randomly Stops Working

      @Xilef
      I do have the same problem with two different types of my ESP32 boards. This one of AZDelivery powered with different cables and power supplies and this one of Olimex powered over PoE.
      I replaced the AZDelivery with a this and now i do not have any problems.
      In case of the Olimex board i could not replace it easily cause i need the power over ethernet feature. I integrated a check of the current uptime to the sketch and restart the board programatically every configured amount of time:

      #define MAX_MILLIS_RUNTIME 300000
      //some more code
      
      //loop function
      void loop() {
        unsigned long curTime = millis();
      
        if(curTime > MAX_MILLIS_RUNTIME){
          ESP.restart();
        }
        //some more code
      )
      

      In my case i reboot the board every 5 minutes but i do not think you need to boot that often. You may need to configure some timeout and reuse settings in the module that displays the values cause of the board being unreachable during the reboot.

      posted in General Discussion
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @coernel
      The view you show indicates that there are no recent calls and that the fetch of the telephone book is still running or was not successful. But it is the normal view. The calls will be signaled as alerts. So make sure you have the default alert module activated in your config.js:

      		{
      			module: "alert",
      		},
      

      The formatting will only be wrong in the alert.

      Please make sure to check the following things, too:

      • You cloned the right fork with the following command?
      cd ~/MagicMirror/modules
      git clone git@github.com:drtorchwood/MMM-FRITZ-Box-Callmonitor-py3.git
      

      Edit:
      * You use the right branch by calling the following commands?
      As of 2023-02-25 the changes are merged to the master branch of the fork. So no need to change to the code_update_2023 branch anymore.

      • You installed the JavaScript dependencies?
      cd ~/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor-py3
      npm install
      
      • You installed the Python dependencies?
      sudo pip3 install fritzconnection
      
      • You activated the call monitor service of the box by dialing the following number with one of your phones?
      #96*5*
      
      • You configured the right IP address in config.js with option fritzIP. Default is 192.168.178.1?
      		{
      			module: 'MMM-FRITZ-Box-Callmonitor-py3',
      			position: 'bottom_left',
      			header: "Verpasste Anrufe", 
      			config: {
      				username: "foo",
      				password: "bar",
      				fritzIP: "10.18.8.1",
      				reloadContactsInterval: 50,
      				minimumCallLength: 0,
      				showContactsStatus: true,
      				maximumCallDistance: 60*6,
      				maximumCalls: 4,
      				fade: false,
      				debug: true,
      			}
      		},
      

      If the call monitor service is not activated on the fritz box you will see a message like this in the logs:

      [24.02.2023 16:31.29.944] [ERROR] Error: connect ECONNREFUSED 192.168.178.1:1012
          at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
        errno: -111,
        code: 'ECONNREFUSED',
        syscall: 'connect',
        address: '192.168.178.1,
        port: 1012
      }
      

      And again the call monitor service is independent of username and password. The credentials are used to fetch the telephone book and the past calls only.

      Thats how the default view looks in my case:
      fritzcallmonitor.png

      And thats how it looks if there is a incomming call:
      fritzcall.png

      If you do not use the current development branch of MagicMirror there may be some html code in the alert and it will look like <span style='font-size:30px'>Tom</span>

      fritzcallmonitor_tom.png

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @3squaremirror
      I think the problem is the pages module. It uses lockstrings as well and may block the module of being shown.
      Tried combining pages and profiles a view years ago and had very similar problems.

      But you can ralize all you can do with MMM-pages and MMM-page-indicator with MMM-ProfileSwitcher and MMM-ProfileControl. So there is no need to mix Pages and Profiles.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: MMM-SynologySurveillance

      @digied
      Oh, did not expect a dead cam resulting in this error message.
      Especially as at this point all cams configured in the NAS are fetched.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @3squaremirror
      Do you use any other modules which may hide/show modules?
      If i copy your configuration to my test environment and add some notifications (change day/night every minute) everything works as expected.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @coernel
      Hi,
      as i can see this fork https://github.com/drtorchwood/MMM-FRITZ-Box-Callmonitor-py3/tree/code_update_2023 contains all changes needed.
      But you will need to either use the current development version of MagicMirror or wait for the next release which i think is planned for 2022-04-01 to get the alerts formatted correctly.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-SynologySurveillance

      @digied Hi,

      looks like a DNS problem to me. Your Mirror can not resolv the ip of “datanas”.

      Did there happen a update of your router maybe?

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @sdetweil
      I should have checked that. Thank you for the link.
      With the current develop branch the formatting works as expected, too.

      Edit: If the comment is removed of the translation files the translations work as well and the right title is displayed

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @coernel
      The pythons script is only responsible to fetch the call history and the phonebook of the fritz box. The call notification is handled by java script.
      So should see a alter containing the (wrong formatted) phone number for each incoming call.

      Are you sure you activated the call notification on your fritz box by dialing

      #96*5*
      

      with a phone connected to the box (DECT phone works as well).

      Edit:
      I do not think the formatting problem is related to this module. As of the documentation of the alert module it should be possible to send either simple text or html formatted text.
      As a debug test i tried to send html formatted text with one of my other modules which ends in the same problem

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-Fritz-Box-Callmonitor: Notification formatting

      @coernel
      @Jan-0

      Additional to the wrong rename the fritz_access.py had the mentioned wrong urllib2 imports. I fixed the python script and the import of the PythonShell module in node_helper.js.

      I created a pull request a few seconds ago.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: [MMM-ValuesByNotification] Display the payloads of notifications with titles and icons

      @BKeyport
      Just released version 0.0.8 of the module which should fix both issues

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: [MMM-ValuesByNotification] Display the payloads of notifications with titles and icons

      @BKeyport
      Hi,

      that’s definitly a bug. It is related to the problem you described in the issue on github.
      I found a fix already but i need a moment to solve it proper.
      As a quickfix you can change line 299 in MMM-ValuesByNotification.js from

      						value = value.replace(/(?:\r\n|\r|\n)/g, newlineReplacement)
      

      to

      						value = String(value).replace(/(?:\r\n|\r|\n)/g, newlineReplacement)
      
      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: [MMM-ValuesByNotification] Display the payloads of notifications with titles and icons

      @BKeyport
      Hi, great that it works now.
      There are two different ways of how to change the font-size.
      Either by using the classes option and add large to the element you want the font-size to be changed. i.e.:

      {
      			module: "MMM-ValuesByNotification",
      			position: "top_left",
      			header: "Module-1",
      			config: {
      				groups: [
      					{
      						items: [
      							{
      								notification: "WEATHERLINK",
      								itemTitle: "Item-1",
      								values: [
      									{
      										classes: "large",
      										valueTitle: "Value-1",
      										jsonpath: "data.conditions..hum",
      									},
      								]
      							},
      						]
      					},
      				]
      			},
      		},
      

      The main problem with this solution is that the font-size of the valueTitle and the value itself is changed.

      Or you can use custom.css to do the job:

      .MMM-ValuesByNotification .vbn .groupTitle,
      .MMM-ValuesByNotification .vbn .itemTitle,
      .MMM-ValuesByNotification .vbn .value,
      .MMM-ValuesByNotification .vbn .valueTitle {
        font-size: var(--font-size-large);
        line-height: 1;
      }
      

      In this example the font-size of all titles and the value is changed. I use the font-size-large CSS variable of the main.css for this job.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: [MMM-ValuesByNotification] Display the payloads of notifications with titles and icons

      @BKeyport Hi,
      i formatted your output to understand the JSON structure you are using:

      {
          "data": {
              "did": "001D0A71573B",
              "ts": 1675287003,
              "conditions": [
                  {
                      "lsid": 434637,
                      "data_structure_type": 1,
                      "txid": 1,
                      "temp": 47.4,
                      "hum": 52.8,
                      "dew_point": 31.0,
                      "wet_bulb": 38.4,
                      "heat_index": 46.4,
                      "wind_chill": 47.4,
                      "thw_index": 46.4,
                      "thsw_index": null,
                      "wind_speed_last": 2.00,
                      "wind_dir_last": 31,
                      "wind_speed_avg_last_1_min": 2.62,
                      "wind_dir_scalar_avg_last_1_min": 6,
                      "wind_speed_avg_last_2_min": 2.81,
                      "wind_dir_scalar_avg_last_2_min": 358,
                      "wind_speed_hi_last_2_min": 5.00,
                      "wind_dir_at_hi_speed_last_2_min": 340,
                      "wind_speed_avg_last_10_min": 1.43,
                      "wind_dir_scalar_avg_last_10_min": 36,
                      "wind_speed_hi_last_10_min": 5.00,
                      "wind_dir_at_hi_speed_last_10_min": 336,
                      "rain_size": 1,
                      "rain_rate_last": 0,
                      "rain_rate_hi": 0,
                      "rainfall_last_15_min": 0,
                      "rain_rate_hi_last_15_min": 0,
                      "rainfall_last_60_min": 0,
                      "rainfall_last_24_hr": 0,
                      "rain_storm": 0,
                      "rain_storm_start_at": null,
                      "solar_rad": null,
                      "uv_index": null,
                      "rx_state": 0,
                      "trans_battery_flag": 0,
                      "rainfall_daily": 0,
                      "rainfall_monthly": 0,
                      "rainfall_year": 1750,
                      "rain_storm_last": 4,
                      "rain_storm_last_start_at": 1674798601,
                      "rain_storm_last_end_at": 1675000860
                  },
                  {
                      "lsid": 434634,
                      "data_structure_type": 4,
                      "temp_in": 79.4,
                      "hum_in": 20.5,
                      "dew_point_in": 35.5,
                      "heat_index_in": 77.4
                  },
                  {
                      "lsid": 434633,
                      "data_structure_type": 3,
                      "bar_sea_level": 30.125,
                      "bar_trend": -0.013,
                      "bar_absolute": 29.660
                  }
              ]
          },
          "error": null
      }
      

      The hum value is part of the first element with index 0 of the conditions object which is part of the data object.
      This results in a more advanced jsonpath…

      		{
      			module: "MMM-ValuesByNotification",
      			position: "top_left",
      			header: "Module-1",
      			config: {
      				groups: [
      					{
      						items: [
      							{
      								notification: "WEATHERLINK",
      								itemTitle: "Item-1",
      								values: [
      									{
      										valueTitle: "Value-1",
      										jsonpath: "data.conditions[0].hum",
      									},
      								]
      							},
      						]
      					},
      				]
      			},
      		},
      

      This config works out of the box ;-)

      Edit:

      If the order of the elements of conditions varies you can use

      jsonpath: "data.conditions..hum"
      

      This one selects the hum value of any element of conditions.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: JSON request module

      @sdetweil Hi Sam, I will check that for the next release.
      I already added something similar to one of my other modules but did not know that there is a module id already and added a uuid instead.

      posted in Requests
      wishmaster270W
      wishmaster270
    • RE: JSON request module

      @ELMAGO Hi,

      i just released a new version of the module which has a new option delayNext that can be added to each command.
      The module then starts the command and waits this amount of milliseconds before the next one is processed.
      So in your case you can add a delayNext: 1000 to each of the commands to give your server some time between the calls.

      posted in Requests
      wishmaster270W
      wishmaster270
    • RE: JSON request module

      @ELMAGO Hi,

      thats right. The module does not support multi instance configurations.
      You will need to copy the complete module folder and change some things to get it work.
      But to me it looks like your server is stressed with the 16 calls straight after each other. So you do not need more parallelism but less.
      So i will check if i can at a configurable delay after each command to stretch the time the calls get made to your server a little bit.

      posted in Requests
      wishmaster270W
      wishmaster270
    • 1 / 1