@jkandasa Here is another suggestion to think of for version 2.0.......
It would be nice to have a feature that could be enabled or disabled with a click that will perform the following......
Random Action - I am thinking of lights here for security purposes and making a building look more occupied than ordinary timers will allow. So a feature that allows random on times and random off times, within a specified portion (or portions) of the day/week/etc.
Kitchen lights should be randomly turned on for minimum 2 minutes and maximum 5 minutes from 6am to 7.30am AND between 5pm -10pm.
Bedroom lights should be turned on randomly for minimum 10 minutes and mazimum 20 minutes betwee 5.30am and 6.30am AND between 8pm and 11pm.
And so on for different zones of lights.
Once the vatiable are set then it should simply be a matter of enabling all when going away and perhaps you can even add a nice auto-disable for when you are away for a known number of days..... ?
This could also apply to turning on/off radio etc to enhance the effect.
@BraydenM timestamp is the number of milliseconds that have elapsed since January 1, 1970 at 00:00:00 GMT.
Note: In java it is in milliseconds. But in UNIX/Linux it is in seconds.
In python, you can convert to date, time by using the function, datetime.datetime.fromtimestamp(1582439517).
I believe it should be seconds. So you have to do, received timestamp / 1000 = in seconds
I was unframiliar with what JSON were as I've never used java.
JSON is not a java specific. We can use it most of the languages. Examples in Python, https://docs.python.org/3/library/json.html
@mtiutiu said in REST API for smart sleep enabled nodes:
It would be nice to have that working using the sendRawMessage endpoint also. I can open an issue on Github if needed.
Yes, please open a ticket. I will check and update you. Thanks!
@TomG Thanks - I have a few pi2 running like that as they can't boot from SD, so I know how you do that.
I have thoughts on what I can do next, but it is Mothers Day here tomorrow and I will be busy all weekend
@habartik93 Stop MyController and delete mycontroller/conf/persistent_stores/* director and start MyController.
backup of moquette_store.mapdb.p not required. If you are still afraid to delete, take a backup of moquette_store.mapdb.p and delete it then start MyController. If everything goes good. delete your backup file of moquette_store.mapdb.p. it will free up space in your disk.
@Anduril said in set a time delay in java operation:
Another minor question: I added Names to my sensors (which were auto-detected during node presentation if that matters), but they get overwritten with for example 74522 TSF:MSG:READ,17-17-0,s=22,c=0,t=23,pt=0,l=0,sg=1: which seems to be the complete serial incoming message for that sensor. Is this know and is there a way to avoid this name-changing?
Yes, we have an option to lock the name. Add this property on your node.
For more detail have a look at https://github.com/mycontroller-org/mycontroller/issues/464
seant100 created this issue in mycontroller-org/mycontroller
Custom node name
@matth1187 hi there,
"Does MYSBootloader prevent me from uploading sketch to a node via IDE. so in otherwords a node with MYSBootloader can only be program with OTA and not from serial/arduino ide?"
I'm allso still wondering about this. At first i had my nodes programmed via ftdi and arduinoIDE, then burned mysbootloader and could start OTA (allthough it didn't seem to succeed). I could then still program the nodes via ftdi (atleast arduinoIDE didn't throw an error and would write). Then i tried burning bootloader and then program with usbasp using shift-upload in arduinoIDE. When powering on nodes mycontroller can still descover them but when requesting firmware OTA i would only see "nodeID/255/4/0/1" in mqtt client but no response. So i'm still very confused. Did you find an answer to this question? Thanks
@Marcel Thank you for your patience!
OTA works in the following way,
send available firmware details(version, checksum, etc.,) to the node
If node thinks, it is a different sketch, it will request block by block.
MyController sends firmware block data(requested block)
When I have a new node, this will publish an auto node ID. Then I cannot upload new firmware because if I do this the default firmware will be loaded? I am not sure if that is even possible with manually assigned numberings of nodes.
Assigning node ID is a different process than OTA. So do not get confuse with node ID assignment.
So the next step is that I press edit on the new node and assign the firmware to it (that I added to utilities\firmware tab) and save this and the press the above button upload firmware? This seems to work but I am not sure if this is the correct process as I find this not very logical.
Yes, this is the correct way to upload firmware and it is by design. You can keep any number of version of the firmware and assign a version to a particular node.
When I would like to update a node, I add the software again to the utilities\firmware tab, edit the specific node and assign this new software and do the upload firmware again? Correct?
The part where it did goes wrong is that I put the default switch on for firmware as I saw errors in the logging about this. Then this will upload software (which is already on another node) to the new node and you get duplicated node numbers.
Default firmware should not contain node id statically. It is mainly used when we use MYSBootloader. With this boot loader, we may not have any firmware. So we can keep default firmware for the first time. and later we can switch to new firmware by assigning manually.
That is up to our convenience. We can go without default firmware also.
You can disable it as follows,
So preferable, I would like to see. Add also the possibility that you have a split menu. Upload Assigned/default firmware or upload firmware where you get a popup and select the one you would like to upload to your node.
Yes, nice feedback/enhancement request. Could you please create a ticket in GitHub?
Secondly, I had a problem with my boot software. The first time it advertises itself and after the upload of the new firmware, I could never upload new firmware again. I have downloaded the MySensors Bootloader and recompiled it for my hardware (slim node atMega328p 8MHz) and this bootloader seems to work okay
Great! I hope you have mentioned MYSBootloader ^^