Giter Site home page Giter Site logo

iobroker.geofency's Issues

Authentication not working

Describe the bug
The built-in authentication seems to be without function. It is possible to submit a valid webhook without and with false login data and thus write corresponding values.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Geofency iOS App'
  2. Click on any of your Webhooks
  3. Clear the authentication fields and set up the webhook
    3.1 Alternatively enter wrong authentication data

Expected behaviour
If authentication is switched on in the adapter, I expect an authentication error in case of wrong or missing login data.

Versions:

  • Adapter version: 1.1.1
  • JS-Controller version: 4.0.23
  • Node version: 14.20.0
  • Operating system: Ubuntu 22.04

password check invalid

Line 139: if ((username != check_user) || (password == check_pass)) {
it should be: password != check_pass

port 7999 already in use

After upgrade to version 1.0.1, the adapter does not start.

Error log: instance system.adapter.geofency.0 terminated with code 1 (JS_CONTROLLER_STOPPED)

Debugging:

root@iobroker:iobroker$ iobroker stop geofency
The adapter "geofency.0" was stopped.

root@iobroker:iobroker$ iobroker debug geofency
Debugger listening on ws://127.0.0.1:9229/9132fbaf-f821-4371-bc14-63e24f7c0da4
For help, see: https://nodejs.org/en/docs/inspector
2021-03-09 17:28:57.764 - debug: geofency.0 (42118) Redis Objects: Use Redis connection: 127.0.0.1:9001
2021-03-09 17:28:57.781 - debug: geofency.0 (42118) Objects client ready ... initialize now
2021-03-09 17:28:57.782 - debug: geofency.0 (42118) Objects create System PubSub Client
2021-03-09 17:28:57.782 - debug: geofency.0 (42118) Objects create User PubSub Client
2021-03-09 17:28:57.783 - debug: geofency.0 (42118) Objects client initialize lua scripts
2021-03-09 17:28:57.793 - debug: geofency.0 (42118) Objects connected to redis: 127.0.0.1:9001
2021-03-09 17:28:57.796 - debug: geofency.0 (42118) objectDB connected
2021-03-09 17:28:57.797 - debug: geofency.0 (42118) Redis States: Use Redis connection: 127.0.0.1:6379
2021-03-09 17:28:57.799 - debug: geofency.0 (42118) States create System PubSub Client
2021-03-09 17:28:57.800 - debug: geofency.0 (42118) States create User PubSub Client
2021-03-09 17:28:57.802 - debug: geofency.0 (42118) States connected to redis: 127.0.0.1:6379
2021-03-09 17:28:57.802 - debug: geofency.0 (42118) statesDB connected
2021-03-09 17:28:57.884 - error: geofency.0 (42118) adapter disabled
2021-03-09 17:28:57.886 - info: geofency.0 (42118) starting. Version 1.0.1 in /usr/local/www/iobroker/node_modules/iobroker.geofency, node: v12.20.2, js-controller: 3.2.16
2021-03-09 17:28:57.902 - info: geofency.0 (42118) Adapter got 'Ready' Signal - initiating Main function...
2021-03-09 17:28:57.908 - error: geofency.0 (42118) port 7999 already in use
2021-03-09 17:28:57.909 - info: geofency.0 (42118) terminating http server on port 7999

root@iobroker:iobroker$ sockstat -46l | grep 7999
--> no process is listening on port 7999

Version 1.0.0 is running without problem.

geofency adapter crashes when using geofency app on iPhone

Good morning,

I'm trying to establish a proximity detection at home via iBeacon and geofency app on my iPhone..
I installed the most current version of the geofency adapter.

Whenever I try to sign in at home via geofency "test mode", the adapter crashes with the attached error.
I already set the geofency app to use JSON.

Does anybody know how to solve this error?

Thanks in advance,

David

Screenshot 2022-01-16 113048

atHome und atHomeCount werden nicht aktualisiert

Hallo zusammen,

seit einigen Wochen werden bei mir offenbar die atHome und atHomeCount Objekte nicht mehr aktualisiert. Die Detailobjekte unter geofency.0.Julian.Home werden jedoch ordnungsgemäß aktualisiert, wenn ich den Entry/Exit in Geofency auslöse.

Das ganze tritt auch bei einer komplett anderen Umgebung in einem anderen Haus auf, die zudem komplett neu aufgesetzt ist. Die einzige Gemeinsamkeit ist, dass beide ioBroker als Docker laufen. Dabei wird das letzte Image 7.0.1 verwendet.

Ich habe auch sämtliche ältere Adapter Versionen installiert, keine davon funktionierte. Auch die neue Beta v1.2.3 zeigt dasselbe Verhalten.

Hier ist ein Logauszug einer Anfrage ohne SSL und auch ohne Basic Auth, also möglichst schlank:

2022-10-02 14:32:37.688 - info: host.iobroker "system.adapter.geofency.0" enabled
2022-10-02 14:32:37.799 - info: host.iobroker instance system.adapter.geofency.0 started with pid 44723
2022-10-02 14:32:38.455 - debug: geofency.0 (44723) Redis Objects: Use Redis connection: 127.0.0.1:9001
2022-10-02 14:32:38.511 - debug: geofency.0 (44723) Objects client ready ... initialize now
2022-10-02 14:32:38.514 - debug: geofency.0 (44723) Objects create System PubSub Client
2022-10-02 14:32:38.515 - debug: geofency.0 (44723) Objects create User PubSub Client
2022-10-02 14:32:38.618 - debug: geofency.0 (44723) Objects client initialize lua scripts
2022-10-02 14:32:38.624 - debug: geofency.0 (44723) Objects connected to redis: 127.0.0.1:9001
2022-10-02 14:32:38.626 - silly: geofency.0 (44723) redis psubscribe cfg.o.system.user.*
2022-10-02 14:32:38.660 - silly: geofency.0 (44723) redis psubscribe cfg.o.enum.*
2022-10-02 14:32:38.663 - silly: geofency.0 (44723) objectDB connected
2022-10-02 14:32:38.665 - debug: geofency.0 (44723) Redis States: Use Redis connection: 127.0.0.1:9000
2022-10-02 14:32:38.682 - debug: geofency.0 (44723) States create System PubSub Client
2022-10-02 14:32:38.683 - debug: geofency.0 (44723) States create User PubSub Client
2022-10-02 14:32:38.750 - debug: geofency.0 (44723) States connected to redis: 127.0.0.1:9000
2022-10-02 14:32:38.751 - silly: geofency.0 (44723) statesDB connected
2022-10-02 14:32:38.860 - debug: geofency.0 (44723) Plugin sentry Initialize Plugin (enabled=true)
2022-10-02 14:32:39.170 - info: geofency.0 (44723) starting. Version 1.2.3 in /opt/iobroker/node_modules/iobroker.geofency, node: v16.16.0, js-controller: 4.0.23
2022-10-02 14:32:39.205 - info: geofency.0 (44723) http server listening on port 7999
2022-10-02 14:32:39.213 - silly: geofency.0 (44723) States system redis pmessage system.adapter.geofency.0.logLevel/system.adapter.geofency.0.logLevel:{"val":"silly","ack":true,"ts":1664713959200,"q":0,"from":"system.adapter.geofency.0","lc":1664713886600}
2022-10-02 14:32:42.734 - debug: geofency.0 (44723) Authorization Header is: "Basic Og=="
2022-10-02 14:32:42.734 - debug: geofency.0 (44723) request url: /Julian
2022-10-02 14:32:42.736 - info: geofency.0 (44723) adapter geofency received webhook from device Julian with values: name: Home, entry: 1

Interessant dabei, dass trotzdem ein Basic Auth Header erkannt wird (das habe ich aber schon an Tion / dem Entwickler von Geofency gemeldet, dürfte hier also keine Rolle spielen).

So sehen die Objekte aus, die mit der Verarbeitung der Anfrage angelegt wurden:

objects - iobroker 2022-10-02 14-36-20

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!

Release script: Action required

Hi, it looks like you are using @alcalzone/release-script to manage your releases.
When updating to the latest version, you need to remove the following line from your .github/workflows/test-and-release.yml if you want the releases to keep working:

  deploy:
    # Trigger this step only when a commit on master is tagged with a version number
    if: |
      contains(github.event.head_commit.message, '[skip ci]') == false &&
      github.event_name == 'push' &&
-     github.event.base_ref == 'refs/heads/master' &&
      startsWith(github.ref, 'refs/tags/v')

It may also look like this one:

  deploy:
    # Trigger this step only when a commit on master is tagged with a version number
    if: |
      contains(github.event.head_commit.message, '[skip ci]') == false &&
      github.event_name == 'push' &&
-     github.event.base_ref == 'refs/heads/main' &&
      startsWith(github.ref, 'refs/tags/v')

Uncaught exception

Hi,

I had this uncaught exception today.
No idea what triggered it.

.homie 2022-02-24 13:29:30.664 error instance system.adapter.geofency.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
geofency.0 2022-02-24 13:29:29.996 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
geofency.0 2022-02-24 13:29:29.994 info terminating
geofency.0 2022-02-24 13:29:29.974 error Unexpected token < in JSON at position 0
geofency.0 2022-02-24 13:29:29.973 error SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at IncomingMessage. (/opt/iobroker/node_modules/iobroker.geofency/geofency.js:167:32) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1346:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)
geofency.0 2022-02-24 13:29:29.969 error uncaught exception: Unexpected token < in JSON at position 0

Feature-Request

Da ich im Englischen nicht so gut bin und zusätzlich das erste mal unter GitHub schreibe, bitte ich um Nachsicht.

Die iOS App. Geofency sendet unter "POST Format" -> JSON-enkodiert folgendes:

[id] -> {Identifier des Ortes}
[name] -> {Ortsname}
[entry] -> {1 für Eintritt, 0 für Austritt}
[date] -> {Zeitstempel des Events}
[latitude] -> {Breitengrad des Ortes}
[longiitude] -> {Längengrad des Ortes}
[address] -> {Adressstring des Ortes}
[radius] -> {Überwachungsradius}
[device] -> {iOS Gerätekennung}
[beaconUUID] -> {iBeacon UUID}
[major] -> {iBeacon Major Nummer}
[minor] -> {iBeacon Minor Nummer}
[currentLatitude] -> {Proximity Breitengrad}
[currentLongitude] -> {Proximity Längengrad}
[wifiSSID] -> {SSID des verbundenen WLAN}
[wifiBSSID] -> {BSSID des verbundenen WLAN}
[motion] -> {Bewegungstyp: Gehen, Radfahren, etc.}

Folgende Werte sind aktuell als WERT im Geofency/ioBroker Adapter enthalten:

[entry] -> {1 für Eintritt, 0 für Austritt}
[date] -> {Zeitstempel des Events}

Ich würde mich sehr freuen, wenn die oben genannten Werte auch als tatsächlicher WERT als WERT im ioBroker zu Verfügung stehen würden.
Derzeit wird z.B. der Ort als Ordner gelistetet, was z.B. bei meiner AIO CREATOR NEO (mediola) Darstellung nicht Dargestellt werden kann. (nur Werte)

Ich hoffe es ist verständlich und würde mich riesig freuen, wenn dieser Umfangreiche Wunsch in Erfüllung gehen würde.

Cant find object on webhook post

Hi, I'm trying to enable your adapter.
After installing and configure it as described I've tried to see if it works....but no result at all.
I mean, I never get an error and in the log seems that the trigger works :

geofency.0 2020-04-21 19:18:45.267 info (6134) adapter geofency received webhook from device porta with values: name: iBeacon [Major *, Minor *], entry: 1
geofency.0 2020-04-21 19:18:36.236 info (6134) http server listening on port 7999
geofency.0 2020-04-21 19:18:36.201 info (6134) Adapter got 'Ready' Signal - initiating Main function...
geofency.0 2020-04-21 19:18:36.159 info (6134) starting. Version 0.3.2 in /opt/iobroker/node_modules/iobroker.geofency, node: v10.20.1
host.raspberrypi 2020-04-21 19:18:34.518 info instance system.adapter.geofency.0 started with pid 6134

But I never found the items in the objects, inside the geofency.0 folder there are only 2 items:
atHome
AtHomeCount

can you help me?

Webhook Fehler

Seit dem letzten Update funktioniert der Webhook nicht mehr über den IOT Adapter.

Fehlermeldung in der Geofency App:
Fehlgeschlagen ("message: Internal server error"

Ich habe an den Einstellungen nichts geändert.

Debug vom Adapter:

`

geofency.0 2022-03-17 23:08:19.355 warn Read-only state "geofency.0.Quirin.Heizung.data.name" has been written without ack-flag with value "Heizung"
geofency.0 2022-03-17 23:08:19.354 warn Read-only state "geofency.0.Quirin.Heizung.data.wifiBSSID" has been written without ack-flag with value "AUSGEBLENDETd:40:1a"
geofency.0 2022-03-17 23:08:19.354 warn Read-only state "geofency.0.Quirin.Heizung.data.entry" has been written without ack-flag with value "0"
geofency.0 2022-03-17 23:08:19.354 warn Read-only state "geofency.0.Quirin.Heizung.data.latitude" has been written without ack-flag with value "AUSGEBLENDET.994106"
geofency.0 2022-03-17 23:08:19.353 warn Read-only state "geofency.0.Quirin.Heizung.data.date" has been written without ack-flag with value "2022-03-17T22:08:18Z"
geofency.0 2022-03-17 23:08:19.353 warn Read-only state "geofency.0.Quirin.Heizung.data.address" has been written without ack-flag with value "ADRESSE-AUSGEBLENDET Deutschland"
geofency.0 2022-03-17 23:08:19.352 warn Read-only state "geofency.0.Quirin.Heizung.data.wifiSSID" has been written without ack-flag with value "Skynet"
geofency.0 2022-03-17 23:08:19.352 warn Read-only state "geofency.0.Quirin.Heizung.data.id" has been written without ack-flag with value "AUSGEBLENDET-9B0A-02BCA44C80A8"
geofency.0 2022-03-17 23:08:19.351 warn Read-only state "geofency.0.Quirin.Heizung.data.longitude" has been written without ack-flag with value "11.820934"
geofency.0 2022-03-17 23:08:19.348 warn Read-only state "geofency.0.Quirin.Heizung.data.radius" has been written without ack-flag with value "10000"
geofency.0 2022-03-17 23:08:19.348 warn Read-only state "geofency.0.Quirin.Heizung.data.device" has been written without ack-flag with value "AUSGEBLENDET-9994-EE71BB94A6DB"
geofency.0 2022-03-17 23:08:19.347 warn Read-only state "geofency.0.Quirin.Heizung.json" has been written without ack-flag with value "{"device":"AUSGEBLENDET-465C-9994-EE71BB94A6DB","radius":"10000","longitude":"AUSGEBLENDET.820934","id":"AUSGEBLENDET-9B0A-02BCA44C80A8","wifiSSID":"AUSGEBLENDET","address":"ADRESSE-AUSGEBLENDET\nDeutschland","date":"2022-03-17T22:08:18Z","latitude":"AUSGEBLENDET.994106","entry":"0","wifiBSSID":"AUSGEBLENDET","name":"Heizung"}"
geofency.0 2022-03-17 23:08:19.300 info adapter geofency received webhook from device Quirin with values: name: Heizung, entry: 0
geofency.0 2022-03-17 23:08:19.299 info Message received = {"command":"send","message":{"user":"Quirin","data":{"device":"AUSGEBLENDET_994-EE71BB94A6DB","radius":"10000","longitude":"AUSGEBLENDET.820934","id":"AUSGEBLENDET-02BCA44C80A8","wifiSSID":"Skynet","address":ADRESSE-AUSGEBLENDET\nDeutschland","date":"2022-03-17T22:08:18Z","latitude":"AUSGEBLENDET.994106","entry":"0","wifiBSSID":"AUSGEBLENDET","name":"Heizung"}},"from":"system.adapter.javascript.0","_id":59524672}
`

Adapterversion: 1.1.0
JS-Controller: 4.0.21
Node-Version: v14.19.0

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!

npm package

Hallo, can someone update the npm-package of this adapter?

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.

Icon

Icon sieht irgendwie komisch aus. :)
Kannst du von hier das Bild nehmen?

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/ioBroker/ioBroker.geofency

  • [E104] No common.titleLang found in io-package.json
  • [E109] desc in io-package.json should be an object for many languages. Found only listening for geofency events. Based on the location based mobile App (Geofency)
  • [E114] No adapter are allowed in the repo without admin3 support
  • [E150] No common.connectionType found in io-package.json
  • [E152] No common.dataSource found in io-package.json
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2022 Daniel Schaedler [email protected]" at the end of README.md

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

  • [W113] Adapter should support compact mode

Thanks,
your automatic adapter checker.

Add documentation for "sendTo" to README

I had no idea that this option exists:

0.2.0 (2017-06-09)

(Apollon77) Add option to send in data as Message when received over other ways

Please provide an example (blockly? or JavaScript) how to push the json payload

Adapter may be broken

The adapter crashes everytime I send a Webhook from Geofency 5.7

geofency.0 | 2018-10-18 12:16:46.820 | error | at process._tickCallback (internal/process/next_tick.js:104:9)
-- | -- | -- | --
geofency.0 | 2018-10-18 12:16:46.820 | error | at _combinedTickCallback (internal/process/next_tick.js:80:11)
geofency.0 | 2018-10-18 12:16:46.820 | error | at endReadableNT (_stream_readable.js:978:12)
geofency.0 | 2018-10-18 12:16:46.820 | error | at IncomingMessage.emit (events.js:185:7)
geofency.0 | 2018-10-18 12:16:46.820 | error | at emitNone (events.js:86:13)
geofency.0 | 2018-10-18 12:16:46.820 | error | at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.geofency/geofency.js:164:30)
geofency.0 | 2018-10-18 12:16:46.820 | error | at Object.parse (native)
geofency.0 | 2018-10-18 12:16:46.820 | error | SyntaxError: Unexpected token d in JSON at position 0
geofency.0 | 2018-10-18 12:16:46.819 | error | uncaught exception: Unexpected token d in JSON at position 0

I guess it may be because the webhook is now containing more information (the app release notes say there are SSID and BSSID contained from now on)?

Use iot Adapter instead of internal server

I did not want to open/expose my ioBroker server to the internet, therefore I was not able to use the adapter with it's internal server.
I use the iot Adapter, to have a secure interface via the internet.

This post describes a way to connect geofency via iot. Would be great if geofency could just use a free-to-choose datapoint as json input. Connection via iot would be rather simple I guess and would push the standard ioBroker adapters further.

This object will not be created in future versions.

Hi,

I received these messages in the log with the message to report this to the developer:

2022-02-09 17:26:06.915 warn This object will not be created in future versions. Please report this to the developer.
geofency.0 2022-02-09 17:26:06.913 warn
geofency.0 2022-02-09 17:26:05.518 warn
geofency.0 2022-02-09 17:26:05.410 warn

Versions:

  • Adapter version: 1.0.3
  • JS-Controller version: 4.0.5
  • Node version:164.0
  • Operating system: Ubuntu 18.04

Please check ioBroker.geofency 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.

Error in future version

V1.0
`

geofency.0 2021-03-01 08:14:56.014 warn (21910) State "geofency.0.Martin.buero.currentLongitude" has no existing object, this might lead to an error in future versions
geofency.0 2021-03-01 08:14:56.013 warn (21910) State "geofency.0.Martin.buero.currentLatitude" has no existing object, this might lead to an error in future versions
geofency.0 2021-03-01 08:14:56.011 warn (21910) State "geofency.0.Martin.buero.name" has no existing object, this might lead to an error in future versions
geofency.0 2021-03-01 08:14:56.010 warn (21910) State "geofency.0.Martin.buero.motion" has no existing object, this might lead to an error in future versions

`

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.