Closed uros76 closed 1 year ago
you need a VARIANT env variable to be defined to match your hardware. Take a look at hardware_definitions.py in hm-pyhelper.
Regards, Nebra
On Tue, 30 Aug 2022 at 14:15, uros76 @.***> wrote:
Hi. I have forked the fleet and added my hotspot to the dashboard. However, the miner doesn't seem to be working.
Are there any specific variable settings I need to make?
I get this error: [image: image] https://user-images.githubusercontent.com/25409772/187390578-61557d95-b153-4ad3-ab67-2f114331ed21.png
— Reply to this email directly, view it on GitHub https://github.com/NebraLtd/helium-rak/issues/16, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU3SV4L6HVPQXIFJA5PGBDV3XC4FANCNFSM6AAAAAAQAFRUMM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Okay, found the value matching RAK/MNTD and now put it as device variable. Now I get this is log... keyerror: variant
Not sure is this correct way?
Name Value Service Device overrides Actions VARIANT COMP-RAKHM All services
Sent from my iPhone
On Aug 30, 2022, at 7:29 AM, uros76 @.***> wrote:
Okay, found the value matching RAK/MNTD and now put it as device variable. Now I get this is log... keyerror: variant
Not sure is this correct way?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Awesome! This helped and now it seems the diagnostics container is working.
However, I see now gateway-config container struggling to work. I rebooted it but still see this error in the live log window... RuntimeError: Failed to add edge detection Is there some additional variable I need to set?
I can't even connect to it:
Nah you're ok there. I thought that was an error sometime ago but you should be ok. Expect a day or so for everything to "settle" The dashboard is a great monitoring tool.
On Tue, Aug 30, 2022 at 7:56 AM uros76 @.***> wrote:
Awesome! This helped and now it seems the diagnostics container is working.
However, I see now gateway-config container struggling to work. I rebooted it but still see this error in the live log window... RuntimeError: Failed to add edge detection Is there some additional variable I need to set?
[image: image] https://user-images.githubusercontent.com/25409772/187442114-c1e48a7d-b958-45cc-b8b6-badda1cf8aaf.png
— Reply to this email directly, view it on GitHub https://github.com/NebraLtd/helium-rak/issues/16#issuecomment-1231629510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGFQAURO7NJBONROIWTXS3V3YAHZANCNFSM6AAAAAAQAFRUMM . You are receiving this because you commented.Message ID: @.***>
Okay will let it work and hope that gateway-config survives :) Thanks again for help
Hi. I let it run since yesterday and I think there is still something wrong with gateway-config. Device diagnostics on the dashboard says it's failed and restarted many times...
Any ideas how to get it working? Or this is not really needed?
Same issue here.
I added the variable and keep getting the gateway-config RuntimeError: Failed to add edge detection
error in the log, which then causes the gateway-config service to go in a "stop and restart" loop.
Also packet-forwarder stops and restarts with the error: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 7 column 28 (char 168)
Here these issues only happen with the image from https://hub.balena.io/organizations/nebraltd/fleets/HELIUM-RAK forked to my own fleet on Balena. When using the (seemingly*) same image from the above URL without forking it, it seems to be fine, or at least the local diagnostic page shows the radio as being operational so the packet forwarder is working, but that's all I know as I can't access the Balena dashboard to see the logs (not sure where to pull the logs from via ssh). [edit] found the logs in /mnt/data/docker/volumes/1914219_miner-log/_data/ and /mnt/data/docker/volumes/1914219_watchdog-log/_data/ [/edit]
*My understanding is that only the config.json differs between my forked balena-cloud-nebra-rak-raspberrypi4-64-2.105.1+rev1-v14.2.0.img and the original balena-cloud-HELIUM-RAK-raspberrypi4-64-2.105.1+rev1-v14.2.0.img so my guess is there must be some additional settings or variables on the HELIUM-RAK fleet that would be missing in the forked fleet, like that VARIANT variable.
I have this set on the fleet and it works despite endless gateway-config errors
I have this set on the fleet and it works despite endless gateway-config errors Are you using the *-raspberrypi4-64-2.105.1+rev1-v14.2.0.img image?
My understanding is that the gateway-config is only used access to the diagnostics and wifi config via bluetooth so the hotspot would still be able to witness and transfer data. however with the current image it looks like the packet forwarder is broken too so the radio is down. https://github.com/NebraLtd/hm-pktfwd/issues/108
Ok, that's new for me. I have my fleet on this
Ah yes that's why, your screenshot shows firmware 2022.08.17.5, while the latest is 2022.08.17.6-2 but the last working one appears to be 2022.08.17.6
Ah yes that's why, your screenshot shows firmware 2022.08.17.5, while the latest is 2022.08.17.6-2 but the last working one appears to be 2022.08.17.6
That is exactly the reason I am letting mine keep running on 2022.08.17.5. They work just fine with the previous fw. My fleet on balena dashboard has this old release and I can add future release to existing fleet anytime. I wish there would be a way to share my old forked release with you?
Ah yes that's why, your screenshot shows firmware 2022.08.17.5, while the latest is 2022.08.17.6-2 but the last working one appears to be 2022.08.17.6
That is exactly the reason I am letting mine keep running on 2022.08.17.5. They work just fine with the previous fw. My fleet on balena dashboard has this old release and I can add future release to existing fleet anytime. I wish there would be a way to share my old forked release with you?
You can revert to older images assuming you have ran/forked them in the past.
Select your device
Select Pin to release
Select version
Good to know, unfortunately I only forked the current fleet release so the menu only shows that one.
However it's possible to switch the GitHub repo URL when forking the nebra-rak fleet
so I've forked their GitHub repository and edited the docker-compose.yml, to make it match the sept. 9 version from their repo's history. I'll try that to see what happens. [edit] That didn't work, I'm still getting FIRMWARE_VERSION=2022.08.17.6-2 Either balena built the image from the parent repo instead of the forked one, or the hotspot automatically updated itself to the latest firmware after booting. [/edit] [edit2] Got the packet forwarder working with the previous release. I do get the gateway-config errors but that issue seems to have been there in release 2022.08.17.5 already. I'll try to find the cause, [/edit2]
Your variable should read as: COMP-RAKHM
Sent from my iPhone
On Aug 30, 2022, at 7:29 AM, uros76 @.***> wrote:
Okay, found the value matching RAK/MNTD and now put it as device variable. Now I get this is log... keyerror: variant
Not sure is this correct way?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
@uros76 do you still get these gateway config errors on this RAK firmware?
@uros76 do you still get these gateway config errors on this RAK firmware?
No, once I setup correct variable on fleet it works fine. I also recently updated fleet with latest release, all works ok.
Awesome, will close this issue then 🙂
Awesome, will close this issue then slightly_smiling_face
The packet forwarder is working but the gateway config error remains here with RAK v2 (mntd blackspot). It keeps causing the python script to abort and restart. The gpio pin number used for the side button seems to be cause of the problem, or something else is preventing the GPIO.add_event_detect() function from succeeding. See the gateway-config log below. I could be wrong but it seems the button is connected to the RAK2003 Pi HAT's MCU rather than one of the GPIO pins.
22.04.23 04:34:12 (-0700) gateway-config Waiting to connect to bluetoothd..
Agent registered
[CHG] Controller E4:5F:01:B2:FD:12 Pairable: yes
22.04.23 04:34:12 (-0700) gateway-config [bluetooth]# pairable off
22.04.23 04:34:12 (-0700) gateway-config [bluetooth]# quit
FREQ variable is already set as N/A (Non Nebra Miner).
22.04.23 04:34:12 (-0700) gateway-config VARIANT variable is already set as COMP-RAKHM.
22.04.23 04:34:12 (-0700) gateway-config All required environment variables have been set.
22.04.23 04:34:12 (-0700) gateway-config method return time=1682163252.036938 sender=org.freedesktop.DBus -> destination=:1.127 serial=3 reply_serial=2
22.04.23 04:34:12 (-0700) gateway-config array [
22.04.23 04:34:12 (-0700) gateway-config string "org.freedesktop.DBus"
22.04.23 04:34:12 (-0700) gateway-config string ":1.127"
22.04.23 04:34:12 (-0700) gateway-config ]
22.04.23 04:34:12 (-0700) gateway-config DBus is now accepting connections
22.04.23 04:34:12 (-0700) gateway-config libmraa[11]: libmraa version v2.1.0-24-gbd91964 initialised by user 'root' with EUID 0
22.04.23 04:34:12 (-0700) gateway-config libmraa[11]: gpio: platform doesn't support chardev, falling back to sysfs
22.04.23 04:34:12 (-0700) gateway-config libmraa[11]: libmraa initialised for platform 'Raspberry Pi Model B Rev 1' of type 5
22.04.23 04:34:13 (-0700) gateway-config 2023-04-22 11:34:13,213 - [DEBUG] - __main__ - (__main__.py).validate_env -- /opt/gatewayconfig/__main__.py:(34) - Starting with the following ENV:
22.04.23 04:34:13 (-0700) gateway-config SENTRY_DSN=None
22.04.23 04:34:13 (-0700) gateway-config BALENA_APP_NAME=balenamntd
22.04.23 04:34:13 (-0700) gateway-config BALENA_DEVICE_UUID=e62a463a5d15eeecf078862dd4bb0823
22.04.23 04:34:13 (-0700) gateway-config VARIANT=COMP-RAKHM
22.04.23 04:34:13 (-0700) gateway-config ETH0_MAC_ADDRESS_FILEPATH=/sys/class/net/eth0/address
22.04.23 04:34:13 (-0700) gateway-config WLAN0_MAC_ADDRESS_FILEPATH=/sys/class/net/wlan0/address
22.04.23 04:34:13 (-0700) gateway-config DIAGNOSTICS_JSON_URL=http://diagnostics/json
22.04.23 04:34:13 (-0700) gateway-config ETHERNET_IS_ONLINE_FILEPATH=/sys/class/net/eth0/carrier
22.04.23 04:34:13 (-0700) gateway-config FIRMWARE_VERSION=v1.0.2-3
22.04.23 04:34:13 (-0700) gateway-config
22.04.23 04:34:13 (-0700) gateway-config Traceback (most recent call last):
22.04.23 04:34:13 (-0700) gateway-config File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
22.04.23 04:34:13 (-0700) gateway-config return _run_code(code, main_globals, None,
22.04.23 04:34:13 (-0700) gateway-config File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
22.04.23 04:34:13 (-0700) gateway-config exec(code, run_globals)
22.04.23 04:34:13 (-0700) gateway-config File "/opt/gatewayconfig/__main__.py", line 77, in <module>
22.04.23 04:34:13 (-0700) gateway-config main()
22.04.23 04:34:13 (-0700) gateway-config File "/opt/gatewayconfig/__main__.py", line 30, in main
22.04.23 04:34:13 (-0700) gateway-config start()
22.04.23 04:34:13 (-0700) gateway-config File "/opt/gatewayconfig/__main__.py", line 57, in start
22.04.23 04:34:13 (-0700) gateway-config config_app = GatewayconfigApp(
22.04.23 04:34:13 (-0700) gateway-config File "/opt/gatewayconfig/gatewayconfig_app.py", line 43, in __init__
22.04.23 04:34:13 (-0700) gateway-config self.init_gpio(variant)
22.04.23 04:34:13 (-0700) gateway-config File "/opt/gatewayconfig/gatewayconfig_app.py", line 136, in init_gpio
22.04.23 04:34:13 (-0700) gateway-config self.user_button = Button(btn, hold_time=USER_BUTTON_HOLD_SECONDS)
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/devices.py", line 108, in __call__
22.04.23 04:34:13 (-0700) gateway-config self = super(GPIOMeta, cls).__call__(*args, **kwargs)
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/input_devices.py", line 414, in __init__
22.04.23 04:34:13 (-0700) gateway-config super(Button, self).__init__(
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/mixins.py", line 433, in __init__
22.04.23 04:34:13 (-0700) gateway-config super(HoldMixin, self).__init__(*args, **kwargs)
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/input_devices.py", line 171, in __init__
22.04.23 04:34:13 (-0700) gateway-config self.pin.when_changed = self._pin_changed
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/pins/__init__.py", line 432, in <lambda>
22.04.23 04:34:13 (-0700) gateway-config lambda self, value: self._set_when_changed(value),
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/pins/pi.py", line 319, in _set_when_changed
22.04.23 04:34:13 (-0700) gateway-config self._enable_event_detect()
22.04.23 04:34:13 (-0700) gateway-config File "/opt/venv/lib/python3.9/site-packages/gpiozero/pins/rpigpio.py", line 226, in _enable_event_detect
22.04.23 04:34:13 (-0700) gateway-config GPIO.add_event_detect(
22.04.23 04:34:13 (-0700) gateway-config RuntimeError: Failed to add edge detection
@VeniceInventors please create a new issue if you still have something not working.
Also @VeniceInventors FYI the issue you describe with the config container is usually because you haven't configured the config variables correctly.
Specifically the spi0-1cs one
Also @VeniceInventors FYI the issue you describe with the config container is usually because you haven't configured the config variables correctly.
Specifically the spi0-1cs one
@shawaj Thanks for the hint.
I didn't know about that variable, I'm using the nebra-helium-rak balena image 2.113.18, and the only variables I see that came pre-defined are:
FREQ -> N/A (Non Nebra Miner) HELIUM_MINER_HEIGHT_URL -> https://api.helium.io/v1/blocks/height VARIANT -> COMP-RAKHM
Is there a document somewhere which covers the spi0-1cs variable? I don't want to take up your time if I can figure it out by reading some docs.
Should I create a new issue as well? Since it happens with the stock image, I'm guessing it happens to all the RAK users.
@VeniceInventors where did you get that image from?
And how did you install on BalenaCloud?
Easiest way is using the deploy with Balena button here... https://github.com/NebraLtd/helium-rak#forking-fleet-installation-requires-updating-manually--setting-up-own-automations
Also FYI you can see all the required variables here: https://github.com/NebraLtd/helium-rak/blob/17ae057412f819180878a621d899bc0057df2416/balena.yml#L26-L43
@VeniceInventors where did you get that image from?
And how did you install on BalenaCloud?
Easiest way is using the deploy with Balena button here... https://github.com/NebraLtd/helium-rak#forking-fleet-installation-requires-updating-manually--setting-up-own-automations @shawaj That's how I deployed it, from the link above, downloaded the image from https://dashboard.balena-cloud.com/deploy?repoUrl=https://github.com/NebraLtd/helium-rak and flashed it, and added it to my balena hub fleet.
@shawaj I found the RESIN_HOST_CONFIG_dtoverlay: '"spi0-1cs","vc4-kms-v3d"' setting in the "Device Configuration" tab of balena.
It was set to "spi0-1cs","vc4-kms-v3d" for the fleet, but only to "vc4-kms-v3d" for the device itself. I don't know why as I didn't touch these variables. I added the "spi0-1cs" and rebooted, and now the gateway-config is working as intended.
Thank you for your help!
Hi. I have forked the fleet and added my MNTD blackspot hotspot to the dashboard. However, the miner doesn't seem to be working.
Are there any specific variable settings I need to make?
I get this error: