Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New issue after upgrade "Config did not validate" #58

Closed
iotarho opened this issue May 5, 2019 · 1 comment
Closed

New issue after upgrade "Config did not validate" #58

iotarho opened this issue May 5, 2019 · 1 comment
Labels

Comments

@iotarho
Copy link

iotarho commented May 5, 2019

I've been using mqtt-gpio for a few months to monitor door sensors via RPi's GPIO pins and it's been working great. However after upgrading yesterday, I'm getting an error I'm not quite sure what to make of. Here's the error thrown (and my config file below that):

Config did not validate:

digital_inputs:
- 0:
  - initial:
    - unknown field
  1:
  - initial:
    - unknown field
  2:
  - initial:
    - unknown field

And here's my config.yml file

mqtt:
  host: localhost
  #port: 1883
  #user: ""
  #password: ""
  topic_prefix: home/sensors

gpio_modules:
  - name: raspberrypi
    module: raspberrypi

digital_inputs:
  - name: TV_SGD
    module: raspberrypi
    pin: 27
    on_payload: "OPEN"
    off_payload: "CLOSED"
    initial: low  
    retain: yes

  - name: Kitchen_Door
    module: raspberrypi
    pin: 17
    on_payload: "OPEN"
    off_payload: "CLOSED"
    initial: low  
    retain: yes 

  - name: TV_SGD_BOARD
    module: raspberrypi
    pin: 11
    on_payload: "OPEN"
    off_payload: "CLOSED"
    initial: low  
    retain: yes 

Thanks for any suggestions.

@flyte
Copy link
Owner

flyte commented May 26, 2019

Hi @iotarho

Sorry for the delay. The initial values can only be set on outputs and not inputs. That is used to make sure outputs are set to a desired value when the software starts up, so it doesn't make sense on inputs.

You should be able to just remove the initial lines from your config completely.

I'm going to close this as I believe that's the solution to your issue. Feel free to reopen it if you need further help.

@flyte flyte closed this as completed May 26, 2019
@flyte flyte added the support label May 26, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants