Negative Unit values are displayed when generic sysfs GPIO generates the confugered hardware Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Molenman
Posts: 5
Joined: Sunday 25 February 2024 16:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Negative Unit values are displayed when generic sysfs GPIO generates the confugered hardware

Post by Molenman »

Hello all,

My configuration :
Version: 2024.7
Platform: Ubuntu 20.04
Plugin/Hardware: GPIO pins/Odroid C2

When generating the GPIO hardware that was first configured with a bash job i get negative Unit values for the detected hardware when using Generic sysfs GPIO . When trying to toggle a GPIO pin trough Domoticz I get an error "sending switch command".

Bash commands work fine and change the GPIO pin correctly, also without a sudo command.

After an update and upgrade the error stays

This problem occurred recently, the configuration worked fine before.
Screenshot of generated hardware
Screenshot of generated hardware
Screenshot from 2024-08-17 17-52-47.png (91.7 KiB) Viewed 602 times
I seems that the value equals the GPIO pin assignment in linux minus 256
Linux GPIO reference
Linux GPIO reference
Screenshot from 2024-08-17 20-24-17.png (22.8 KiB) Viewed 595 times
When making a dummy switch and assigning a script that turns on and off the GPIO output all works fine.
With script
With script
Screenshot from 2024-08-18 08-33-09.png (35.72 KiB) Viewed 586 times
Anyone that can explain why I get negative Unit values when using the Generic sysfs GPIO Hardware option of Domoticz?

When trying to add a switch manually, Domoticz shows the correct pin assignments in the selection list but I have no idea what to enter as ID, 3 0E 0E 04 as ID values gives the same error message.




Greetings,

Luc De Smedt
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Negative Unit values are displayed when generic sysfs GPIO generates the confugered hardware

Post by gizmocuz »

There have been some recent changes to the sysfs/GPIO hardware.
It seems this negative unit is assigned in the sysFS/GPIO hardware class, as I just changed manually a device unit to 249 here in the database, and it displays correctly in the devices overview.

Just had a look at the hardware class, it seems 'int8_t' was used instead if 'uint8_t', and this is causing the negative number

Could you try beta 16179 to see if this solves the issue?
Quality outlives Quantity!
Molenman
Posts: 5
Joined: Sunday 25 February 2024 16:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Negative Unit values are displayed when generic sysfs GPIO generates the confugered hardware

Post by Molenman »

gizmocuz wrote: Monday 19 August 2024 8:09 There have been some recent changes to the sysfs/GPIO hardware.
It seems this negative unit is assigned in the sysFS/GPIO hardware class, as I just changed manually a device unit to 249 here in the database, and it displays correctly in the devices overview.

Just had a look at the hardware class, it seems 'int8_t' was used instead if 'uint8_t', and this is causing the negative number

Could you try beta 16179 to see if this solves the issue?
I'll give it a try this evening. Thanks for the information.

I installed beta 16182 and all works fine now. One more man feels happy. How do I close this issue ?
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Negative Unit values are displayed when generic sysfs GPIO generates the confugered hardware

Post by gizmocuz »

Great it's working!
Consider it closed ;)
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest