MyController v2.0.0 released
Best posts made by jkandasa
-
Mycontroller 2.x ideas
Hello everyone,
MyController was born around August 2015. Currently, version 1.0.0 available for public and before 25, December 2017, version 1.1.0 will be available for the public.
- I see some performance issues with MyController when we have a number of sensors grow.
- We need end user-friendly GUI. I believe for now we have only admin friendly GUI.
- There is no mobile application.
- Supports more databases. H2DB, MySQL, MariaDB, PostgresSQL. To reduce complexity support only for one DB or maximum two databases.
- and more
To rectify all these issues, I am planning to build MyController 2.x from scratch. With the following technologies.
Spring boot with UndertowGoLangAngular 4 front endReactJSIonic mobile applicationReactive native- Two type databases
RDBMS for sensor metadataIn-Memory and MongoDB for data- InfluxDB for metrics
- backup/restore as
CSVYAML or JSON file(except metrics data)
Still, I want to keep MyController's primary platform as Rasberry PI.
Kindly share your experience with influxDB and raspberry PI in the long run. Also, share your thoughts on this big move.
-
RE: How to set sensor value with javascript
var pingDistance = tankDistanceSensor.value; //Water tank level percent
You have to use
parseInt(tankDistanceSensor.value)
, Sensor variable always have String value.
var pingDistance = parseInt(tankDistanceSensor.value); //Water tank level percent
//THESE 2 LINES DO NOT SEEM TO SET THE VALUES
tankLitresSensor.setValue(litres);
tankPercentageSensor.setValue(percentage);After these two lines add the following lines,
mcApi.sensor().sendPayload(tankLitresSensor); mcApi.sensor().sendPayload(tankPercentageSensor);
-
MyController 2.x development work started
I started working on MyController version 2.x.
Existing repository renamed tomycontroller-v1-legacy
.Version 1.x: https://github.com/mycontroller-org/mycontroller-v1-legacy
Version 2.x: https://github.com/mycontroller-org/backend and https://github.com/mycontroller-org/console-web
-
RE: Forum logo transparency
@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. -
RE: Battery level in rules or chart? [Script Rule to check battery level]
@DaTTcz For now direct battery support not available on Rules. However you can do it from
script
. I will update how to handle with script.Kindly create a request on github page to support battery level on rules.ALL these features are available on SNAPSHOT build
Enter your condition via script,
Steps:
- Create UID Tag for your node,
- Create script to check node battery level (script type: Condition)
- Create rule with this condition script
- Enjoy
Create UID Tag:
Add script:
Java Script to check battery level,var myImports = new JavaImporter(java.io, java.lang, java.util, java.text); with(myImports) { var mcResult = false; //By default this is false. When your condition meets change this to true var batteryLevel = mcApi.uidTag().getByUid("node1").resource.batteryLevel; if(batteryLevel >= 50){ // Your condition mcResult = true; } }
Add rule:
-
RE: Multiple NRF24L01+ gateways
@skywatch The error shown here is not related to the issue you are facing. This is error is not harmful.
-
RE: 0.0.3.Final pre-release - volunteers required to test
Data retore complete log message is show 7 seconds after shutdown message log, but it works
Looks like taking some time to restore on your machine.
However, the following message says shutdown complete. Which leads confusion for you. I will sync these messages. Thank you! No worries2017-01-17 11:21:28,290 INFO [MyController.org Shutdown-Hook] [org.mycontroller.standalone.AppShutdownHook:36] Bye, Have a nice day! See you soon
-
RE: Integrate Blockly
@blacksheepinc Hi, Yes, I had a look. And looks like we can implement with MyController with some new implementation to support for JSR223 standard(which is used in Java). Kindly create a request on github.com/mycontroller-org/mycontroller/issues When I get time I will work on this. Thank you!
-
How to delete a sensor variable from script
For now, there is no option to delete a sensor variable alone from the GUI. So I'm providing an option to delete a sensor variable from a script.
Note: This API available from
1.4.0.Final
version.- Now get
SensorVariable
id from Sensors page.Resources >> Sensors >> Click on view details
,
Now click on edit ofsensor variable
On the URL you can see sensor variable id, This is id is important note it for your target
sensor variable
Add the following script on your controller,
Extension:JavaScript
Type:Operation
var myImports = new JavaImporter(java.io, java.lang, java.util); with(myImports) { // pass sensor variable as bindings, example: { id: 99 } mcApi.sensor().deleteSensorVariable(id); }
Execute the script as
Run now
(select the script and inActions
you can seeRun now
),
Pass the sensor variable id as bindings, here it is{ id: 99 }
,
Click on
Run
. All done. Now yourSensor variable
removed from MyController. - Now get
Latest posts made by jkandasa
-
RE: Request failed with status code 401
Hi @wint0178, when you logged in to the server, if you see this error, it was happened before login.
If it comes only one time and all other functions are working as expected, please ignore this error. -
RE: Request failed with status code 401
@wint0178 can you access the server on the localhost or in LAN?
Are you seeing the error on UI? Can you share the screen shot? -
RE: Trouble with MC v2 install on RPi 4
Thanks @wint0178 !!
I will go through the installation documentation and sync with your update. -
RE: Trouble with MC v2 install on RPi 4
@wint0178 Thanks for the details
I see you have an trailing space after\
("--env TZ="Asia/Kolkata" \ "
), that leadsrestart
command not found
I have updated your timezone and removed the extra space, can you please try the following command to start the MyController server?go to your mycontroller directory(root of
mc_home
and location ofmycontroller.yaml
) and run the following commanddocker run --detach --name mycontroller \ --network mycontroller \ --publish 8080:8080 \ --publish 8443:8443 \ --publish 9443:9443 \ --volume $PWD/mc_home:/mc_home \ --volume $PWD/mycontroller.yaml:/app/mycontroller.yaml \ --env TZ="America/Chicago" \ --restart unless-stopped \ docker.io/mycontroller/server:2.0.0
If it doesn't comes up please run the following command, I just removed the
--detach
(don't run on background) and added--rm
(remove the container on termination)docker run --rm --name mycontroller \ --network mycontroller \ --publish 8080:8080 \ --publish 8443:8443 \ --publish 9443:9443 \ --volume $PWD/mc_home:/mc_home \ --volume $PWD/mycontroller.yaml:/app/mycontroller.yaml \ --env TZ="America/Chicago" \ --restart unless-stopped \ docker.io/mycontroller/server:2.0.0
I assume if I uninstall docker to try and update it using the code you include in the documentation, as you suggested, that I will also need to reinstall influxdb, natsio, and mqtt. Is that correct?
Yes, In the docker just removes the containers and creates from fresh.
I was just messing with your install from executable binary instructions and I got the MC server running and can pull it up at localhost:8080. When I run docker ps -a I am still getting the same three services running: mqtt, influxdb, and natsio. Is this correct?
executable is different than the docker. It will not be come under
docker ps
command.
It executes directly on the host system.
I would recommend to use docker version of mycontroller, for the portability and maintainabilitythe running server on localhost has a warning that the Metrics database is disabled. I assume this has to do with installing MC from the binary, but it feels like progress anyway.
This is because, executable which is running on outside of docker network and can not resolve the hostname used inside docker. If you replace hostname of
mc_natsio
,mc_influxdb
tolocalhost
on yourmycontroller.yaml
[1] should work. However, I would recommend to try the docker version of mycontroller.[1] - If you apply this change, it will not work on docker version of mycontroller
-
RE: Trouble with MC v2 install on RPi 4
@wint0178 What is the log do you see on the
mycontroller
container?docker logs mycontroller
and what is the output of,
docker ps -a
This is where I get hung up, but I'm not sure if I have settings above here incorrect or if there is something wrong with the following install/run commands.
Can you please elaborate? Does the terminal hung to return?
-
RE: Setting up MQTT
@wint0178 on the other post, I see you were able to see the nodes. Still do you see this issue?
-
RE: Setting up MQTT
@wint0178 Are you using MySensors library?
Your MQTT broker should be accessible to all of your hardware gateway nodes and MyController server. MyController server is acting as MQTT client, just like another MQTT device in your network. -
RE: SSD filled overnight
@wint0178 You can use letsencrypt certification setup with
https_acme
to your DDNS setup, https://v2.mycontroller.org/docs/installation/advanced-installation/backend-configuration/ -
RE: Moving Server to another location
@jkandasa I have fixed this. available in the docker container(
2.1.0-devel
). yet to update in executable. -
RE: SSD filled overnight
@wint0178 I have not experienced this kind of issue. check the filesystem. you can find the root cause. Please let us know your findings. You can check this after your family road trip