• Howto run an Rpi or Opi from SSD (sd card only required for boot)

    Pinned
    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • Howto make Mycontroller sd-card friendly? (Highly experimental!!)

    Pinned
    15
    0 Votes
    15 Posts
    4k Views
    T
    @wanvo Hi, I assume you mean putting the influx database in ram?. yes that should be possible since this is just a ram disk.... but take precautions to powerfailures... power-off = data gone.....
  • 0 Votes
    12 Posts
    11k Views
    jkandasaJ
    @Fraid I am using Eclipse Luna. Let me try with Helios.
  • mcApi.http() Examples

    4
    0 Votes
    4 Posts
    282 Views
    jkandasaJ
    @row supported methods in http, https://github.com/mycontroller-org/mycontroller-v1-legacy/blob/8c540b61e56a694ec9a8c8ae21a107839091d3d0/modules/core/src/main/java/org/mycontroller/standalone/api/HttpApi.java#L31
  • Communication between 2 pi each running mycontroller

    5
    0 Votes
    5 Posts
    1k Views
    skywatchS
    @daniele Thanks for the suggestions. I know I can get the end result I want with operations so probably go that route for now and see what new surprises version 2 brings!
  • How to build a new gateway adapter to accept REST request?

    5
    0 Votes
    5 Posts
    336 Views
    jkandasaJ
    @xuch74 you have to create your own REST API server, that server should act as a REST-MQTT adapter. On MyController create a mycontroller device type gateway with mqtt and add topic details from your adapter.
  • Forum logo transparency

    5
    2 Votes
    5 Posts
    519 Views
    jkandasaJ
    @Avamander Thanks for the pointer. Discourse needs more resources than NodeBB. We do not have that much budget. So, for now, we do not have any plans to upgrade.
  • Programmatically reboot a node

    15
    0 Votes
    15 Posts
    729 Views
    jkandasaJ
    Probably a stupid question, but will this reboot all mys GW attached to the pi? @skywatch Yes, it will. if your mys GW powered by RPI
  • servlet independent mycontroller

    2
    0 Votes
    2 Posts
    207 Views
    jkandasaJ
    @guisz1 There is no uncoupled version. But you can change the server easily on here. The undertow may fit easily.
  • Changing gateway type

    2
    0 Votes
    2 Posts
    359 Views
    jkandasaJ
    @Daniele Changing gateway type will not impact your data/settings. I hope you are changing the gateway, the underlying node structure will remain the same. I recommend taking a backup prior to this action.
  • Action on node connected?

    3
    0 Votes
    3 Posts
    291 Views
    skywatchS
    That sounds promising - I was thinking of having a 'beacon' node in the car that would turn on outside lights whenever I got within range and it was dark outside. I could also have the controller send any warning messages (like alarm activation) to the car.
  • How to set sensor value with javascript

    8
    0 Votes
    8 Posts
    3k Views
    D
    Maybe I missed something, but I have fake sensors defined on real nodes, and I update them thru scripts, and I have ack enabled. Everything works fine! The message goes thru the gateway, the node receives it and replies with ack, even if it doesn't anything with it. Is your nose sleeping maybe?
  • gpio shutdown from within mycontroller?

    4
    0 Votes
    4 Posts
    315 Views
    jkandasaJ
    @skywatch Do you think it will be an issue with mcagent also running? Could there be a conflict with both python and mcagent trying to access the gpio ports? If you access the same pin from both side(Python and mcagent), it may conflict. Otherwise no issue.
  • How to receive a notification when a message has no Ack

    5
    0 Votes
    5 Posts
    574 Views
    D
    Done! 494
  • Gateway type and performance

    5
    0 Votes
    5 Posts
    622 Views
    jkandasaJ
    @Daniele Personally I do not see any performance difference/issue when using MQTT.
  • notification on node down status

    8
    0 Votes
    8 Posts
    875 Views
    jkandasaJ
    @Daniele Your code looks super cool and awesome. I just added few HTML template style (you may not like ) and minor tune. Thanks for the awesome code!! var myImports = new JavaImporter(java.io, java.lang, java.util,java.lang.Object, org.mycontroller.standalone.utils.McUtils); with(myImports) { var options = new HashMap(); options.put("orderBy", "Eui"); options.put("order", "asc"); options.put("pageLimit", new Long(-1)); // -1 to list all the nodes var nodes = mcApi.node().getAll(options); var nodesVar = mcApi.variable().get("nodes_state"); // It is good to have key in lowercase and no space var nodesOU = JSON.parse(nodesVar.value); var nodesOD = JSON.parse(nodesVar.value2); var nodesU = []; var nodesD = []; var subject = "[MyController] Nodes status"; var tableBody = ""; for (i = 0; i < nodes.data.length; i++) { var nodeStatus = { }; var _nodeId = nodes.data[i].getId(); // nodeId is unique and internal // but still if you want to refer node EUI and gateway id, use the following line and comment above line. //var _nodeId = nodes.data[i].getGatewayTable().getId() + '-' + nodes.data[i].getEui(); var _nodeState = nodes.data[i].getState(); nodeStatus[_nodeId] = _nodeState; // update in to our common map if (_nodeState == "UP") { nodesU.push(_nodeId); var prevState = ""; for (j = 0; j < nodesOU.length; j++){ if (nodesOU[j] == _nodeId) prevState = "UP"; } if (prevState != "UP") tableBody += "<tr style='color: green;'><td>" + _nodeId + "</td><td>" + nodes.data[i].getName() + "</td><td>" + nodes.data[i].getEui() + "</td><td>" + _nodeState + "</td><td>" + mcApi.utils().friendlyTime(nodes.data[i].getLastSeen()) + "</td></tr>"; } if (_nodeState == "DOWN") { nodesD.push(_nodeId); var prevState = ""; for (j = 0; j < nodesOD.length; j++){ if (nodesOD[j] == nodeId) prevState = "DOWN"; } if (prevState != "DOWN") tableBody += "<tr style='color: red;'><td>" + _nodeId + "</td><td>" + nodes.data[i].getName() + "</td><td>" + nodes.data[i].getEui() + "</td><td>" + _nodeState + "</td><td>" + mcApi.utils().friendlyTime(nodes.data[i].getLastSeen()) + "</td></tr>"; } } if (tableBody.length > 0){ var pageStart = "Hello,<BR><BR>"; var tableStyle = '<table border = "1" cellpadding = "5" style="border-collapse: collapse;border: none;"><tbody><tr><th align="left">Id</th><th align="left">Name</th><th align="left">EUI</th><th align="left">State</th><th align="left">Since</th></tr>'; var tableEnd = '</tbody></table>'; var pageEnd = "<BR><BR>--MyController.org<BR>"; // mcApi.operation().sendPushbulletNote(null, "abc@xyz.com", null, subject, message); mcApi.operation().sendEmail("abc@xyz.com", subject, pageStart + tableStyle + tableBody + tableEnd + pageEnd); } nodesVar.value = JSON.stringify(nodesU); nodesVar.value2 = JSON.stringify(nodesD); nodesVar.save(); } Email will be looking like this, [image: 1548079561113-310032a4-3e1b-4191-9c0e-c42d7a1ff5f0-image.png]
  • Plans for ESP32 boards??

    4
    0 Votes
    4 Posts
    729 Views
    T
    Ah okay, and what exact errors do you see? (never compiled this, but I can see if I am able to help you...)
  • JSON parser

    14
    0 Votes
    14 Posts
    1k Views
    skywatchS
    @Emenike It is free. There are no api keys needed. You go to the main Metcheck page, select your location for the weather location you want to use, then towards the bottom of the page is a button labeled 'JSON'. Click that button and it gives you a url to use (just modify the script above for the url it gives you) Sripts are under Utiliries menu in my controller main page. After that manually running the script fetches data fine, but from there on you will need jkandasas help as this is as far as I have got.
  • Weatherdata structure question

    10
    0 Votes
    10 Posts
    2k Views
    skywatchS
    @Emenike https://forum.mycontroller.org/topic/371/json-parser/10 This is all I know about it so far.
  • serial mqtt adapter

    2
    0 Votes
    2 Posts
    494 Views
    jkandasaJ
    @cslauritsen Yes, it should work. MySenosrs serial Gateway <--> serial2mqtt <--> MyController(MQTT gateway)

0

Online

556

Users

525

Topics

3.4k

Posts