Closed theAnDrO40 closed 3 years ago
Hello,
Yes you can trigger the charging level from your iPad. For example I need more Information about your configuration. Which sockets do you have e.g. TP-LINK HS110 ...
I don't really know what you mean. If you use the node "Locate my Devices" you get a list of all your Apple Devices with ID. The ID is the unique identifier of your device. You can use this id to filter only your iPad.
Okay thank you for your fast reply
I have the following situation. I have an raspberry pi with hoobs/homebridge in background there is an instance running of node red.
Your Node red plug-in is working well. Now my problem in my hoobs/homebridge I added the Shelly Plugin because I want to trigger the Shelly if the battery is below 10% and the same at 100%.
I have no idea how I cat realise this in node red. Sorry
Yes I found all these information in the debug msg.
I don't know I had tested several functions with the additional node red Shelly plugin.
If functions and simple switch functions maybe I have to add a function if triggered then know idea
You can use a simply Function: if(msg.payload.iPad[0].batterLevel < 10){ msg.payload = { "relay": 0, "on": true}; }else if(msg.payload.iPad[0].batterLevel = 100){ msg.payload = { "relay": 0, "on": false}; }else{ msg.payload = { "relay": 0, "on": false}; } return msg;
I think that works for you....
Unfortunately I don't have any Shellys to test it out. But I like the idea a lot :-)
if you use the Node-Red Node node-red-contrib-shelly
then you must use following function:
if(msg.payload.iPad[0].batterLevel < 10){ msg = { "relay": 0, "on": true}; }else if(msg.payload.iPad[0].batterLevel = 100){ msg = { "relay": 0, "on": false}; }else{ msg = { "relay": 0, "on": false}; } return msg;
I hope I could help you
Thanks a lot in this case I didn't see the wood for the trees
Thank works great have a nice evening.
Nice that it works. You also have a nice evening. If you like my plugins or addons, then follow me on Github or give me a star.
Br Daniel
One little thing I missed it must be msg.payload instead of only msg then it works.
Thank you
Hey I've a question
My first question is there a possibility to readout the battery level from my iPad and trigger a power outlet for charging this iPad
I don't no how to build up such a Flow in Node RED because I'm not familiar enough with Node RED and I hope somebody can help me.
My next question is du have to filter the apple device before I ask for the battery level ?