I don't work for NexDome but you should try to contact Tim , the author of the firmware. Either open an issue on the github repo ( https://github.com/nexdome/Firmware/issues ) or try emailing him may be. Have you tried contacting Nexdome directly also ?
Even though I have a Nexdome dome, I use my own controller and firmware on it, so I can't really help much more on the firmware issue.
Well, that was a bust. It solved the rotator issue of loosing sync, but now the shutter controller keeps crashing (requiring me to cycle its power on and off and closing it manually) and the rotator won't write my slave settings to EPROM. Either that - or the INDI driver is causing these issues.
I don't use INDI ... I'm 100% TheSkyX (on macOS for development and Linux in the dome)... and I don't use the Nexdome controllers or firmware ... I made my own controller and my own firmware (with my own X2 Plugin for TheSkyX :) ).
I would assume the new firmware is 100% compatible with the previous one so any driver should still work (I sure hope my X2 plugin for the Nexdome is still working ... which mean I'll probably have to test this new 4.x firmware).
Do you happen to have other versions of python installed ?!
if you just run /usr/bin/env python3 in the terminal, what version does it reports ?
Here is why I just tried and got no error on the import :
/usr/bin/python3 Python 3.8.2 (default, Nov 4 2020, 21:23:28) [Clang 12.0.0 (clang-1200.0.32.28)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import serial>>>
And tried to reinstall serial. I got this message.peterkennett@Peters-MacBook-Air ~ % sudo /usr/bin/pip3 install serial
Password:
WARNING: The directory '/Users/peterkennett/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/peterkennett/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: serial in /Library/Python/3.8/site-packages (0.0.97)
Requirement already satisfied: future>=0.17.1 in /Library/Python/3.8/site-packages (from serial) (0.18.2)
Requirement already satisfied: iso8601>=0.1.12 in /Library/Python/3.8/site-packages (from serial) (0.1.13)
Requirement already satisfied: pyyaml>=3.13 in /Library/Python/3.8/site-packages (from serial) (5.3.1)
WARNING: You are using pip version 19.2.3, however version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I'm about ready to give up. I'm back to the "ModuleNotFound" error again!peterkennett@Peters-MacBook-Air Downloads % prog_leonardo /dev/cu.usbmodem14101 Rotator-4.0.0.hex
Traceback (most recent call last):
File "/usr/local/bin/arduino_pro.py", line 6, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
I have no idea why that syntax error did show up before, but now that I fixed it, the serial module is not working again! ARGHGHHH!
Here's the code again - and it all seems fine to me.
The PORT in the code is just a default if you don't pass the actual port on the command line so it doesn't quite matter as the whole function (prog_leonard) does pass the port.
Damn!
I don't work for NexDome but you should try to contact Tim , the author of the firmware. Either open an issue on the github repo ( https://github.com/nexdome/Firmware/issues ) or try emailing him may be. Have you tried contacting Nexdome directly also ?
Even though I have a Nexdome dome, I use my own controller and firmware on it, so I can't really help much more on the firmware issue.
Well, that was a bust. It solved the rotator issue of loosing sync, but now the shutter controller keeps crashing (requiring me to cycle its power on and off and closing it manually) and the rotator won't write my slave settings to EPROM. Either that - or the INDI driver is causing these issues.
I don't use INDI ... I'm 100% TheSkyX (on macOS for development and Linux in the dome)... and I don't use the Nexdome controllers or firmware ... I made my own controller and my own firmware (with my own X2 Plugin for TheSkyX :) ).
I would assume the new firmware is 100% compatible with the previous one so any driver should still work (I sure hope my X2 plugin for the Nexdome is still working ... which mean I'll probably have to test this new 4.x firmware).
Rodolphe, thank you so much for your help! I had success after downloading a new serial-usb driver from https://www.ftdichip.com/Drivers/VCP.htm
It worked!
Now I need to test it with the old INDI driver I have. Have you tested it with EKOS yet? Peter
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: reading input file "Shutter-4.0.0.hex"
avrdude: writing flash (28586 bytes):
Writing | ################################################## | 100% 2.24s
avrdude: 28586 bytes of flash written
avrdude: verifying flash memory against Shutter-4.0.0.hex:
avrdude: load data flash data from input file Shutter-4.0.0.hex:
avrdude: input file Shutter-4.0.0.hex contains 28586 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.22s
avrdude: verifying ...
avrdude: 28586 bytes of flash verified
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude done. Thank you.
Could be.
Do I have to turn that board off and then back on again somehow? (battery disconnect?).
ok, so pyserial working .. checked :)
The shutter Arduino should show up the same way the rotator Arduino does...
So it's weird if it doesn't.
Now I need to figure out how to connect the shutter. I connected a USB cable directly to the shutter - but my Mac wouldn't recognize it. :(
WooHoo! 50% success! I got the rotator upgraded! I had to uninstall and then reinstall pyserial.
pip uninstall pyserial pip install pyserial
Do you happen to have other versions of python installed ?!
if you just run /usr/bin/env python3 in the terminal, what version does it reports ?
Here is why I just tried and got no error on the import :
/usr/bin/python3 Python 3.8.2 (default, Nov 4 2020, 21:23:28) [Clang 12.0.0 (clang-1200.0.32.28)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import serial >>>
can you try that ?
No luck. :( prog_leonardo /dev/cu.usbmodem14101 Rotator-4.0.0.hex Traceback (most recent call last):
File "/usr/local/bin/arduino_pro.py", line 6, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
These are just warning and should not prevent you from installing the serial module. do not update pip or anything else.
You can delete the /Users/peterkennett/Library/Caches/pip to get rid of the warning on the directory owner.
Apparently it says that the module is already installed in /Library/Python/3.8/site-packages
Does the python script still complain about not finding serial ?
I just upgraded to OSX 10.15.7
And tried to reinstall serial. I got this message. peterkennett@Peters-MacBook-Air ~ % sudo /usr/bin/pip3 install serial
Password:
WARNING: The directory '/Users/peterkennett/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/peterkennett/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: serial in /Library/Python/3.8/site-packages (0.0.97)
Requirement already satisfied: future>=0.17.1 in /Library/Python/3.8/site-packages (from serial) (0.18.2)
Requirement already satisfied: iso8601>=0.1.12 in /Library/Python/3.8/site-packages (from serial) (0.1.13)
Requirement already satisfied: pyyaml>=3.13 in /Library/Python/3.8/site-packages (from serial) (5.3.1)
WARNING: You are using pip version 19.2.3, however version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
peterkennett@Peters-MacBook-Air ~ %
No, I did not update the Mac. I will now.
Very strange as we installed the python serial module !
Did you update macOS ?
Can you try re-installing the python serial module ?
I'm about ready to give up. I'm back to the "ModuleNotFound" error again! peterkennett@Peters-MacBook-Air Downloads % prog_leonardo /dev/cu.usbmodem14101 Rotator-4.0.0.hex
Traceback (most recent call last):
File "/usr/local/bin/arduino_pro.py", line 6, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
I have no idea why that syntax error did show up before, but now that I fixed it, the serial module is not working again! ARGHGHHH!
Here's the code again - and it all seems fine to me.
#!/usr/bin/env python3
import sys
import os
import random
import serial
import time
PORT = '/dev/cu.usbmodem14101'
def main():
if(len(sys.argv) >1):
serial_port = sys.argv[1]
else :
serial_port = PORT
# Arduino reset
ser = serial.Serial(serial_port, 1200, timeout=1)
ser.DTR=0
ser.close()
time.sleep(1)
while True:
try :
os.stat(serial_port)
break
except Exception as e:
time.sleep(1)
continue
return 0
if __name__ == "__main__":
sys.exit(main())
The PORT in the code is just a default if you don't pass the actual port on the command line so it doesn't quite matter as the whole function (prog_leonard) does pass the port.
Thanks! By the way, I changed the port address in your code to the USB address used by my system to the rotator. Was that appropriate?
Here it is :
#!/usr/bin/env python3 import sys import os import random import serial import time PORT = '/dev/cu.usbmodem1411' def main(): if(len(sys.argv) >1): serial_port = sys.argv[1] else : serial_port = PORT # Arduino reset ser = serial.Serial(serial_port, 1200, timeout=1) ser.DTR=0 ser.close() time.sleep(1) while True: try : os.stat(serial_port) break except Exception as e: time.sleep(1) continue return 0 if __name__ == "__main__": sys.exit(main())
Hum, let me fix the code to be proper python3 :)