• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. fsgrazzutti
    3. Posts
    F
    Offline
    • Profile
    • Following 1
    • Followers 0
    • Topics 6
    • Posts 36
    • Groups 0

    Posts

    Recent Best Controversial
    • Email notification setup workaround for Gmail

      I could not manage to configure Mycontroller V.1 Email notification settings and make it working with the stringent requirements of Gmail. And since its development is frozen, but it is still my beloved solution, I worked on a solution with the help of node-red.

      I am on:
      f435ccce-ee27-4aad-a160-65dd6ee87565-image.png
      running on a Windows 10 mini pc.

      In node-red, using https://flows.nodered.org/node/node-red-node-email I have first created a local SMTP server:

      76588854-7010-4a93-aba6-6e1ca17809a3-image.png

      followed by a change node in order to extract the html portion of the message from the message object:
      3ffbfaac-e7d5-4ae1-8963-d2aeb16591f6-image.png

      In order to avoid email clogging I inserted a
      84b68489-e44a-45da-9196-82908ee869e8-image.png
      to limit the email send rate to 1 email per second.

      Finally, the message containing the html payload is sent to
      a0b8225c-b458-40d7-b044-102006cc4bbf-image.png
      which connects nicely to t the Gmail SMTP server, using my camper email account.

      Gmail SMTP requires an App Password, which can be obtained following these instructions
      https://support.google.com/mail/answer/185833?hl=en

      This is how the flow looks like in node-red
      990f9c3e-f297-47ae-878f-5f5c3836b08a-image.png

      This is how I set up the email notification in MyController
      56ccb619-c47a-4975-a7a0-89e5be4d26e3-image.png

      As you can see the email and domain are fake, since this SMTP server is local. I just needed to define an SMTP user. The same user is added to the list of the allowed users in the Email MTA node.

      Hope it helps anyone who, like me, struggled with Gmail SMTP restrictions.

      posted in Getting Started
      F
      fsgrazzutti
    • RE: Send Telegram bot message

      @jkandasa I finally had the chance to test the SNAPSHOT and it works !

      Now I have just to remember how to send the sensor states.

      Thanks a lot !

      posted in Operations
      F
      fsgrazzutti
    • RE: Send Telegram bot message

      @jkandasa thanks,

      no, I did not tried it yet, I am a bit scared about the installation. I recently migrated v1.6 to a windows 10 PC

      posted in Operations
      F
      fsgrazzutti
    • RE: Send Telegram bot message

      Hello @jkandasa ,

      I wanted to update Telegram configuration on my Mycontroller setup, version 1.6.0-SNAPSHOT,
      Git commit:branch
      263b61248fe66e251519c606ecd6f48a73d75b07:development
      Built on
      2021-05-08T18:35:53Z

      The Id I got is 537757xxxx, and I get an error message :
      Numeric value (537757xxxx) out of range of int.

      any chance to get it fixed ?

      posted in Operations
      F
      fsgrazzutti
    • RE: How to delete a sensor variable from script

      @jkandasa I will never be thankful enough for MyController

      I found this looking for a way to delete sensors older than a time interval. The reason is that over time and trials I have accumulated a huge amount of sensor variables which I would like to get rid of.
      Sometimes they are just sensor variables added on top of the true ones.

      Since I have little practice with Javascript I would need some guidance to write a script which removes all the sensor variables older than a given (fixed) interval.

      posted in Scripts
      F
      fsgrazzutti
    • RE: Compiler error due to SimpleTimer library

      @jkandasa ,
      thanks a lot for the prompt answer.

      Fun fact, this is the library I use, and there's no run() method, but it appears in the example on the page you linked.

      I'm confused now.

      Cheers,
      Franco

      posted in MyControllerDevice (ESP8266)
      F
      fsgrazzutti
    • Compiler error due to SimpleTimer library

      Hi @jkandasa,

      I get this error:

      MyController.cpp: 158:9: error: 'class SimpleTimer' has no member named 'run
      158 | timer.run(); \ SimpleTimer is working
      | ^~~

      But I could not find any library that has this member.

      Any help is much appreciated

      posted in MyControllerDevice (ESP8266)
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa I just installed the last SNAPSHOT to the home server and restored the last backup and it works smoothly 🙂

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa today I installed the latest SNAPSHOT, but I wanted to start from a fresh configuration, so I did not restore any backup from the previous snapshot.

      So far, looks like it is running much faster, and the sensors dropdown list is filled in a few seconds instead of minutes as before.

      Great job ! Happy to be back with MyController !

      I will still keep the actual solution for the display.
      In this way the data from influxdb to the display doesn't go thought MyController. I added a second serial gateway(different channel and network ID) just for that scope, and so far just for date and time syncronisation.

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa I will give it a try to the snapshot, thanks !

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa sorry for the late reply.

      I don't get any error, just the lists are empty.
      Loading the Sensors subpage, it stays there forever.

      it seems a database relate issue, maybe I have too many sensors reporting. (average duration is 20ms, 600 messages per minute.

      In the meantime I just took a ESP32 and cyclic query in influx db all the sensors that the display expects, and then just forward node-to-node to the display (I use mysensors and nRF24 radio). Still a couple of variable casting problems on V_PERCENTAGE but it works.

      Of course, I look forward to get back to Mycontroller

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa already done yesterday, when I found it, but unfortunately it did not work.
      Must say that the system has lots of sensor variables (around 200).
      When I migrated, as described in the dirty way method, they were already all there.

      I will go to have a look later today. Is there any information that I might collect ?

      Btw, the sensors are shown in the node details and contain al the info.

      Action menu also works, but as soon as you encounter a drop down menu, it's empty

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa I installed the fresh instance and the nodes showed up immediately.
      I came back after few hours to start adding the forwardings but the sensors list is empty.

      Looking at the log I have found this

      2021-05-04 21:15:44,641 ERROR [mc-th-pool-0] [org.mycontroller.standalone.provider.EngineAbstract:279] Throws exception while processing!, [MessageImpl(gatewayId=1, nodeEui=5, sensorId=SENSOR_BC, type=Internal, subType=Pre sleep notification, ack=0, payload=500, isTxMessage=false, timestamp=1620155744629, properties=null)]
      java.util.concurrent.RejectedExecutionException: Task org.mycontroller.standalone.provider.ResourcesLogger@1d223de rejected from java.util.concurrent.ThreadPoolExecutor@a957bf[Running, pool size = 70, active threads = 70, queued tasks = 100, completed tasks = 551833]
      	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
      	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
      	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
      	at org.mycontroller.standalone.McThreadPoolFactory.execute(McThreadPoolFactory.java:52)
      	at org.mycontroller.standalone.provider.ExecuterAbstract.execute(ExecuterAbstract.java:134)
      	at org.mycontroller.standalone.provider.EngineAbstract.auditQueue(EngineAbstract.java:274)
      	at org.mycontroller.standalone.provider.EngineAbstract.run(EngineAbstract.java:133)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      repeated for every sensor variable. The sensor variables are all present in influxDB (remote server)

      What I am missing ?

      Thanks and kind reards,
      Franco

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forwarding stops working

      @jkandasa I see sporadic data coming in, while infludb receives all of them.
      I connected the serial gateway to the pc using MYScontroller and the data flows regularly.

      Now I created a new fresh install and I am restarting from the beginning.
      I still have to recreate the forwardings, which is a pain.

      I will let you know how it goes

      Cheers,
      Franco

      posted in Troubleshooting
      F
      fsgrazzutti
    • Forwarding stops working

      Hello,

      I am facing a problem which shows up every few days: sensors values forwarding suddenly stops working.

      This happens both on my home server (Atom Z8350, Ubuntu) and on my camper server (RPi 3B+).

      I did not find any realiable and repeatable procedure to recover the error.
      Sometimes it recovers restoring the day before backup, sometimes rebooting the Pi, disconnecting and reconnecting the serial gateway,
      Last Sunday I reinstalled a clean mycontroller instance, copied the backup from the previous and restored the last working backup.

      This morning, after having switched off the display which receives all the forwarded messages, it just stopped working after the reconnection.
      I restored the last backup and now also the connection with the external InfluxDB stopped working.

      I don´t know from where to start.
      I can just exclude hardware, RF or supply problems, since the mysensor network is proven to work reliably.

      Any help would be appreciated.

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: missing tag error on influxdb

      @jkandasa thank you !

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: missing tag error on influxdb

      I just added the tag host=mycontroller and now it works, but still I would like to understand why it´s needed.

      posted in Troubleshooting
      F
      fsgrazzutti
    • missing tag error on influxdb

      hello,
      I just installed influx db on the same RPi where mycontroller runs, just for testing.

      I get this error, no matter which variable I am sending:
      2020-11-12 11:43:01,414 ERROR [mc-th-pool-4] [org.mycontroller.standalone.externalserver.driver.DriverInfluxDB:58] Exception, fan_controller_7_ambient_1_temperature,7_1_temperature value=26 1605177781357000000
      org.influxdb.InfluxDBException$UnableToParseException: unable to parse 'fan_controller_7_ambient_1_temperature,7_1_temperature value=26 1605177781357000000': missing tag value

      this is the settings screenshot
      influxdb settings.PNG

      any help is appreciated.
      Franco

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forward payload list too short

      @jkandasa increasing the memory did it. thanks again !

      posted in Troubleshooting
      F
      fsgrazzutti
    • RE: Forward payload list too short

      @jkandasa oh good hint. I will try it !

      posted in Troubleshooting
      F
      fsgrazzutti