Replies: 12 comments 12 replies
-
Franck I think the idea to create a User Class for new sensors is a good idea. I would suggest using a #define to enable user code and disable the built-in code for the various sensors. For the Dome maybe a RoofState method that can return OPEN/CLOSED/MOVING state and an Open and Close method in addition to the Initialize method. I think most user code will require a Service method that is called repeatedly. The MQTT library requires this. My MQTT addition currently modifies the station.get_sensor_data() to store the values received from the MQTT Broker. I have a configuration JSON that maps JSON keys to OC variables. I also have plans to supply the Safety Monitor from MQTT. My roof control and RG11 are read over I2C so these require polling. Kurt |
Beta Was this translation helpful? Give feedback.
-
I haven't tried your new code yet as I enabled one of the sensors on the web interface and if it doesn't exist the system crashes so I needed to erase the flash. Now it hangs on boot at this point 23:19:18.958 -> ETH Started |
Beta Was this translation helpful? Give feedback.
-
Franck
If you are going to work on MQTT let me send you what I have. I used the MQTT library here https://github.com/256dpi/arduino-mqtt
Many use the PUBSUB MQTT lib but the shas a har limit on the maximum topic size.
The code here has mqtt.cpp, mqtt.h, and parseWeatherJSON.ino. The loop{} needs a call to serviceMQTT(); The topic is hardwired to “observatory” as I didn’t fix this yet.
The code expects a JSON published in the topic. The mapping from the JSON Keys to the OC Monitor variables is contained in a JSON literal string in mqtt.h. This mapping can be changed on the fly by publishing the desired key-value to the topic.
Kurt
… On Jan 3, 2024, at 4:01 AM, Lesage Franck ***@***.***> wrote:
Kurt
I have tested the following, which, IMHO, does the job:
Create a "sensors" folder at the same level as the ino file
Put your .cpp/.h files in this folder
In defaults.h, add "#define SENSOR_XXXX"
In AWSSensorManager.(h/cpp) , add as many "#ifdef SENSOR_XXX (....) #endif" as needed to include your .cpp as you see fit. That is not as neat as building sensor classes separately but if we want to do that I need to meddle with arduino ide's build system and I am not ready for that yet.
Now the question is about the html/js files, which must be aligned with the supported sensors. I guess the js could interrogate some endpoint to retrieve supported sensors and only offer them.
About mqtt, I will dig into this when I have some time, but please bear with me, I also have ongoing customer station projects to work on, and, last but not least, my real job :-)
Cheers
F
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSFTDR3JBAJNCCMMUQ3YMU3CFAVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAMBRGY3DC>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Franck
I actually don't have any sensors or hardware connected as my data comes via MQTT from my Tempest station.
Kurt
Get BlueMail for Android
…On Jan 3, 2024, 8:01 AM, at 8:01 AM, Lesage Franck ***@***.***> wrote:
Double checked my wiring (as I remove a couple of things for the
breadboard) and it's now working. May I suggest you check your
connections? :-)
--
Reply to this email directly or view it on GitHub:
#74 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Franck
I was able to get this working. I had used the default aws.conf.dfl, because I forgot to edit it before uploading the SPIFFS again, and this selects the Ethernet and there is nothing connected there. I is working now.
Kurt
… On Jan 4, 2024, at 1:39 PM, Lesage Franck ***@***.***> wrote:
Kurt
Well, I do not know what is happening. If it is stuck at "ETH Started" it is because of a W5500 wiring issue, that is what happened to me. I have also removed the SPI clock speed downgrade to 18MHz because my problems were caused by flaky connections on the breadboard: it actually works well at 25MHz.
I also remember you use m5stack, right? Have you tried basic ethernet test sketches? I would rather start chasing issues methodically, since you did not change the firmware (afaik), chances are that the firmware is not to blame :-)
F
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSGON7ANTCUYROHB7PTYM4HOJAVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAMJWHE2TC>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Franck
Did you catch this:
case str2int( "openshutter" ):
if ( request->method() == HTTP_GET )
not_implemented( request, NULL );
else
dome->closeshutter( request, transaction_details );
break;
Kurt
… On Jan 4, 2024, at 1:57 PM, Lesage Franck ***@***.***> wrote:
Ah ok, so wiring issue, in a matter of speaking ;-)
I will see if there is a timeout I can set ...
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSDIU3GS4QRR4L46IZ3YM4JTFAVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAMJXGA4DG>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Franck
I am working on a stripped down version of just the Alpaca code and adding MQTT. This is easier than dealing with the complexity of the full station. I got the OC monitor working and am adding the dome and safety. I plan to build a Safety dashboard where I can set conditions or set safe manually. I'll forward the code when I get it tested.
Kurt
Get BlueMail for Android
…On Jan 8, 2024, 5:16 AM, at 5:16 AM, Lesage Franck ***@***.***> wrote:
Kurt
I know, initially the weather station did not directly have any control
over the dome (I merely sent an alarm to a RPI which controlled all
observatory aspects: cameras, etc.).
With one of my customers, I had to add a way to **close** the dome but
(until further notice) not to open it. ASCOM principles tell that if
you cannot complete an action, return an error; and the one that seems
valid is "not implemented".
However, if you need it, I can add an option in the UI like "Authorized
to open dome" and then I will update the code to actually do it but
then, I need to have an actual way of sending the command. It could be
via a relay or something ...
Cheers
F
--
Reply to this email directly or view it on GitHub:
#74 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Franck
I can sympathize. My ROR looks at the Mount Alt and checks a photocell that reflects off of a reflector on the back of one telescope. If I am present I check the camera. I have a direct drive mount so if the roof hits it then it is pushed out of the way unless something catches. Absent this I might be even more paranoid. I use an I2C relay to control the roof and the Pier-Tech. This is a lot safer. I had some issues with an ESP reset opening the roof but this is fairly bullet proof. You could access any mount if you created an ASCOM Remote device and then your ESP could use Alpaca to determine the altitude. My scope has an inch or two clearance with the roof closed so if it fails to open there is no problem.
Kurt
Get BlueMail for Android
…On Jan 10, 2024, 2:56 AM, at 2:56 AM, Lesage Franck ***@***.***> wrote:
Kurt
I have just pushed the fix for this defect. This and some other fixes
too ..
Thing is that, as we speak, my main (only?) customer for the dome
control has not decided yet if we can open the shutter ourselves from
the station (he has a complicated, redundant system for this operation
and, on my side, the station merely sends an alarm to a RPI in charge
of this). Again, initially, the station was essentially a station, not
a watchtower :-) Hence what seem to be weird limitations or design
choices.
Depending on the discussion I am about to have with him, I will find a
solution to workaround this; I am thinking of a checkbox in the UI to
allow/prevent openshutter operations.
I guess I will have to accept that the station is now more than a
station ...
BTW, any timeframe for your mqtt code? I would rather have a look at
something that works before I start development. I added a task in the
3.1.0 release related to MQTT support.
Cheers
F
--
Reply to this email directly or view it on GitHub:
#74 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Franck
Hopefully this come thru but here is a snapshot of my HomeAssistant dahs board. You can see an image of the scope with the reflector. Amazon has this https://www.amazon.com/gp/product/B073WV169V/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

On the MLX90640 i used this one https://shop.m5stack.com/products/thermal-camera-2-unit-mlx90640-110-degree-fov
You might try the narrower FOV version.
BTY I do all of my projects now using the M5Stack units. I have tons of Arduino boards and ESP modules but the I need to find a box and it is generally ugly.
The camera worked well but you need to get the ambient temperature and do a difference and probably do a flat field calibration on the data. I just bought a Pegasus URANUS sensor that I access via REST. This gives me SQM and Cloud cover. The issue is that none of these can be outside and you need a window that passes longwave IR out to 8-10 microns if you are going to use a housing. A silicon or germanium window will do and there are some plastics that will work. So right now I access openweathermap when the roof is closed and use URANUS when it is open. I think I am going to change this to use the start count from my Indi All-Sky camera. It publishes this to MQTT so I don’t need to mess with the RPI guts.
I use this relay https://shop.m5stack.com/products/4-relay-unit to control the Pier-Tech and an Aleko chain drive gate opener on the roof.
I got the roof working and the OC working using MQTT. It need a little more testing.
Kurt
… On Jan 11, 2024, at 6:13 AM, Lesage Franck ***@***.***> wrote:
Kurt
I see that you have played with MLX90640 for cloud sensing. What is your feedback about it? Is it reliable?
Now about your ESP resets and unexpected roof opening, I'd rather go for a N-O relay. If the ESP goes with the faeries, the root will remain closed because the ESP will need to close the relay for the roof to open. Well, provided that you add a pull-down resistor to the GPIO pin that controls the relay. But maybe I misunderstood your problem :-)
That said, we have discussed with a close friend about a way to secure roof closure and the need to know whether the mount is at home position and we came up with something similar (if I got your setup correctly): some mirror at the back of the mirror cell and a photodiode to check if the tube is in the right position.
The problem with interrogating the mount is that you make a fundamental assumption: you have some power supply still active and you can talk to the mount. With remote observatories, this might not be the case ... besides, I know better than to rely mount encoders to tell if the mount is in such or such position ;-) That may not be a problem with DD mounts, I will grant you that. My customer operates a telescope farm and definitely does not want to take chances, so there is always enough room between the roof and the tubes so that he can automatically close the roof at anytime without worrying about those details.
Cheers
F
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSGAZIHLPIOS2M6OPMDYN7QPPAVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAOJVGA3TG>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
I think it doesn’t like the .png file which is the default type for the Mac screenshot. Here is a jpeg

… On Jan 11, 2024, at 8:42 AM, Lesage Franck ***@***.***> wrote:
Kurt
I still cannot see the images you paste in the messages .. I get this: ""
I will check the MLX camera, found something for about 30 quids on ali.
About your box problems, I find that waterproof ABS enclosures from ali work pretty well. That is what I use for the station. About your SQM/cloud sensor, the setup I have with the station works perfectly well outside. The MLX90614 is waterproof (the BAA variant, that is) so you can forget about ZnSe windows and I use a 20°FoV lens (still from ali, which proves to be somehow waterproof, until it will not ... I guess!) on top of the TSL2591. It requires a bit of tinkering but these who fit into a 63x58x35 enclosure. I will add some pictures on GH to illustrate.
I have long stopped looking for commercial products, which, with the exception of the unihedron SQM, fail deliver adequate service This is one of the reasons why I get orders for the station btw :-)
Cheers
F
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSF5JXKYEUHR2ZE3Z2DYOAB6JAVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAOJXGU2DO>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
try this: The image in the third column second from the top shoes the E160 with the reflector velcroed to the back. The photo detector bounces an IR beam off of this and back to the receiver. The scope need to be a within a few degrees of stow for the relay in the sensor to close. This setup has been very reliable. I can override it with a little wireless remote if I had an issue like the reflector falling off but the shas never happened. I wouldn’t want it so if it was parked and raining that I could not close the roof.
Kurt
https://drive.google.com/file/d/1zxOabzEjnrsjlQK7ZYrEDKCUMyqr1z-a/view?usp=sharing
… On Jan 11, 2024, at 11:29 AM, Lesage Franck ***@***.***> wrote:
Nope :-)
—
Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSHI2AKWTSXQRFSVN53YOAVP5AVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAOJZGQ4TQ>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Here is night time image. The reflector really shines in in IR at night.
https://drive.google.com/file/d/1ypei7lvC59gV_n80pl2XqM4HgpDZMcTz/view?usp=sharing
… On Jan 11, 2024, at 3:25 PM, Kurt R Lanes ***@***.***> wrote:
try this: The image in the third column second from the top shoes the E160 with the reflector velcroed to the back. The photo detector bounces an IR beam off of this and back to the receiver. The scope need to be a within a few degrees of stow for the relay in the sensor to close. This setup has been very reliable. I can override it with a little wireless remote if I had an issue like the reflector falling off but the shas never happened. I wouldn’t want it so if it was parked and raining that I could not close the roof.
Kurt
https://drive.google.com/file/d/1zxOabzEjnrsjlQK7ZYrEDKCUMyqr1z-a/view?usp=sharing
> On Jan 11, 2024, at 11:29 AM, Lesage Franck ***@***.***> wrote:
>
>
> Nope :-)
>
> —
> Reply to this email directly, view it on GitHub <#74 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYJYSHI2AKWTSXQRFSVN53YOAVP5AVCNFSM6AAAAABBJZEV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAOJZGQ4TQ>.
> You are receiving this because you commented.
>
|
Beta Was this translation helpful? Give feedback.
-
To decide how to best add "external" sensors to the existing baseline
Beta Was this translation helpful? Give feedback.
All reactions