Giter Club home page Giter Club logo

iobroker.paw's Introduction

Logo

ioBroker.paw 2 BETA

=================

Number of Installations Number of Installations NPM version Downloads

NPM

Description

It is an adapter to control Android devices. It can speak texts, control volume, make calls, vibrate, and much more ... Tasker and Locale Plug-in support.

Install the program and configure the adapter.

!!! Do not forget to update the adapter with the application. If you use the old version, errors may occur.

Get it on Google Play

Screenshot

Screenshot

Object

[name_device] - name device

For each device, two main object branches are created:

paw.0.[name_device].info. - information about the device
paw.0.[name_device].comm. - control commands

There is also a branch for all devices:
paw.0.all_device. - control commands for all devices

paw.0.[name_device].comm.audio.alarm
paw.0.[name_device].comm.audio.music
paw.0.[name_device].comm.audio.notification
paw.0.[name_device].comm.audio.ring
paw.0.[name_device].comm.audio.system
paw.0.[name_device].comm.audio.voice

Set the volume on the device [number]

paw.0.[name_device].comm.call.number

Call the number [number]

paw.0.[name_device].comm.call.end

Reject call [boolean]

paw.0.[name_device].comm.display.brightness

Backlight brightness level from 4-100 [number]

paw.0.[name_device].comm.display.mode

Backlight type automatic or manual [boolean]

paw.0.[name_device].comm.display.toWake

Wake up devices from sleep [boolean]

paw.0.[name_device].comm.display.timeOff

Set backlight time [number] (sec)

paw.0.[name_device].comm.other.home

Go to home screen [boolean]

paw.0.[name_device].comm.other.openURL

Open url in browser [string]

paw.0.[name_device].comm.other.play

Play notification melody [boolean]

paw.0.[name_device].comm.other.vibrate

Enable vibration, time in seconds [number]

paw.0.[name_device].comm.tts.request

Send text to speech [string]

paw.0.[name_device].comm.tts.stop

Stop speech [boolean]

Screenshot

Commands for javascript

// [dev1] - is the name of the device, you can also enter IP devices.
// You can specify multiple devices separated by commas 'dev1, dev3, 192.168.1.71'
// all - send to all devices.


// send the text to the speech synthesizer.
sendTo("paw.0",'dev1,dev3',{tts:  'Hello World'});

// with callback
sendTo("paw.0",'all',{
    tts:  'Hello World'},function (res){
    log(JSON.stringify(res));
});

// set the screen backlight time in seconds. '0' - do not quit the screen (does not work on all devices) 
sendTo("paw.0",'dev1',{timeOff: '60'});

// wake up devices from sleep
sendTo("paw.0",'all',{toWake: true});

// backlight brightness level from 4-100
sendTo("paw.0",'dev1',{brightness: '50'});

// execute shell command (need root)
// "input tap x y" emulates a click on the screen x - coordinates along the mountains. Y - vertical coordinates.
// "poweroff -f" turn off devices
// "reboot" reboot device
sendTo("paw.0",'all',{exec:'input tap 100 100'});

// Exit to home screen. Emulate pressing the HOME button.
sendTo("paw.0",'all',{home:'true'});

// disable battery tracking, translates 0% (need root)
sendTo("paw.0",'dev1',{send:'battery_off'});

// run the application. You can enter a package name 'ru.codedevice.iobrokerpawii' or title name 'ioBroker.PAW II'
sendTo("paw.0",'all',{startApp:'lcf.clock'});

// get the list of installed applications.
sendTo("paw.0",'dev1',{
    apps:  'installed'  // or apps: 'all'  - get all applications
},function (res){
    log(JSON.stringify(res));
});

// !!! Not working yet

// send message.  
//sendTo("paw.0",'dev1',{message: '8123456789',text:  'Any text'});
//
//sendTo("paw.0",'192.168.1.71',{
//    message: '8123456789',
//    text:  'Any text'
//},function (res){
//    log(JSON.stringify(response));
//});


// setting the volume from 0 to 15, the maximum volume is set by the system,
sendTo("paw.0",'dev1',{volume: 5});

// call to number
sendTo("paw.0",'192.168.1.71',{call: '0611'});

// play default sound notifications
sendTo("paw.0",'all',{play: true});

// call the number or send ussd command.
sendTo("paw.0",'dev1',{call: '*100#'});

// enables vibration, [number] (time in milliseconds)
sendTo("paw.0",'dev1',{vibrate: '1000'});

// send notifications to devices
sendTo("paw.0",'all',{
    noti:  'Any text',       // text notifications
    title: 'Title',          //optional (default: Title)
    info: 'Any text',        //optional (default: '')
    vibrate:false,           //optional (default: false)  only works on SDK <= 26 
    sound:false,             //optional (default: false)  only works on SDK <= 26 
    light:true,              //optional (default: false)  only works on SDK <= 26 
    id:2,                    //optional (default: id++)
    channel:'Notification_2' //optional (default: 'Notification') Notification profile name, only works on SDK >= 26 
                      
},function(res){
     log(JSON.stringify(res));
});

// send alert dialog to devices.
sendTo("paw.0",'all',{
    alert:  'Any text', // text notifications
    id:'alert1',        // id alert, need to respone. respone = {"id":"alert1","state":"Maybe"}
    title: 'Title',     //optional (default: Title)
    positive: 'Yes',    //optional (default: '')
    neutral: 'Maybe',   //optional (default: '')
    negative: 'No' ,    //optional (default: '')
    sound:true          //optional (default: false)
},function(res){
     log(JSON.stringify(res));
});

// open the browser at the specified address
sendTo("paw.0",'dev1',{link: 'http://iobroker.net'});

// end call
sendTo("paw.0",'dev1',{callEnd: 'true'});

// get list Notification Sounds
sendTo("paw.0",'dev1',{listNotificationSounds: 'true'});

// get list Notification Sounds
sendTo("paw.0",'dev1',{
  listNotificationSounds: 'true'
},function(res){
     log(JSON.stringify(res)); 
                
// [[{"uri":"content://media/internal/audio/media/14","title":"Beep once"},
// {"uri":"content://media/internal/audio/media/62","title":"Beep once"},
// {"uri":"content://media/internal/audio/media/29","title":"Whistle"}]]
});

// set sounds notification
sendTo("paw.0",'dev1',{sound: 'content://media/internal/audio/media/62'});  


/*******  Tasker  *******/

// Attention!!! Enable in settings Tasker "Allow external access"

// Get the task list from the Tasker application "tasks": [auto, bubble, call, clock]
sendTo("paw.0",'dev1',{
    taskerList:  'tasker'
},function (res){
    log(JSON.stringify(res));
});

// Run the task from the Tasker application.
sendTo("paw.0",'dev2',{
    tasker : 'task_name',        // Name task
    myKeyOne : 123,              // (Optional) parameter will be passed to the variable %myKeyOne 
    myKeyTwo : "Hello World",    // (Optional) parameter will be passed to the variable %myKeyTwo
                                 // ... and so on
},function (res){
    log(JSON.stringify(res));
});

0.3.2

  • (bondrogeen) (adapter) Minor fixes. Fixed the toWake function. Added control version of the adapter and application.

0.3.1

  • (bondrogeen) (adapter) Minor fixes. (app) added widget and expanded item functionality

0.3.0

  • (foxriver76) added compact mode compatibility

0.2.8

  • (bondrogeen) minore fix application item, map SDK >=29 and changed adding device.

0.2.7

  • (bondrogeen) fix alert dialog, noti SDK >=26 app

0.2.6

  • (bondrogeen) minor fix adapter and app

0.2.5

  • (bondrogeen) npm publish

0.2.3

  • (bondrogeen) minor fix app

0.2.2

  • (bondrogeen) minor fix, add item feedback

0.2.1

  • (bondrogeen) release app

0.2.0

  • (bondrogeen) initial release

License

The MIT License (MIT)

Copyright (c) 2017 bondrogeen [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

iobroker.paw's People

Contributors

apollon77 avatar bondrogeen avatar foxriver76 avatar germanbluefox avatar ldittmar81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

iobroker.paw's Issues

paw release.akp

Hi there,
Its not possible to install paw release app at my android tablet PC.
I have android version 7.0.
To allow to install from unknown source its also impossible.
My Tablet can not open this akp file.
Greetings,
Mathias

Please correct npm maintainers configuration.

ioBroker adapter checker for npm access

Access right check for adapter paw returned the following issue:

Bluefox was not found in the collaborators on NPM!.
Please execute in adapter directory: "npm owner add bluefox iobroker.paw"

Current maintainers are
bondrogeen [email protected]

Please fix the above error as soon as possible.
All adapters listed at ioBroker repositories must have 'bluefox' added as maintainer.

Future version updates at the repositories will be suspended until this problem is fixed.

Vers 0.1.7 start task @tasker don´t work

HI,

in the newest version 0.1.7 it is not possible to send tasker actions to the paw server verion 0.97.2 on android.

used code on iobroker:
sendTo("paw.0",'TabE',{ send: 'task', text:'Display_aus', },function (response){ log(JSON.stringify(response[0])); });

error message in iobroker log:
2017-11-07 14:42:07.418 - info: paw.0 <html> bsh.EvalError: Sourced file: inline evaluation of: ``$$.print("<html>\n<body>\n"); import org.json.*; import de.fun2code.android.paws . . . '' : Attempt to resolve method: testStatus() on undefined variable or class name: TaskerIntent : at Line: 537 : in file: inline evaluation of: ``$$.print("<html>\n<body>\n"); import org.json.*; import de.fun2code.android.paws . . . '' : TaskerIntent .testStatus ( service )

works in vers 0.0.7

regards.

Display control not work

There is a another bug in iobroker adapter. I can not control display on/off with iobroker objects or scripts. Web control allready works perfectly. I there a way to control the tablet with web commands as workarround?

turnOnOff returns to Home

Hi,

when i use the turnOnOff command, my tablet android 6 (cyanogenmod) turns on, but to Homescreen. the last startet app in foreground goes to background.

Sorry, my bad english...

commands via JS dont work since last update

after the last update you fixed the web ui i noticed that javascript commands doesn´t work anymore. e.g.
e.g.
sendTo("paw.0",'all',{vibrate: '1000'});

and so on.

edit: was a fail by me. the device get a new ip by dhcp...

weird device naming/controlling combination

The namespace created for a device by the adapter takes the name which has been set in the app into account. On the other hand for sendTo commands it seems that I need to use the name which is set in the adapter settings. Took me some time, maybe at least add a hint to the docs or find a more intuitive solution. :-)

Thanks for the great work.

Turnonoff turnwake dosent work

Good day,

As information

when I use the TurnOnOff the tablet goes to your home screen.

At TurnWake, the tablet does not do anything.

Many Thanks

Ludino

restore latest version <0.2.0 from somewwhere? (latest before was 0.1.7) not on npm

To introduce such a breaking change in a minor version change is very bad :-( Broke my whole display control because I did not saw it before and now I have no way to go back to 0.1.7 which was working perfectly for me!
0.0.7 (which is stable) is broken too because ignored the ack flag.

Can you somehow publish a 0.1.7 which was latest github before 0.2.0 to npm somehow? That would help very much!! And then please put this into "stable".

It should be that timepoint: https://github.com/bondrogeen/ioBroker.paw/tree/3f8843d01bf695884584f49fe21851495c681643

Please add your adapter to ioBroker.discovery

I am an automatic service from ioBroker that searches adapters and makes suggestions.

I noticed that your adapter is not integrated in the ioBroker.discovery. Using the Discovery adapter, ioBroker can automatically find devices or suggest services to the user for installation. If possible I would live to see your adapter added there.

Some adapters have already been added and you can use them as blueprints. See: https://github.com/ioBroker/ioBroker.discovery You need to fork this project and then create a PR for your adapter to be added.

Basically the plugins can do HTTP calls, UDP discovery, MDNS, UPNP and will iterate over all devices found by IP scan and check local serial ports. If you want you can also add new discovery methods but please try to do that with at least dependencies as possible.

Then create one file under lib/adapters for your adapter to implement the detection and proposal of an instance to the user.

On questions, the other developers will support in the forum or via GitHub issues too.

If no detection is possible, simply close this issue and I won't bother you again. ;-)

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/bondrogeen/ioBroker.paw

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Please check ioBroker.paw with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

iobroker.PAW II crash at autostart

iobroker.PAW II app crash when using autostart option. Maybe because the WLAN connection is not active yet. Is a delayed start possible? When I start the app, it does'nt automatically connect to the iobroker server adapter. I have to select "Connection" first.

Feature-Request: Lock Android device

Is it possible to activate a lock screen/passcode request via IOBroker. So if the alarm system is activated a public android display is locked and if the alarm system is not active you can use the android display without a passcode.

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

Compatibility with js-Controller 6.x

Has anyone else Problems with js-controller Verison 6.x?
Here is the error list:

`

host.raspberrypi 2024-06-14 13:12:36.191 error instance system.adapter.paw.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: Node.js v18.20.3
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at node:internal/main/run_main_module:28:49
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Module._load (node:internal/modules/cjs/loader:1019:12)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1203:32)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1364:14)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.paw/main.js:495:3)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: at startAdapter (/opt/iobroker/node_modules/iobroker.paw/main.js:30:13)
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: TypeError: utils.Adapter is not a constructor
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: ^
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: adapter = new utils.Adapter(options);
host.raspberrypi 2024-06-14 13:12:36.191 error Caught by controller[0]: /opt/iobroker/node_modules/iobroker.paw/main.js:30
host.raspberrypi 2024-06-14 13:12:35.804 info instance system.adapter.paw.0 started with pid 2636
`

Is there anything I can do expect change back to js-controller v5.x?

npm update ?!

npm is still 0.0.7 ... veerry old and buggy ... :-)

Thank you

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Update stable version in repo to 0.3.2

Think about update stable version to 0.3.2

Version: stable=0.0.7 (1035 days old) => latest=0.3.2 (333 days old)
Installs: stable=250 (36.6%), latest=331 (48.46%), total=683
Click to edit

Verify Compact mode for your adapter

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

paw.0 | 2021-03-13 16:06:13.860 | warn | (32325) State "paw.0.SM-N975F.info.key.KEYCODE_BACK" has no existing object, this might lead to an error in future versions

paw.0 2021-03-13 16:06:13.860 warn (32325) State "paw.0.SM-N975F.info.key.KEYCODE_BACK" has no existing object, this might lead to an error in future versions
paw.0 2021-03-13 16:06:13.860 warn (32325) This object will not be created in future versions. Please report this to the developer.
paw.0 2021-03-13 16:06:13.860 warn (32325) Object paw.0.SM-N975F.info.key.KEYCODE_BACK is invalid: obj.common.read has an invalid type! Expected "boolean", received "string"
paw.0 2021-03-13 16:06:13.859 warn (32325) State "paw.0.SM-N975F.info.key.KEYCODE_BACK" has no existing object, this might lead to an error in future versions
paw.0 2021-03-13 16:06:13.858 warn (32325) This object will not be created in future versions. Please report this to the developer.
paw.0 2021-03-13 16:06:13.856 warn (32325) Object paw.0.SM-N975F.info.key.KEYCODE_BACK is invalid: obj.common.read has an invalid type! Expected "boolean", received "string"
paw.0 2021-03-13 16:06:12.298 warn (32325) Update app on device: SM-N975F

Update app on device: <Device>

Since new adapter version iobroker logs "warn: Update app on device: " with app version 1.33 from Playstore. Is there a newer version somewhere?

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/bondrogeen/ioBroker.paw

  • [E019] Invalid repository URL: git+https://github.com/bondrogeen/iobroker.paw.git. Expected: git+https://github.com/bondrogeen/ioBroker.paw.git
  • [E104] No common.titleLang found in io-package.json
  • [E145] No news found for actual version 0.3.2
  • [E150] No common.connectionType found in io-package.json
  • [E152] No common.dataSource found in io-package.json
  • [E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.paw"
  • [E504] found setInterval in "main.js, but no clearInterval detected
  • [E603] NO "## Changelog" found in README.md
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2022 bondrogeen [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2022 bondrogeen [email protected]" at the start of LICENSE

I have also found warnings that may be fixed if possible.

  • [W505] setTimeout found in "main.js", but no clearTimeout detected

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.