iobroker / iobroker.geofency Goto Github PK
View Code? Open in Web Editor NEWprovides a websever for geofency-webhooks
License: MIT License
provides a websever for geofency-webhooks
License: MIT License
Version: stable=0.3.2 (1114 days old) => latest=1.0.3 (15 days old)
Installs: stable=756 (79.92%), latest=143 (15.12%), total=946
Click to edit
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:
Expected behaviour
If authentication is switched on in the adapter, I expect an authentication error in case of wrong or missing login data.
Versions:
Line 139: if ((username != check_user) || (password == check_pass)) {
it should be: password != check_pass
For Admin3 some changes are needed: see http://forum.iobroker.net/viewtopic.php?f=24&t=10268
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.
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
I updated the adapter to the latest version 1.2.1
Now it does not find my certificates anymore.
I have installed letsencrypt certificates on my machine. Those are still shown in the overall iobroker settings under "certificates" and point to the correct files.
thanks for quick help.
Version: stable=1.1.1 (265 days old) => latest=1.2.4 (60 days old)
Installs: stable=701 (59.66%), latest=144 (12.26%), total=1175
Click to edit
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:
The upcoming version 2.0.0 of js-controller will support a new mode for low memory devices. For this, a few minor adjustments to the adapter must be made. Please follow these instructions: https://forum.iobroker.net/viewtopic.php?f=24&t=20387#p213466
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!
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')
can anybody update the npm-package to Version 0.1.5?
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 |
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.
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?
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
Version: stable=1.0.3 (388 days old) => latest=1.1.1 (15 days old)
Installs: stable=781 (69.12%), latest=138 (12.21%), total=1130
Click to edit
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!
Hallo, can someone update the npm-package of this adapter?
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 sieht irgendwie komisch aus. :)
Kannst du von hier das Bild nehmen?
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
I have also found warnings that may be fixed if possible.
Thanks,
your automatic adapter checker.
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
In der Beschreibung für den Datenpunkt lastLeave steht lastEnter
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)?
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.
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:
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.
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 |
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.