hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
551 stars 51 forks source link

GPIO with SOMFY plugin not working in Version 4 #1781

Closed alex-hoobs closed 2 years ago

alex-hoobs commented 2 years ago

Description SOMFY plugin GPIO error: 14/01/2022, 13:12:42Bridge AERRORbcm2835_init: Unable to open /dev/gpiomem: No such file or directory 14/01/2022, 13:12:42Bridge AWARNINGunhandled rejection: Error: Could not initialize bcm2835 GPIO library This seems to give a hint that the problem seems to be an access control one.

I hoped that the .21 upgrade would fix the GPIO issue with the SOMFY plugin. However this isn’t the case it still causes the bridge to crash. I again uninstalled/reinstalled that plugin without success

Version Please include the version of HOOBS you are using. 4.1.21 Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version If you upgraded, please let us know your previous version. 4.1.17 Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

If this is a custom install, what's your operating system? Please let us know what operating system and version you are using. Ex. Fedora 30 or macOS Catalina.

List your plugins Please include a list of the plugins you are using. We need to be able to find it on NPM. If the plugin is no published, please include a link to the repository.

Post your config This can be found in the interface, Configuration -> Advanced or you can get it via SSH cat ~/.hoobs/etc/config.json

POST CONFIG HERE

Post your log You can get the log from the interface. This is in the Log section.

POST LOG HERE

14/01/2022, 13:08:48WARNINGservice restart command received

14/01/2022, 13:09:00Bridge A stopping

14/01/2022, 13:09:14hub is running on port 80

14/01/2022, 13:09:15Bridge A starting

14/01/2022, 13:09:25Bridge ALoaded plugin 'homebridge-dummy'

14/01/2022, 13:09:26Bridge ALoaded plugin 'homebridge-samsung-tizen'

14/01/2022, 13:09:26Bridge ALoaded plugin 'homebridge-tado-ac'

14/01/2022, 13:09:28Bridge ALoaded plugin 'homebridge-z2m'

14/01/2022, 13:09:28Bridge ALoading 3 platforms...

14/01/2022, 13:09:28Bridge Azigbee2mqttConnecting to MQTT server at mqtt://localhost:1883

14/01/2022, 13:09:28Bridge ALoading 4 accessories...

14/01/2022, 13:09:28Bridge AT-SW_TadoEoDSetting switch to false

14/01/2022, 13:09:28Bridge AT-SW_TadoMatinSoirSetting switch to true

14/01/2022, 13:09:28Bridge AT-SW_TadoOnOffSetting switch to false

14/01/2022, 13:09:29Bridge AT-SW_EoDSetting switch to false

14/01/2022, 13:09:29Bridge ABridge is running on port 51826.

14/01/2022, 13:09:29Bridge ASam 37BD is running on port 45481.

14/01/2022, 13:11:55Bridge AConfiguration change

14/01/2022, 13:11:55samsungtizenbridge stopping

14/01/2022, 13:12:00Bridge A starting

14/01/2022, 13:12:08Bridge ALoaded plugin 'homebridge-dummy'

14/01/2022, 13:12:09Bridge ALoaded plugin 'homebridge-samsung-tizen'

14/01/2022, 13:12:09Bridge ALoaded plugin 'homebridge-somfy-hotwired'

14/01/2022, 13:12:09Bridge ALoaded plugin 'homebridge-tado-ac'

14/01/2022, 13:12:10Bridge ALoaded plugin 'homebridge-z2m'

14/01/2022, 13:12:10Bridge ALoading 3 platforms...

14/01/2022, 13:12:10Bridge Azigbee2mqttConnecting to MQTT server at mqtt://localhost:1883

14/01/2022, 13:12:11Bridge ALoading 4 accessories...

14/01/2022, 13:12:11Bridge AT-SW_TadoEoDSetting switch to false

14/01/2022, 13:12:11Bridge AT-SW_TadoMatinSoirSetting switch to true

14/01/2022, 13:12:11Bridge AT-SW_TadoOnOffSetting switch to false

14/01/2022, 13:12:11Bridge AT-SW_EoDSetting switch to false

14/01/2022, 13:12:11Bridge ABridge is running on port 51826.

14/01/2022, 13:12:12Bridge ASam 37BD is running on port 40519.

14/01/2022, 13:12:26Bridge AConfiguration change

14/01/2022, 13:12:26samsungtizenbridge stopping

14/01/2022, 13:12:31Bridge A starting

14/01/2022, 13:12:39Bridge ALoaded plugin 'homebridge-dummy'

14/01/2022, 13:12:40Bridge ALoaded plugin 'homebridge-samsung-tizen'

14/01/2022, 13:12:40Bridge ALoaded plugin 'homebridge-somfy-hotwired'

14/01/2022, 13:12:40Bridge ALoaded plugin 'homebridge-tado-ac'

14/01/2022, 13:12:41Bridge ALoaded plugin 'homebridge-z2m'

14/01/2022, 13:12:41Bridge ALoading 3 platforms...

14/01/2022, 13:12:41Bridge Azigbee2mqttConnecting to MQTT server at mqtt://localhost:1883

14/01/2022, 13:12:42Bridge ALoading 5 accessories...

14/01/2022, 13:12:42Bridge AT-SW_TadoEoDSetting switch to false

14/01/2022, 13:12:42Bridge AT-SW_TadoMatinSoirSetting switch to true

14/01/2022, 13:12:42Bridge AT-SW_TadoOnOffSetting switch to false

14/01/2022, 13:12:42Bridge AT-SW_EoDSetting switch to false

14/01/2022, 13:12:42Bridge AERRORbcm2835_init: Unable to open /dev/gpiomem: No such file or directory

14/01/2022, 13:12:42Bridge AWARNINGunhandled rejection: Error: Could not initialize bcm2835 GPIO library

Additional context Add any other context about the problem here. Also installed following package: https://github.com/jperkin/node-rpio but still got the same error

alex-hoobs commented 2 years ago

@mkellsy any suggestions?

BobbySlope commented 2 years ago

This is an active support case with a box customer

mkellsy commented 2 years ago

HOOBS runs Debian, you need to follow the instructions for Debian not Raspberry Pi OS.

I developed the OS with the knowledge that the GPIO pins were not accessible from outside the case.

Since this is using the GPIO pins, means the case was cracked open. This is OK, but it converts this from a managed solution to a DIY project.

The best solution for a DIY project is to use a different OS like Raspberry Pi OS. Then install HOOBS manually. Our repos support Raspberry Pi OS, and the directions can be found here. https://support.hoobs.org/docs/setup-hoobs-manually

The only thing I would add to this is, if you want the UI terminal you also need to run sudo apt install helm.

Armandl23 commented 2 years ago

Thanks for that prompt reply that really puzzles me 1) I checked everywhere and can't find that limitation in HIB promotion. Please show me asap in the T&C that all USB, GPIO etc are fobidden otherwise you and I have a legal case. 2) Somfy is a certified plug-in and doesn't state anywhere "not for HIB" 3) Somfy worked correctly on HIB with Ver 3.x so this is a regression that you introduced without warning

BR

BobbySlope commented 2 years ago

did you reflashed the software or did you upgraded from hoobs 3? if you upgraded from hoobs 3 your GPIO should still be working. if you reflashed the new HOOBS 4 image it runs debian

BobbySlope commented 2 years ago

as researched for another customer that needs GPIO you can try to install the RPI.GPIO Library go get programming access to the GPIO on Debian:

sudo apt-get install rpi.gpio

i didnt tried that by myself, please let us know if it worked

Armandl23 commented 2 years ago

Hello The upgrade to 4 worked fine and then I think that it was from 4.1.18 to 4.1.20 that crashed completely and I had to reflash I indeed think that it was from that time that it did’t work anymore BR From: BobbySlope @.> Sent: 19 janvier 2022 13:08 To: hoobs-org/HOOBS @.> Cc: Armand Linkens @.>; Comment @.> Subject: Re: [hoobs-org/HOOBS] GPIO with SOMFY plugin not working in Version 4 (Issue #1781)

did you reflashed the software or did you upgraded from hoobs 3? if you upgraded from hoobs 3 your GPIO should still be working. if you reflashed the new HOOBS 4 image it runs debian

— Reply to this email directly, view it on GitHubhttps://github.com/hoobs-org/HOOBS/issues/1781#issuecomment-1016404507, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTGUD4FDYEBTGANTZ7EALTUW2SQXANCNFSM5MC6S7WQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.**@.>>

Armandl23 commented 2 years ago

Hello I had already done that as you can see hereunder

sudo apt-get install rpi.gpio Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'python3-rpi.gpio' for regex 'rpi.gpio' Note, selecting 'rpi.gpio-common' for regex 'rpi.gpio' python3-rpi.gpio is already the newest version (0.7.0-0.2+b2). rpi.gpio-common is already the newest version (0.7.0-0.2+b2). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

BR From: BobbySlope @.> Sent: 19 janvier 2022 13:14 To: hoobs-org/HOOBS @.> Cc: Armand Linkens @.>; Comment @.> Subject: Re: [hoobs-org/HOOBS] GPIO with SOMFY plugin not working in Version 4 (Issue #1781)

as researched for another customer that needs GPIO you can try to install the RPI.GPIO Library go get programming access to the GPIO on Debian:

sudo apt-get install rpi.gpio

i didnt tried that by myself, please let us know if it worked

— Reply to this email directly, view it on GitHubhttps://github.com/hoobs-org/HOOBS/issues/1781#issuecomment-1016409338, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTGUD57YKS3P5LM66JLLL3UW2TJ7ANCNFSM5MC6S7WQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.**@.>>

hmenzagh commented 2 years ago

Same issue here

mkellsy commented 2 years ago

sudo apt-get install rpi.gpio

hmenzagh commented 2 years ago

@mkellsy Nope, does not work, I flashed PiOS and installed Hoobs 4.1, works like a charm

mkellsy commented 2 years ago

I have been looking at our OS build routine. In 4.2.0 we added support for GPIO. The Debian build we were using doesn't include the kernel drivers needed for this.

When the 4.2.0 image is release you should be able backup, re-flash and restore. It's easier to do this instead of trying to replace the kernel.

mkellsy commented 2 years ago

This is fixed in our latest image. https://support.hoobs.org/downloads