gpio.pin.digital fail to lock GPIO04 #148
Replies: 3 comments 3 replies
-
I'm not entirely sure what you're trying to do here, can you post your config file? It looks like maybe you are trying to use the GPIO module to control the same pin that you are using for OneWire. |
Beta Was this translation helpful? Give feedback.
-
Hi Michael
Sorry for the confusion - I have 2 raspberry pi in place
1 is running OneWire ( that one is solved now and work just fine )
1 is running GPIO - I trying to address the pin via mqttany and have tried pigpio but no luck - and since the Onewire work out I try the GPIO also
here is the mqttany.yml
***@***.***:~ $ more /etc/mqttany/mqttany.yml
######## Configuration for MQTTany ########
# All optional values are commented out and default values are shown
### Config file version
version: '1.0.1'
######## MQTT Module ########
mqtt:
### Broker Host
# can be either IPv4 address or hostname
host: ‘192.168.x,x'
### Broker Port
# port to connect to on the host
port: 1883
### Client ID
# Substitutions:
# - {hostname} = the computer's hostname
#client id: '{hostname}'
### Login
username: mqttname
password: mqttpassed
### Session Options
#qos: 0
#retain: false
### Topics
# Substitutions:
# - {hostname} = the computer's hostname
# - {client_id} = the mqtt 'client id'
# topics are composed as `{root topic}/{node id}/{property id}`
#root topic: '{client_id}' # Root topic
# last will topic becomes `{root topic}/{lwt topic}`
#lwt topic: 'lwt' # Last Will topic
### Heartbeat
# Interval in seconds to publish status messages
#heartbeat interval: 300
######## GPIO Module ########
gpio:
### Pin Numbering Mode
#mode: 'SOC'
### Polling Interval
#polling interval: 60 # interval in seconds to poll all pins
### Interrupt Debounce
#debounce: 50 # in milliseconds
### Single Pin Configuration
pin-id:
### Pin Number
pin: 4
### Pin Name
# Subsitutions:
# - {pin} = pin number
# - {pin:02d} = pin number padded with 0's to always be 2 numbers
# - {pin_id} = name of this section
# name: '{pin_id}'
### Pin Mode
pin mode: 'input' # can be 'input' or 'output'
### Pin Resistor
#resistor: 'off' # can be 'pullup', 'pulldown', or 'off'
### Pin Type Specifc Options
# Each pin type will have some options specific to it,
# consult the documentation for details.
### Multiple Pin Configuration
# alternatively a list of pins can be given.
# actual id's will be '{batch-id}-{index + first index}'
# all options from a single pin configuration apply, except those shown below
#batch-id:
### Pin Name
# a single name may be given, or a list of names the same length as the
# list of pins can be provided. if a single name is given then actual names will
# be '{name} {index + first index}'
# Subsitutions:
# - {pin} = pin number
# - {pin:02d} = pin number padded with 0's to always be 2 numbers
# - {pin_id} = name of this section
# - {index} = the pin's index in the list of pins plus 'first index'
#name: '{pin_id}'
### Pin Numbers
#pin: []
### First Index
# this number will be added to 'index' when substituting '{index}' in id's and names
#first index: 0
######## I2C Module ########
#i2c:
### Polling Interval
#polling interval: 60 # interval in seconds to poll all pins
### Device Configuration
# !! this id is used as the node so it must not match any other node or module name !!
#device-id:
### Device Friendly Name
# Friendly name used in logging etc
# Substitutions:
# - {device_id} = name of device's section in config file
# - {address:02x} = device address in hex (ex. '20')
# - {device} = device identifier
#name: '{device_id}'
### Device Type
# Device identifier, see the wiki for a list of supported devices
#device: ''
### I2C Bus ID
# ID of the I2C bus to use on your SBC
# ex. Raspberry Pi 3 this will probably be 1
# Can also specify full path ex. '/dev/i2c-1'
#bus:
### Device Address
# 7-bit hex address of the device (ex. 0x20)
# this can also be a base-10 integer
#address: 0x
### Device Specific Options
# Each device type will have some options specific to it
# consult the wiki page for the device for details.
######## OneWire Module ########
#onewire:
### Bus Interface
#bus: 'w1'
### Polling Interval
#polling interval: 60 # interval in seconds to poll all devices
### Bus Scan
# Scan bus for any unconfigured devices and add them
#bus scan: false
### Device Configuration
#device-id:
### Device Name
# Substitutions:
# - {device_id} = will be replaced with the device definition section name
# - {device_type} = will be replaced with the device type (ex. `DS18B20`)
# - {address} = will be replaced with the device's **FULL 8 BYTE ADDRESS**
#name: '{device_id}'
### Device Address
# The device's address, can be 7 or 8 bytes, can use w1 style `xx-xxxxxxxxxxxx`
#address: '' # **MUST BE IN SINGLE QUOTES `''`**
### Device Specific Options
# Each device type will have some options specific to it
# consult the wiki page for the device for details.
### Multiple Device Configuration
#batch-id:
### Device Name
# a single name may be given, or a list of names the same length as the
# list of pins can be provided. if a single name is given then actual names will
# be '{name} {index + first index}'
# Substitutions:
# - {device_id} = will be replaced with the device definition section name
# - {device_type} = will be replaced with the device type (ex. `DS18B20`)
# - {address} = will be replaced with the device's **FULL 8 BYTE ADDRESS**
# - {index} = will be replaced with the device's index in the list of addresses
#name: '{device_id}'
### Device Address
# List of device addresses, can be 7 or 8 bytes, can use w1 style `xx-xxxxxxxxxxxx`
#address: ['', ''] # **MUST BE IN SINGLE QUOTES `''`**
### First Index
# this number will be added to 'index' when substituting '{index}' in id's and names
#first index: 0
######## LED Module ########
#led:
### Animation Directory
# A directory or list of directories to look for additional animations in
#anim dir: []
### Startup Animation
# Animation to play when MQTTany loads
#anim startup: 'test.array'
### Array Configuration
#array-id:
### Array Name
# Substitutions:
# - {array_id} = will be replaced with the array definition section name
#name: '{array_id}'
### Output
# The interface to use for outputting data
# Available options are 'rpi' or 'sacn'
#output: ''
### Pixel Count
# The number of pixels in your array (not necessarily LEDs, see next option)
#count:
### LEDs per Pixel
# Allows you to have more than one LED handled as a single pixel.
# Ex. A bulb with 3 LEDs in it can be treated as a single pixel in the array.
# Total number of LEDs in the array should be 'count' times 'leds per pixel'
#leds per pixel: 1
### Initial Brightness
# The initial brightness of the array, can be 0-255
#brightness: 255
### Color Order
# The byte order for the color data sent to the LEDs.
# See the 'test.order' animation for how to determine this
#color order: '{default}'
### Animation Frame Rate
# Frame rate for animations, you may need to decrease this for
# longer arrays or certain interface types.
#anim fps: 60
### Interface Specific Options
# Each interface may have some options specific to it
# consult the wiki page for the interface for details.
######## XSET Module ########
#xset:
### Default Display
# Display option to use when commands do not specify a display.
# Omitting this option will omit the '-display' option from the call to xset
#default display: None
### Startup Commands
# A list of commands to run when the module loads.
# See the documentation on sending commands for formatting.
# If none are desired, use an empty list as shown below.
#startup commands: []
***@***.***:~ $
thanks in advance
bedst regards
John
… On 16/12/2022, at 00.08, Michael Murton ***@***.***> wrote:
I'm not entirely sure what you're trying to do here, can you post your config file? It looks like maybe you are trying to use the GPIO module to control the same pin that you are using for OneWire.
—
Reply to this email directly, view it on GitHub <#148 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A4WQTIMAWYCW3C6TJM7BB3LWNOQH7ANCNFSM6AAAAAAS5BSGX4>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't see your reply here. Are you running Armbian? If so, check what interfaces are enabled using |
Beta Was this translation helpful? Give feedback.
-
Hi and thx for a great tool - a question about gpio part
I have a raspberry pi that I want to test the gpio part with mqttany - but receive an error when starting the service
what could it be that is locking "system.1wire"
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions