GithubHelp home page GithubHelp logo

fdbk_ruuvi_reporter's People

Contributors

kangasta avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

fdbk_ruuvi_reporter's Issues

Use DB connection to store MAC to topic ID mapping

  • Add reported_by field to topic metadata to determine which reporter should listen for specific MAC if there are multiple reporters.
  • Add --reporter-name parameter to determine MACs to listen for based on reported_by metadata and possibly store this value in config file.
  • Deprecate functions that were used to modify MAC mappings in local config file.

jsonschema validation error when creating topic

Trying to run: fdbk-ruuvi-reporter --create-topic test XX:XX:XX:XX:XX:XX --db-connection fdbk_dynamodb_plugin
and getting this error.

Traceback (most recent call last):
File "/usr/local/bin/fdbk-ruuvi-reporter", line 15, in
create_topic(args.db_connection, args.db_parameters, *args.create_topic)
File "/usr/local/lib/python3.7/dist-packages/fdbk_ruuvi_reporter/main.py", line 44, in create_topic
topic_id = connection.add_topic(**create_topic_dict(mac, name))
File "/usr/local/lib/python3.7/dist-packages/fdbk_dynamodb_plugin/_dynamodb_connection.py", line 34, in add_topic
topic_d = generate_topic_dict(name, add_id=True, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/fdbk/utils/_format.py", line 143, in generate_topic_dict
validate_topic_dict(topic_d)
File "/usr/local/lib/python3.7/dist-packages/fdbk/validate.py", line 24, in validate_topic_dict
_validate_dict(topic_d, 'topic-in')
File "/usr/local/lib/python3.7/dist-packages/fdbk/validate.py", line 18, in _validate_dict
validate(instance=input_dict, schema=schema)
File "/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py", line 934, in validate
raise error
jsonschema.exceptions.ValidationError: 'ruuvitag' is not one of ['topic', 'template']

Failed validating 'enum' in schema['properties']['type']:
{'enum': ['topic', 'template']}

On instance['type']:
'ruuvitag'

Also tried to run: fdbk-ruuvi-reporter --create-topic ${test} ${XX:XX:XX:XX:XX:XX} --db-connection fdbk_dynamodb_plugin
but then the error was: fdbk-ruuvi-reporter: error: argument --create-topic: expected 2 arguments.

So, how is the creation of the topic suppose to happen `

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.