PiDome Domotica/Home Automation


  • Plugin Developer

    Recently i have build support for MySensors in home automation software i'm writing and in this thread i would like to provide the opportunity to answer questions and post some F.A.Q.

    I know PiDome is very new and at least to say also unknown in the Automation scene. The base information about PiDome is already posted at the build section below the Controllers header. So here i will post some information how the support is integrated.

    First off you will need to add the gateway device. Open the peripherals page, plugin the Arduino Nano or other used serial device with the Mysensors Gateway code. The device will be added to the list. Click on it and set the Serial information, 115200 Baud, 1 stop bit, no parity, 8 databits and the MySensors peripheral driver (Settings Arduino Nano specific, check your serial device of there are other requirements). If the connection is a one timer press "Set and start" If these settings need to be persistent between reboots and server restarts press "Set, save and start".

    To use MySensors nodes within PiDome you will need Device skeletons. These skeletons are created with XML or a graphical editor which creates this xml. This skeleton is used to define a device structure which tells:

    • Which groups a device has (At least one is mandatory),
    • What kind of controls are used (Toggle, Button, Slider, etc..) in these groups,
    • what kind of datatypes they hold (integer, float, string, boolean),
    • What kind of options a device has (not used with MySensors) and
    • device location type.

    To explain the above mapped to MySensors devices with an example:
    Let's say you have a sensor node which holds a type S_LIGHT, which is a light actuator (you can toggle this of or on). So you would probably use the variable type V_LIGHT which is light status On or Off (1 or 0). and you have about 5 of these exact same nodes.

    Let's translate:
    You will need the device editor to create the above sensors node. This means a sensors node is a device in PiDome. To let this device know how your sensor node looks like you will need to define the S_LIGHT sensor type and V_LIGHT variable type.

    The sensor types are defined as groups in PiDome. So if you have the device editor opened and add a group you will need to supply a group id and a group name by drag and drop this to the device field. The name can just be like "My light", but the group id MUST be named after the sensor id thus must be the number you used in gw.present(). For example, if used gw.present(0,S_LIGHT); the group id must be 0.

    Now it comes to defining a variable type. When you drag and drop the toggle control (which switches between two states) you will be prompted to fill in details. The most important ones are the control id which MUST be the name of the sensor variable type which in this example is V_LIGHT. The name of this control can be something like "Light Switch". The datatype of V_LIGHT explained on the protocol page is 1=On, 0=Off, so you would use the integer datatype. the On label would be "On" with value 1, and off the opposite.

    When the device is saved, you have created a skeleton ready to be used. and you can start adding this single skeleton 5 times.
    More information about adding devices is posted on the PiDome website at: http://pidome.wordpress.com/2014/08/10/added-partly-mysensors-org-wireless-devices-support-api-1-4-beta/.

    The title is a little bit misleading because there now is support for the final 1.4 version.

    There is support for Battery level and Inclusion mode triggered by the hardware button.

    A final todo:

    • Fully test automatic nodes address assignments (i am not able to test this because lack of hardware, it is there though)

    MySensors MQTT support: Available using the MQTT gateway


    I will try to be here as much as possible but PiDome is quite a broad project.


    [EDIT] We now have a forum available, so if you have questions which are not related to MySensors these can be posted over there[/EDIT]



  • How can I update from early Version of MySensor support to the actual PiDome version with new functions? Download and overwrite? The settings are lost?


  • Plugin Developer

    @aquapro

    How can I update from early Version of MySensor support to the actual PiDome version with new functions?

    Just download the new version from or http://pidome.wordpress.com/downloads/ which would be the most stable version. OR if feeling adventurous from http://builder.pidome.org/job/PiDome Server platform snapshot build/lastSuccessfulBuild/

    Download and overwrite?

    Yes

    The settings are lost?

    Currently they are, I hope to have this fixed soon, but not earlier then at the end of tomorrow. I will then release the last version which does not update and should be the minimal version required to have sequential updates with every new download if applicable.



  • @John I follow the installation instruction I do get info from the Gateway see info below. The sendor ID is 20 this is a temperature sensor however the info from the "Select from device list" say it is V_WATT why is the case?
    pidome01.PNG
    pidome02.PNG

    Then when I go to the the "Device (Add/Remove/Setting)" I click on start the sensor I get "Could not start device: Incorrect device spec loaded: null". What is the issue?

    upload-b4e5eb8d-bc60-4882-a3fe-fea44d42c0f1

    Here is the info from creating the "Custom Device"

    upload-ef6d86bc-410a-4bff-9f5c-417491116b21
    upload-fcd46295-b561-429e-a794-99ceccc6554a
    upload-c5ffce2b-b351-4008-aec6-30a6928e5850


  • Plugin Developer

    @Fwessels
    This 255 message can be discarded and should not have been included and can be discarded.
    Just looked into it and this was caused due an error on my side where there was an old issue which came back and will be solved with a new alpha build.

    The info it shows is the information received based on gw.present(); could you tell me which present variables you have used? I try to follow the index as shown on the API page (Type and Value http://www.mysensors.org/build/serial_api)

    Reason "null" wouls be a driver cache issue, a restart of the server helps to resolve this, the code used for running a mysensors custom created device has not been loaded before and therefore is not cached yet. This will also be solved with the next update.

    If a restart did not help it, there is a quick and dirty way to see the XML created which i will then need to resolve this for you. For this the log file is needed while the serveris running in debug mode (enabled via "settings > server settings") The log file is located at logs/system/appLog.txt

    To view/follow the log file type "tail -f logs/system/appLog.txt". At the moment you save the device from the editor the XML passes by. Please do a paste bin or message me for other ways to send it.



  • @John I rebooted the Pi server and now I don't get any data from the gateway. Attached is the appLog.txt
    appLog.txt

    I just unplug the usb and plug it back now I get this error.

    appLog.txt


  • Plugin Developer

    @Fwessels
    sorry for the late response, got sick yesterday.

    In the first appLog i'm seeing :
    Error handling: 20;0;1;0;0;19.0, error: Group 'S_DOOR' does not exist
    Error handling: 20;1;1;0;0;20.3, error: Group 'S_MOTION' does not exist

    There is data coming through and is expecting S_DOOR and S_MOTION groups in the added device as is defined also on the API page.

    The error try to add a non existing device is part of the non cached created device. I'm almost done with an update and will come back to you soon.


  • Plugin Developer

    @Fwessels

    I uploaded a new version of the server could you check if the updated version suits your needs and solves the above issues? Unfortunately it requires a clean installation. So the server has to be removed and re-added again. Also the browser cache needs to be cleaned. The software relies heavy on this. But, future updates will not require a clean database, so updates will not destroy any data anymore.

    The new version is available here: http://pidome.org/downloads

    A lot has changed and one of them are the group id's:
    I've mentioned before to use the S_ sensor types, this has been changed to use the sensor id. When i take a look to the applog you posted you will be needing two groups one with id "0" and one with id "1". The controls id stay the same.

    The device list should now also display a new sensor node correctly for both AUTO mode sensors (address 255, add one at a time please) and fixed address sensors, if you use both, first add the fixed address ones.

    Be aware, you will see the MySensors MQTT version in the custom devices list, please do not use this (yet), it is not finished yet.

    It also is possible to starte the server with "./server.sh trace &" to get a bunchload of more information in the log file. Use with care and only when facing an issue. the trace option can be turned off via the "Settings > server settings" page. this trace option is only available during server start.



  • @John I download the Alpha version as I get an error "This Webpage is not available" for the dev version. I did a clean install and clear browser cache. So now the sensor is reporting the right info on "Select From device list" See below:
    upload-6f600b55-fb95-408d-9443-f594febbb5e4

    However I still getting a error in app log the sensor is still report the wrong info.
    upload-4ff10875-be55-4c62-aa8f-55fc89ae652b

    Attached is the AppLog file.appLog.txt

    Also every time I reboot the server I lose the USB configuration and I have to reconfigure USB port?


  • Plugin Developer

    @Fwessels

    Did you use the group id's "0" and group id "1" for the device "device study" with address 20? If not this can be changed via the custom devices editor, when changed it will be applied. Also when you add the USB device did you use the "set, save and start" button?

    If you would start the server with "./server.sh trace &" it will show the device XML's, loading options used, found usb ports url's used etc..



  • @John I change it to Groud Id "0" and Id 1 for temp.I also reboot the device and I am not getting any info in the device log about the sensor why is this the case? But I do get data from the gateway.

    Yes I did "set,save and start" button

    upload-e60defbc-e83d-4f8c-b1d8-0842e5416a41

    If I start the server with "./server.sh trace &" i just get this on the command line "[1] 3201"
    here is the app logs:appLog.txt


  • Plugin Developer

    The "[1] 3201" means the command executes is detached from the console and used pid "3417" because of the "&" sign. It does not mean it ain't started.

    Looking at the log file seeing:

    2014-09-06 09:07:23,229 [main] INFO org.pidome.misc.utils.TimeUtils - Setting timezone data: Europe/Amsterdam, 51.950000, 4.449999
    2014-09-06 09:07:27,403 [main] INFO org.pidome.misc.utils.TimeUtils - Setting timezone data: Europe/Amsterdam, 51.950000, 4.449999

    and other double lines and ports which are busy and bindings that fail that the server has been started twice within 4 seconds. They should both be stopped. and the server started only once.



  • @John I did again a clean installation and now I am not getting the error any more. I am not getting the data displaying in the graph. What will the issue here.

    Here is the custom setting I have 2 temp senor on this unit:

    upload-82c5ca50-d0fd-4177-8abd-e9c8edbc9ea9
    upload-7228a90b-268e-4105-aeea-a1b0ffb92c92

    Temp2:
    upload-4da82ef0-f217-4a5e-88cc-765a2bf9bae8
    upload-81e396a1-5b60-4b09-acf3-4189a6b616de

    Data from the "Cotrol Views"

    upload-10aad1bc-f18b-4a64-b52d-015cc9509b6a
    upload-43b09b74-4c1c-475f-b654-231de8d12d6d

    here is the AppLog:appLog.7z


  • Plugin Developer

    @Fwessels
    The group id's are correct. The control id's should be the var namings:

    0 = V_TEMP
    1 = V_HUM

    You can edit the custom device, after edit the change should be exposed immediately and data should also be displayed after first report after the change.



  • @John I just don't get this to work. I also download the latest version and did and clean installation and still I am getting group "S_Door" does not exits

    pi.PNG

    I have the setting as per what you tell me. I now are giving up as it cannot be that difficult to get it to work or I am just missing something.
    I have the same sensor working on OpenHab the only difference is that on OpenHab I am using the MQTT ethernet gateway.


  • Plugin Developer

    @Fwessels
    Just send you a chat message because i got interested in the XML structure the device editor then would be creating.


  • Plugin Developer

    Thanks to @Fwessels the issue has been found :). More then many thanks to him.

    It was related to the build environment which supplied the alpha downloads. It "chose" the wrong source code to build which caused mixed results. This has been solved.



  • Great news I now have PIdome running with Hum sensor and Dallas temp sensor.

    upload-2de9399e-840b-4589-9d3d-93eca635c53d



  • @john this morning I have a funny issue as I add the new door sensor to PiDome all the Custom device disappear. Even it I add i new custom device it is not showing up in the list. I reboot the PI and it is still doing the same thing what can the issue be?

    upload-79baf84d-614a-40d3-8dfc-786d31154bef


  • Plugin Developer

    @Fwessels
    Could you provide me the appLog file? This i have not seen before.



  • @John I did not start it with the trace. I will rest start the server with trace on.

    appLog.txt



  • @John here is the applog with trace enable. I also created the door sensor and still it is not showing up in the Custom device.

    appLog.txt

    upload-7edd95cb-dfaa-4f29-b8e3-f431022f83a7


  • Plugin Developer

    First i'm seeing data coming in from the gateway before a gateway started message appears:
    2014-09-07 10:11:13,452 [Thread-19] TRACE org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Received from hardware driver:
    2014-09-07 10:11:13,456 [Thread-19] ERROR org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Faulty data or method handling: 2 (�
    )

    014-09-07 10:11:23,828 [Thread-19] TRACE org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Received from hardware driver: 0;0;3;0;14;Gateway startup complete.

    It does not interfere, but still, strange.

    Do the devices show on the main start page e.q. dashboard? because i do see responses (still checking if server send valid ones)



  • @john Yes all the sensor are still reporting


  • Plugin Developer

    I think i've found it... i see a name with a "" in it: "Door\Window" all though it does not have a special meaning in json, it could mess with the tables code showing the devices, one moment. It is possible to edit a custom device with a direct link, i will send that one in a chat if you don't mind.



  • @john not a problem


  • Plugin Developer

    The usage of "" characters in the custom device editors device naming have been tackled in the latest available snapshot.


  • Plugin Developer

    I have added an MQTT bridge for MySensors based on the gateway/broker created by @Damme .

    I was only not being able to test it on the real gateway but have tested it against a regular MQTT server. So if there is someone willing to test it i will be very thankful :). The tests i have done was with iot.eclipse.org, so i'm also not exactly sure if the data is implemented correctly
    iot.eclipse.org test method

    It has been implemented as a plugin which has the possibility to execute device mutations, so to add this plugin go to "Plugin management > Device Plugins". Click "Add new plugin". Choose the "MySensors MQTT bridge".

    Fill in a name and description, use the MQTT gateway ip address. leave the port and prefix as the shown default if you have not changed it.

    To create devices for the MQTT gateway refer to the first post and instead choosing the MySensors serial device, choose the MySensors MQTT device.

    The plugin's view shows devices reported by the MQTT gateway, it shows the device address and sketch information. Adding devices shown on that page is exact the same as done with the serial version.



  • @John I did as you say with the MqTT drive now if I click on the driver and then on the "Pidome MySensor Mqtt" noting happen

    upload-235f809e-bcb0-4de6-9104-ee41273114bd

    applog:appLog.txt

    Also if I click in view nothing happens
    upload-40f6c457-0d63-4919-a618-7e37b7536bb7


  • Plugin Developer

    Clear your browsers cache and try again. The devices appear at the plugin.

    P.S.
    I will in a later state modify the driver name, it is an emulator between the devices and the plugin so the plugin can create devices the same way a driver can. The reason why it is a plugin is that drivers are hardware based (GPIO, USB access). The plugin now behaves like it is hardware.



  • @John Hi I am back again. I now can see the MQTT node sensor. When I want to add the node sensor the custom devices don't show up in the "Select device to use" Why will that be?

    Custom device adde

    upload-c9a0b7b8-0e8a-4b1b-8d98-0bd9584820e9

    Custom device not show.

    upload-245527f8-f376-400c-96d2-b46432d82a93


  • Plugin Developer

    Device skeletons are limited to their driver/plugin and can not be interchanged (yet). When you are using the MQTT plugin you should create a MySensors MQTT custom device/skeleton. The first listing above shows these devices as a device for the serial version.



  • @john Mysensor MQTT is now working. Thank for all you help 🙂 👍


  • Plugin Developer

    👍 Next step would be integrating the Ethernet gateway, but that could take a week or so (working on other demanding tasks currently).



  • @John I see that you don't have any time days in your automation triggers. Do you plan to do this at a later stage?
    I see that you are going to do twitter integration are you look as other message integration tools like pushbullet?


  • Plugin Developer

    Currently the triggers do days in the form of "Every day", "Weekdays", "Weekend" and per day like "Mon", "Tue":

    Alt text

    The time currently can be fixed, sunrise or sunset with calculations:

    Alt text

    The above can then be resulted in a rule like below:

    Alt text

    The above would then say that: "turn true every day when it is 30 minutes before sunset".


    About messaging integration:

    The messaging framework is currently partly integrated and currently only takes care of SMS messages (outgoing). When the full messaging framework is implemented twitter will be added together with it's messaging API which could then be used to integrate web services. Currently i'm still very busy with a lot of core parts where developing devices, plugins stands next to it when specific API parts are done. So i can not say if or when pushbullet integration will be available and/or it is created by me.



  • @John what will I do if my Alarm is trigger and I want to switch it off after 10 min?


  • Plugin Developer

    Because triggers are meant to be used as real triggers. If this happens quickly do that. If you would automate your alarm you would need to create a second trigger which would say, depending on the earlier example: when every day it is 20 minutes before sunset, execute alarm off.

    Currently next to the triggers i'm busy with Automation flows you can build with blockly. But this is still under heavy development: https://twitter.com/Pi_Dome/status/510355701114605568/photo/1



  • @john I have the automation trigger for if the humidity for the bathroom. I have two trigger on for switching the fan on if Hum is >20 and one to switch the fan off it is Hum <19 this work. What I try now do now is combine this into one trigger where I use the "or" function . Can the execution list only execute one function for multiple condition?

    upload-c4e64a4f-3ec2-48c0-8888-75e85bb0c6b1


  • Plugin Developer

    @Fwessels
    The above is one trigger.

    Currently you have set it up like:
    IF (the data description of room 01 > 20%H) OR (the data description of room 01 < 19%H) DO (set study lights to On)

    Triggers are really also meant as triggers and are based on a combination of rules which should always revert to true with a list of actions of the total list of rules are true. To put it simple: "When this, then that". There is no "else" 😉

    If you want to turn on and turn of based on a quick trigger action you should or create two triggers, or wait for the Automation rules to be implemented in the server which currently is in development.



  • @john I have two triggers and that is working.



  • @John Hi did not bug you for an while. I change my setup to work with the MQTTGateway but now I have the following issue.

    1. My motion and door sensors is not changing status in the "Data description" field. This did work with the serial gateway.
    2. On my relay button sensor the "Toggle description" is not changing it I press the button this did work on the serial gateway.

    I run you latest snapshot (373)

    PS the Android client is now working on my Tablet and Phone (4.4.2)


  • Plugin Developer

    @Francois

    That's the current latest yeah, have you defined the the data and/or toggle buttons as boolean or as an integer?

    The Android client was kinda annoying, when deployed on a device from the development it worked, but when installed by the apk file it stopped working... Thanks for confirming it now works!



  • @John I did the same as the serial configuration as data field and boolean


  • Plugin Developer

    @Francois

    So both the data field as the toggle buttons are defined as booleans?

    Since alpha 271 the server also displays the last received date and time positioned above the controls, are these modified? Not yet real time in the web interface, you have to click the device again in the list to see if it is updated.



  • @John both the fields are defined as data fields and as boolean. But the data field is not changing. This configuration is working in the serial gateway. Should I change this to toggle button for the MQTTGateway?

    upload-0c9c8b71-3c36-4c09-a365-6c2c6b6863b8


  • Plugin Developer

    @Francois
    Not needed, i understood you also had a toggle button.

    Is it possible to mail you an updated MySensors library package? it currently is not possible to compile the whole server.



  • @John Yes you can email the update library. Do you still have my email address?


  • Plugin Developer

    @Francois
    Yep, and it's on it's way.

    [EDIT]Confirmed as fixed and also generally available with server download[/EDIT]


  • Plugin Developer

    I want to thank @Francois and others for some intensive testing of MySensors (and other stuff) in PiDome via both the serial and MQTT gateways.

    P.S. From today until October 3rd responses are somewhat delayed due to the upcomming JavaOne conference.


  • Plugin Developer

    Well, normally i do not brag about things, and this has nothing to do with MySensors, but i thought that this might be ok.

    Sunday night PiDome has received the Duke's Choice Award for being innovative. It is not only for the server but comprehends the whole PiDome platform (Server, Desktop OS like client, Android client, upcoming Raspberry Pi client which can be self designed on the server and the upcoming Netbeans PiDome Platform development plugin). They have not only looked at the current state of the project but also future promises and future platform part releases (from which there is code in progress)

    The price announcement included the following sentence: "Because it's so exceptional what your project has done, we decided to upgrade you to the duke's choice award instead."

    So we are proud as [FILL_IN].

    So yeah, i just wanted to brag about it 🙂


  • Hero Member

    @John Well deserved! Congrats! You've almost made me a believer in Java so that is saying something 😉

    Some of these other home automation controllers (OpenHAB ...) should really reconsider what and how they're doing things. I know they didn't start out on single board computers like the RPi, but just to recapitulate, both running their factory defaults, OpenHAB takes almost as long to boot on my i7 as PiDome takes on the RPi.


  • Plugin Developer

    @bjornhallberg
    Thanks!

    To be honest, i had my doubts, certainly when running Java7 on the PI and the early bird releases of Java8. But since the final Java8 release and the Late Development releases i started to believe in it (again). With JDK 1.8 they did a huge step forward, and with Java9 and if i have to believe their Major opening keynote this year, it should be becoming faster, at least during java initialization.

    Also i'm targeting Java SE Embedded, which is more optimized for embedded use like the PI.

    Well, the default factory boot of PiDome includes the initialization of security certificates. when SSL is disabled you will win at least 5 seconds boot time (where the secure http and sockets startups are not taken into account).



  • @John Congrats for winning this price 😉 and well deserved for all the hard work that you and team put into the PiDome.

    From the first time that I start playing with PIDome I like the way it was running on Pi and the users interface. Over the last few week I playing with other Home Automation system and every time I come back to PiDome as it is just that easy to use and setup. You can have your system up and running within 30 min or less that also including configuring the sensors. Create rules is now so easy with the integration of Blockly.

    Keep up the good work and it is really great working with you.


  • Plugin Developer

    @Francois
    Thnx! It really is a joy be working with you and that you have been hammering me with emails of which helped a lot to get the MySensors support at the current level and also exposed some internal design flaws which have been changed. I'm glad you like it. And if there is anything, you know how to find me 🙂



  • I've installed Pidome on my Pi yesterday and everything seems to work, then I plugged in my Arduino nano clone with gateway sketch installed and nRF connected to it. Using python I communicated with it without any problems. But then I opened the Peripheral setting in Pidome to add the device and it doesn't see a thing... Don't know what I'm doing wrong. Seems like Pidome doesn't have enough rights. My user is in dialout group just as it was explained in PiDome installation guide. Can anybody help?

    BTW, this is my first post on this forum so I'd like to say hi to everyone.



  • @Arielpod what gateway are you using Serial or MQTT?



  • Wow, you're quick! I'm using serial gateway, haven't installed any usb drivers or plugins to PiDome.


  • Plugin Developer

    It is possible that clones are not working because currently there is no web interface to ask if you are sure you want to use a specific device and how to use it. It is part of a security mechanism built in the server for this read on:

    We support a range of USB device types like USB-HID, USB-RAW and USB-[FILL_IN_EMULATOR] (Emulators like serial ports etc...). I have came across USB devices reporting multiple interface types which is very strange, so in the known peripherals database only the real thing has been flagged as a known peripheral and what it does.

    There is code present in the sever (locally on my workstation) which can identify these devices and the anomalies but is not 50% stable yet, i can include this code with the next or follow up release so also cloned devices which correctly report their USB capabilities will show up in the interface.

    Gimme a day of three for this because the web interface module for this has to be created.

    [EDIT]You do not need to install any drivers etc... because for serial based devices it already is integrated in the server[/EDIT]



  • Ok, thanks! I'll reinstall it in the meantime just to find out if that would help. BTW, in lsusb, the device appears as 'qinheng electronics hl-340 usb-serial adapter'.

    Patiently waiting for some news then. Cheers!


  • Plugin Developer

    Would you by accident also have the vid and pid from this device?



  • This post is deleted!


  • I'll check that when I get home.


  • Plugin Developer

    That would be cool, it then could be included as a default "considered good and save to use" device if it performs as it should. The interface will also be added though, but in a later stage



  • Ok, it's 1a86:7523


  • Plugin Developer

    Thanks, i will add this one to the safe list (for the time being). I will notify you when it is available.


  • Plugin Developer

    @Arielpod said:

    Ok, it's 1a86:7523

    I have included the mentioned device in the latest build. I do have to say that this is a quick build for testing purposes so some functionalities may be broken.

    The build for now is only available on the build server at: http://builder.pidome.org/job/PiDome Server platform snapshot build/lastSuccessfulBuild/

    This build does require a clean installation though, but is update safe so when newer builds are available you won't loose any data.



  • I'm not quite sure what you meant by "clean installation" but I just removed the directory of the previous installation and downloaded the one you've given the link to. Every time I connect the device I get an error:
    error.png


  • Plugin Developer

    Resolved on the build server and available in the link posted above.



  • Great, it's working! Thanks a lot.



  • Hi, looking for some advice on connecting sensor to PiDome. Think I've followed the instructions correctly but when connecting sensor under 'Devices' I get this message 'New device: Possible new address: 1 if not occupied before adding (Restart node after assigning).' and nothing to choose.

    forum1.png

    My custom device settings are as follows with the Arduino CHILD_ID set to 1. Is there something obvious I've missed or is S_MOTION not included yet?
    Thanks, Jon

    forum1a.png forum2.png


  • Plugin Developer

    @jonnyfishman
    Hi,

    If you use S_MOTION in the Arduino code then the group id should be 1 and the data control should correspond with the V_ value used in the Arduino code.
    With the motion detection you can use the boolean data type (the integers 1 and 0 will be correctly handled). This will make it easier in triggers and automation rules where you can select "true" or "false" from a drop down instead of filling in the 1 or 0.

    By clicking on the "Add sensor node" you will get a popup where you can choose the device created in the device editor.



  • Hi,

    Thanks for the reply. I have checked the settings and changed the Group ID to 1 and the Data field ID to V_TRIPPED, using the Boolean option.

    The problem I have is that when I click 'Add sensor node' I get the message 'Done (no choice of device)' and nothing is added in devices and the error log shows the following:

    10-10-2014 21:59:53 0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=1,st=fail:1
    10-10-2014 21:57:50 Trying assigning address '1' to a new node

    Thanks, Jon


  • Plugin Developer

    Do you see the device back in the "New nodes presentation" with an address when you restart the node? this would mean that the node did not got it's address assigned. I have understood from @hek that the line:

    10-10-2014 21:59:53 0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=1,st=fail:1
    

    does not say if that it has failed or succeeded.

    The system needs a Node with an address before it can be added, the reason why there is no device selection is because of the above line can not guarantee a success or a failure. So after "Add sensor node" you have to restart the node, because only then the address is known. I should change the name of the button though to "Assign address" for making it more obvious.



  • Awesome, that sorted it! Thanks. Think I was leaving to long a time (or to short) between restarting the node. Really enjoying the Server interface, the macros and automation rules are really powerful (just need to get some more nodes to really have a play).

    I saw on one of your posts that battery monitoring is a to do, has that happened or is it still in the pipeline. Also is there a way to trigger an email as I don't have a SMS dongle (thinking I could do it with a sensor set as RelayActuator on a GPIO pin on the pi that would trigger a PHP mail function but there's probably a more efficient way to do it).

    Sorry for all the questions...


  • Plugin Developer

    Sorry for the late response, had a meeting with my (hardware) development partner in crime this weekend...

    Yes this still is in the pipeline, i think it has slipped between all the other work currently going on, as the same is with the email notification. You would help me a lot if you would make a feature request for the both above at: https://bitbucket.org/pidome/pidome-server/issues?status=new&status=open (via the create issue link). It is our main global to do list ;).

    No problem, all questions are welcome!



  • First of all - great work with PiDome!

    I've been trying to create a Custom device with a color picker but I always get following message:
    error.png
    and in appLog this appears:
    applog.png


  • Admin

    Tried to use the xbmc 13 media plugin, but after enabling it, it shows up as XBMC 12 in media plugins. Also my XBMC box tells me that a version 12 client is connecting to it.

    Also, I noticed that it only shows "playing" state, when I'm watching a movie from local storrage. If I watch live tv, or use a streaming plugin, it seems that pidome doesn't know about it. Is this because of lack of functionality in xbmc protocol?

    / Thomas


  • Plugin Developer

    The above both are correct, As long as the server is an Alpha version all supplied downloads are automated this also means any test build is also supplied.

    The color picker error is due to the fact the color picker is currently being modified to support different color schemes and color set possibilities. It was set to only accept hex parameters. This is being changed to HEX, RGB, HSB and Kelvin with color modes: HSB, HSL, CIE and RGB. So this control is currently heavily being overhauled and also in snapshot state.

    The functionalities of XBMC 12 and 13 regarding exposed for base XBMC 12/13 functionalities are the same. It is correct that the streams and live TV are not included yet. I have created a request at: https://bitbucket.org/pidome/pidome-server/issue/133/extend-xbmc-plugin-func to extend the features. The build server does have an updated version where correct plugin usage is shown.

    I do suggest to keep an eye on http://builder.pidome.org/view/Snapshot builds/job/PiDome Server platform snapshot build/ and report bugs/issues found not related to MySensors on https://bitbucket.org/pidome/pidome-server/issues?status=new&status=open


  • Admin

    @John
    I tried the "latest" snapshot (downloaded today at 20:30 CET).
    After starting pidome up, went to the peripherals page, I then connected the mysensors gateway (arduino nano with the default serial gateway sketch) to my raspberry. Nothing happens in pidome at all..

    Shouldn't it popup with something about the new peripheral that was attached?

    Regards
    Thomas


  • Plugin Developer

    @Thomas-Bowman-Mørch

    Hi Thomas, Yes it should, also security has been tightened in the server which in some cases causes the real time web interface updating to fail. Does clicking the peripheral pages again show the nano? Also is the nano a clone or the real thing?


  • Admin

    @John

    Yeah, did also notice that it asks for user/password when opening the PiDome admin interface now. Nice thing 🙂

    Tried to reload the page, etc.but it didn't help.

    The gateway is a clone, with a PL2303 as usb->serial gateway.. I noticed that the real nano is using a ftdi chip.

    Does PiDome check the VID/PID of the usb device, in order to figure out what it is?

    / Thomas


  • Plugin Developer

    @Thomas-Bowman-Mørch

    Hi Thomas, yes it does. A feature build in is that users won't have to do anything if a specific device is connected via USB. It will then give the user the possibility to choose a driver based on the vid/pid in this example usb-serial so you should get the option to set serial options.

    An example: When a specific RFXCOM device is supported with fixed settings and connected to usb the server will autoload everything for this device and the end-user would only have to add devices.

    There is an interface on it's way that when an vid/pid is not recognized the server will check what kind of usb device it is and present the possible options for this device. You can then set the appropriate driver type and this then will be stored on the server. So every time this specific device is connected you will be presented with the correct device options. Also in the future we will build a webservice which will be capable of sharing vid/pid driver types and download appropiate drivers if the user wishes to do so.

    To make a long story short, what vid/pid is it using so it can be added as default known?


  • Admin

    @John
    Thanks John...

    The usb vid/pid is as follows

    idVendor 0x067b Prolific Technology, Inc.
    idProduct 0x2303 PL2303 Serial Port

    taken from lsusb -v

    / Thomas


  • Plugin Developer

    @Thomas-Bowman-Mørch It wil be included in the next build (411, current is 410). This one will be build tomorrow, let me know how the device handles.


  • Admin

    I patched the database in my install, by taking the sql update file you created for my device, and changing the db schema.

    I can now add mysensors to pidome! Yahoo! 🙂

    Next step is to get something usefull done with it

    / Thomas


  • Plugin Developer

    Good! Did you do this manual or just stopped, overwritten and restarted the server? The latter would have precedence ;). Updating happens automatically.

    If you did this manual make sure to execute

    PRAGMA user_version=4;
    

    in the SQL editor to make sure the DB is consistent with the configuration file otherwise the server will keep on trying update the database. To check the version you can run "PRAGMA user_version;" without the "=4" to see which version it currently is.

    Report any findings you have so i can make the plugin better!


  • Admin

    I shutdown the server, put the file 4.sql in the Database/private/update directory, also updated mysensors.default.config to reflect latest db version, and then restarted the server.

    In the meantime while trying to add sensors, I have replaced the entire pidome with the latest snapshot build. But it still gives me grey hairs trying to trying to figure out how to add the first temperature sensor node (based on the dalas ds18s20 demo sketch comming with mysensors code). It has two dalas chips, so reporting two temperatures, gw.present(0, S_TEMP); gw.present(1, S_TEMP);

    In PiDome, I have created a custom sensor, with two groups (0 and 1), each having a datafield configured as:
    Control ID: 0
    Control name: Temperature
    Datatype : Float
    Graph : timeseries (average)
    Suffix : C
    Floormap type: Temperature

    After adding the mysensor node, with this custom sensor description, I then go to "Control/Views" and "Devices" clicking on my new sensor, it repports 0C for both sensors, The timestamp is updated to the time that the node last send in it's temperature.

    I can't seem to figure out why it repports 0 as temperature. Looking at the data from the gateway with minicom (while server is shutdown), it does repport correct temperatures for both sensors attached to the remote node.

    Am I doing things wrong here, or have I found a unknown "feature"?

    / Thomas


  • Plugin Developer

    @tbowmo The control id should be the V_VAR naming and the control id you have used as group id.

    More info can be found at: http://pidome.wordpress.com/2014/08/10/added-partly-mysensors-org-wireless-devices-support-api-1-4-beta/


  • Admin

    That did it.. Changed the control id, to V_TEMP on both temperature data fields

    And now I am able to get temperature measurements..
    🙂


  • Plugin Developer

    Good to hear! 👍

    Uhmm.. read...


  • Plugin Developer

    @tbowmo

    Regarding the update method you did

    "I shutdown the server, put the file 4.sql in the Database/private/update directory, also updated mysensors.default.config to reflect latest db version, and then restarted the server."

    Could possibly mess things up.

    This method:
    "I have replaced the entire pidome with the latest snapshot build" can also be "I have overwritten the entire pidome with the latest snapshot build". The last method will auto-update.

    With a database update there also is an high possibility of changes in code. Fortunate DB structure update version 4 only adds data 😉


  • Admin

    @John
    Well i'm still testing things out, so if something goes wrong, I delete everything (including databases), and start all over again.. That was what I meant by "I have replaced the entire pidome with the latest snapshot build" 🙂

    Still experimenting with adding sensor nodes. Think I have to solder up a couple of extra nodes, just to have something to generate input, and to send some output to (Have the parts ready for 4 more nodes)

    / Thomas


  • Admin

    One thing that is a bit unclear to me..

    If I have a node with 3 temperature sensors on. They are made with gw.present(0, S_TEMP); gw.present(1,S_TEMP)...

    This node also functions as a thermostat, using sensor 0, so when temperature is below setpoint make output go high

    Now in pidome, I have made a sensor node with 3 groups (1 for each S_TEM), each one of them defines one datafield with V_TEMP as ID.

    I also want to be able to set the target temperature for sensor 0 on the node (that is, the node itself turns on the heater until desired temperature is reached)

    How should I define this in pidome? Should I make a new group, and attach a slider to that one, in order to set a value in the node? Because I can't see any option to send a datafield value to the node.

    / Thomas


  • Plugin Developer

    @tbowmo Sorry for the late response, was at a conference yesterday.

    It depends on how to interpret the value to be send. If you want to let the node control the heater, you should on the node create for example a threshold vairable let's say "int trigger value". If you would create a VAR_1 control which can be a slider in the node 0 group of type int and set a minimal value of 0 and max value of for example 50, you will be able to send a value to the node between 0-50.

    On the node you should listen for incoming data for sensor 0, with variable VAR_1. and store it in the var on the node.

    When you change the slider values the value is immediately send.


  • Plugin Developer

    I know it has should been added earlier, but you can now add battery level to a device added to the server.

    When you are creating your own device in the visual device editor do the following to show the battery level:

    • Drag an drop a group to the device declaration field. You can give it any name you want, but the group id must be named "INTERNAL"(capital letters without the " (quotes)).
    • Drag and drop a data field control to this group. You can give it any name. but the id must be "I_BATTERY_LEVEL" (also without the quotes).
    • Set the datatype to "FLOAT". All battery levels in the server are handled this way.
    • If you want, you can select "Battery (0-100%)" as a visual type. This is for future references when the server is able to report low battery levels to users and visualize this in clients.

    That's it.

    Cheers,
    John.

    P.S. We are on a level where we can start defining an online servers for users to share custom devices. We hope to have this available in a month or 2/3. So if you then create a MySensors node and added a custom device on the server. You can share this custom device setup with others also creating your MySensors node.



  • Hey;
    can someone pinpoint what the "Waiting for gateway" means?

    Thanks!
    capture.png


  • Plugin Developer

    Sorry for the late response!

    The server waits for a message from the gateway which tells the server it is ready to serve data. When you attach the gateway to your pc, and watch it in the terminal, do you see a "Gateway ready" message?

    John.



  • @John said:

    Sorry for the late response!

    No problem 🙂

    The server waits for a message from the gateway which tells the server it is ready to serve data. When you attach the gateway to your pc, and watch it in the terminal, do you see a "Gateway ready" message?

    John.

    Yes, as a matter of fact i do (via ssh -> miniterm.py on RPi)

    capture.png

    EDIT : I Just now realized this is not necessarily the "Gateway ready signal" 👯
    Btw is there support for mysensors from the RPi SIO pins? It would be great to not need to use the FTDI 🙂


  • Plugin Developer

    Well, this IS the gateway ready message. It is an internal message the "3". And it is saying "14" which is the ready message (i should have said startup complete). I will take a look into it. Your sure using the same settings as with miniterm?

    The second remark you gave. I will soon start with the driver which will support mysensors using the rpi pins. Highly possible this will start somewhere next. Already are in contact with an user who also wants to use mysensors this way



Suggested Topics

  • 4
  • 18
  • 5
  • 14
  • 6
  • 8
  • 3
  • 4

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts