Giter Site home page Giter Site logo

counter-adapter's People

Contributors

kgiori avatar mrstegeman avatar tim-hellhake avatar

Watchers

 avatar  avatar

counter-adapter's Issues

LevelProperty.

Hello Tim,

Again another very good add-on, simple but effective. (thumbs up)

Is it possible to give a property to a thing. Now one can only choose a custom thing with your counter add-on.

Custom Thing

You could use (misuse) the (multi)LevelProperty just like @mrstegeman does with his Speed test add-on.

Counter:
For the counter add-on you could set the minimum default to 0 and maximum default to 100000000, whereby one can adjust the maximum value in configure. Unit is units or counts ??

You could also use levelProperties with your other add-ons.
OpenUV - Clear sky UV index:
UV level, minimum zero and maximum 10 or Ozon level with a minimum of 100 and maximum of 500, unit is Dobson Unit (DU).

MI Flora:
I ordered two. Do not know what is being shown now.

Timer:
Same as Counter but the other way around. Where you can set maximum in configure. Level property is getting lower. Unit is seconds (s)

After reboot Counter addon is disconnected

Hi @tim-hellhake,
After rebooting the gateway last night the Counter addon was disconnected again. Here are the logs:
Line 18037: 2020-12-16 23:02:27.221 INFO : Loading add-on: counter-adapter Line 18119: 2020-12-16 23:02:43.342 INFO : counter-adapter: Opening database: /home/pi/.webthings/config/db.sqlite3 Line 18120: 2020-12-16 23:02:43.346 INFO : counter-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/schema.json because it has no messageType Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18169: 2020-12-16 23:02:47.529 INFO : date-time-adapter: AddonManagerProxy: recv: {'messageType': 8207, 'data': {'deviceId': 'counter-8b2dc908b304bcfd59405c200923816e', 'device': {'title': 'Low battery notifications', '@context': 'https://iot.mozilla.org/schemas/', '@type': ['MultiLevelSensor'], 'description': '', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e', 'properties': {'count': {'name': 'count', 'visible': True, 'title': 'Count', 'type': 'integer', '@type': 'LevelProperty', 'readOnly': True, 'links': [{'rel': 'property', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/properties/count'}]}}, 'actions': {'reset': {'title': 'Reset', 'description': 'Reset the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/reset'}]}, 'increment': {'title': 'Increment', 'description': 'Increment the counter', 'links': [{'rel': 'action', 'href': '/things/counter-8b2dc908b304bcfd59405c200923816e/actions/increment'}]}}, 'events': {}, 'l... Line 18362: 2020-12-16 23:02:49.517 INFO : counter-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json because it has no messageType Line 18409: 2020-12-16 23:03:06.162 INFO : counter-adapter: Loading add-on counter-adapter from /home/pi/.webthings/addons/counter-adapter Line 18409: 2020-12-16 23:03:06.162 INFO : counter-adapter: Loading add-on counter-adapter from /home/pi/.webthings/addons/counter-adapter Line 18409: 2020-12-16 23:03:06.162 INFO : counter-adapter: Loading add-on counter-adapter from /home/pi/.webthings/addons/counter-adapter Line 18492: 2020-12-16 23:03:16.181 INFO : counter-adapter: Unhandled Rejection Line 18493: 2020-12-16 23:03:16.187 ERROR : counter-adapter: { [Error: SQLITE_BUSY: database is locked] errno: 5, code: 'SQLITE_BUSY' } Line 19271: 2020-12-16 23:04:02.720 INFO : macrozilla: counter-8b2dc908b304bcfd59405c200923816e : Added Line 19304: 2020-12-16 23:04:04.041 ERROR : Failed to get property count: getProperty: device: counter-8b2dc908b304bcfd59405c200923816e not found. Line 19841: 2020-12-16 23:04:26.256 INFO : macrozilla: counter-8b2dc908b304bcfd59405c200923816e : Added Line 19864: 2020-12-16 23:04:27.236 ERROR : Failed to get property count: getProperty: device: counter-8b2dc908b304bcfd59405c200923816e not found. Line 22267: 2020-12-16 23:11:33.548 WARN : Unable to dispatch action requestAction: device: counter-8b2dc908b304bcfd59405c200923816e not found. Line 30753: 2020-12-16 23:41:33.636 WARN : Unable to dispatch action requestAction: device: counter-8b2dc908b304bcfd59405c200923816e not found. Line 31274: 2020-12-16 23:43:32.124 ERROR : Failed to get property count: getProperty: device: counter-8b2dc908b304bcfd59405c200923816e not found.
Cheers ๐Ÿ™‚

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.