Windows GUI/Controller for MySensors
-
Will this program act like a controller (take the place of Vera?) and handle automation logic?
-
hi all,
here is the first alpha version of the MYSController (I changed the name).
There are still lots of things that need to be done and some bugs :), but feel free to give it a try. I included the modified bootloader (flash according to the settings in the fuses.txt file) and two example .hexs for testing/uploading. From my experience, the OTA works better/faster using the serial gateway.
Cheers,
tekka -
here is the first alpha version of the MYSController
:+1:
Saw it was a Windows executable but did give it a try on Linux:
wine MYSController.exeAnd the GUI comes up nicely!
I can not select the serial port yet, so could not test it further, likely have to do some mapping in wine.
-
OK, Thank's!
The GUI doesn't work on mac with wine. The program is running good but do not recognize the usb device (even with a symbolic link to wine,...). Is it possible to get the program on mac?
-
I can not select the serial port yet, so could not test it further, likely have to do some mapping in wine.
Took some time to find out but after:
-
Adding a mapping from the Linux serial port to the Wine dosdevice configuration:
ln -s /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_* ~/.wine/dosdevices/COM3 -
Adding to ~/.wine/system.reg:
[Hardware\\Devicemap\\Serialcomm] 1231984861 @="" "Serial0"="COM1" "Serial1"="COM2" "Serial2"="COM3"I could start MYSController.exe and select COM3 and get:

But after pressing OK things look to work however:

@tekka : Thanks!
-
-
I can not select the serial port yet, so could not test it further, likely have to do some mapping in wine.
Took some time to find out but after:
-
Adding a mapping from the Linux serial port to the Wine dosdevice configuration:
ln -s /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_* ~/.wine/dosdevices/COM3 -
Adding to ~/.wine/system.reg:
[Hardware\\Devicemap\\Serialcomm] 1231984861 @="" "Serial0"="COM1" "Serial1"="COM2" "Serial2"="COM3"I could start MYSController.exe and select COM3 and get:

But after pressing OK things look to work however:

@tekka : Thanks!
-
-
Doing OTA did work once but trying a second time did not work out yet.
I found that it is important the user that runs "wine MYSController.exe" must have access to the port ~/.wine/dosdevices/COMx links to:
$ ls -als /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_* 0 lrwxrwxrwx 1 root root 13 25 jan 09:38 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9SZN99X-if00-port0 -> ../../ttyUSB0Is not good ("root root"), I changed the link to to:
$ ls -asl /dev/ttyUSB0 0 crw-rw---- 1 root dialout 188, 0 25 jan 11:34 /dev/ttyUSB0In the debug log I see the 0;0;3;0;14;Gateway startup complete. message but no messages from the sensor.
Looks like the "File not open." window I am getting and:
fixme:comm:set_queue_size insize 4096 outsize 0 unimplemented stubI am seeing on the command line has something to do with it.
NB: Seems like the GUI is programmed using TK. How about compiling it for Linux?
-
Doing OTA did work once but trying a second time did not work out yet.
I found that it is important the user that runs "wine MYSController.exe" must have access to the port ~/.wine/dosdevices/COMx links to:
$ ls -als /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_* 0 lrwxrwxrwx 1 root root 13 25 jan 09:38 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9SZN99X-if00-port0 -> ../../ttyUSB0Is not good ("root root"), I changed the link to to:
$ ls -asl /dev/ttyUSB0 0 crw-rw---- 1 root dialout 188, 0 25 jan 11:34 /dev/ttyUSB0In the debug log I see the 0;0;3;0;14;Gateway startup complete. message but no messages from the sensor.
Looks like the "File not open." window I am getting and:
fixme:comm:set_queue_size insize 4096 outsize 0 unimplemented stubI am seeing on the command line has something to do with it.
NB: Seems like the GUI is programmed using TK. How about compiling it for Linux?
@daulagari
interesting, do you get the "File not open" message with AutoFW disabled? Also, what happens if you reboot the gateway several times (reset button), does the "Gateway startup complete" message re-appear? I recall that I had problems with OTA with the debug-mode enabled in config.h, the gateway kept freezing when sending OTA messages.
The controller is written in lazarus/fpc - porting to mac or *nix should be straight forward, I'll have a look. -
I have AutoFW disabled.
The funny thing is that things do not work at all if I do not get the "File not open" error.
No, rebooting the gateway does not make the "Gateway startup complete" message re-appear.Did watch the serial port using interceptty and see data is passed so it seems like Wine is not passing it.
-
Did do some more experimenting using a sort of Ethernet gateway (actual the relayed Serial gateway data) and see that MYSController.exe can connect but once it prints the first data it gives the "File not open." error and no further data is printed.
So it does not look like a serial port issue but something else.
Did not know Lazarus but it looks pretty good!
-
Did do some more experimenting using a sort of Ethernet gateway (actual the relayed Serial gateway data) and see that MYSController.exe can connect but once it prints the first data it gives the "File not open." error and no further data is printed.
So it does not look like a serial port issue but something else.
Did not know Lazarus but it looks pretty good!
@daulagari
ok, I could reproduce the error which seems to appear in connection with scrambled data from the gateway (during the gateway startup). If you press the dis- and connect-button a few times once the error appears, all pending messages will be processed and the controller should resume.
